bornhack-website/src/teams/templates/team_manage.html

89 lines
2.0 KiB
HTML

{% 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>
{% if team.teammember_set.exists %}
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>
Profile
</th>
<th>
Name
</th>
<th>
Email
</th>
<th>
Description
</th>
<th>
Public Credit Name
</th>
<th>
Membership
</th>
<th>
Action
</th>
</tr>
</thead>
<tbody>
{% for membership in team.teammember_set.all %}
<tr>
<td>
{{ membership.user }}
</td>
<td>
{{ membership.user.profile.name }}
</td>
<td>
{{ membership.user.profile.email }}
</td>
<td>
{{ membership.user.profile.description }}
</td>
<td>
{{ membership.user.profile.public_credit_name|default:"N/A" }}
</td>
<td>
{% if membership.approved %}member{% else %}pending{% endif %}
</td>
<td>
{% if membership.approved %}
<a class="btn btn-danger" href="{% url 'teams: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 'teams: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 'teams:teammember_approve' camp_slug=camp.slug pk=membership.id %}"><i class="fa fa-check"></i> Approve</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No members found!</p>
{% endif %}
{% endblock %}