2017-05-24 05:49:32 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% load commonmark %}
|
|
|
|
{% load teams_tags %}
|
|
|
|
{% load bootstrap3 %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Manage Team: {{ team.name }} | {{ block.super }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h3>Manage {{ team.name }} Team</h3>
|
|
|
|
<form method="post" class="form-horizontal">
|
|
|
|
{% csrf_token %}
|
|
|
|
|
|
|
|
{% bootstrap_form form %}
|
|
|
|
|
|
|
|
|
|
|
|
{% buttons %}
|
|
|
|
<button class="btn btn-primary pull-right" type="submit">Save</button>
|
|
|
|
{% endbuttons %}
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<h3>{{ team.name }} Team Members</h3>
|
2017-05-25 17:56:34 +00:00
|
|
|
{% if team.teammember_set.exists %}
|
2017-05-24 05:49:32 +00:00
|
|
|
<table class="table table-bordered table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
Profile
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
2017-05-24 05:49:32 +00:00
|
|
|
<th>
|
|
|
|
Name
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
2017-05-24 05:49:32 +00:00
|
|
|
<th>
|
|
|
|
Email
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
2017-05-24 05:49:32 +00:00
|
|
|
<th>
|
|
|
|
Description
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
2017-07-11 20:50:31 +00:00
|
|
|
<th>
|
|
|
|
Public Credit Name
|
|
|
|
</th>
|
2017-05-24 05:49:32 +00:00
|
|
|
<th>
|
|
|
|
Membership
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
2017-05-24 05:49:32 +00:00
|
|
|
<th>
|
|
|
|
Action
|
2017-05-25 17:56:34 +00:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2017-05-24 05:49:32 +00:00
|
|
|
<tbody>
|
|
|
|
{% for membership in team.teammember_set.all %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
{{ membership.user }}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
2017-05-24 05:49:32 +00:00
|
|
|
<td>
|
|
|
|
{{ membership.user.profile.name }}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
2017-05-24 05:49:32 +00:00
|
|
|
<td>
|
|
|
|
{{ membership.user.profile.email }}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
2017-05-24 05:49:32 +00:00
|
|
|
<td>
|
|
|
|
{{ membership.user.profile.description }}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
2017-07-11 20:50:31 +00:00
|
|
|
<td>
|
|
|
|
{{ membership.user.profile.public_credit_name|default:"N/A" }}
|
|
|
|
</td>
|
2017-05-24 05:49:32 +00:00
|
|
|
<td>
|
|
|
|
{% if membership.approved %}member{% else %}pending{% endif %}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
2017-05-24 05:49:32 +00:00
|
|
|
<td>
|
|
|
|
{% if membership.approved %}
|
|
|
|
<a class="btn btn-danger" href="{% url 'teammember_remove' camp_slug=camp.slug pk=membership.id %}"><i class="fa fa-trash-o"></i> Remove</a>
|
|
|
|
{% else %}
|
|
|
|
<a class="btn btn-danger" href="{% url 'teammember_remove' camp_slug=camp.slug pk=membership.id %}"><i class="fa fa-trash-o"></i> Remove</a>
|
|
|
|
<a class="btn btn-success" href="{% url 'teammember_approve' camp_slug=camp.slug pk=membership.id %}"><i class="fa fa-check"></i> Approve</a>
|
|
|
|
{% endif %}
|
2017-05-25 17:56:34 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2017-05-24 05:49:32 +00:00
|
|
|
{% endfor %}
|
2017-05-25 17:56:34 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<p>No members found!</p>
|
|
|
|
{% endif %}
|
2017-05-24 05:49:32 +00:00
|
|
|
{% endblock %}
|
2017-05-25 17:56:34 +00:00
|
|
|
|