54 lines
1.8 KiB
HTML
54 lines
1.8 KiB
HTML
{% extends "site_base.html" %}
|
|
|
|
{% block head_title %}{{ team.name }}{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>{{ team.name }}{% if state %} <span class="label">{{ state }}</span>{% endif %}</h1>
|
|
|
|
{% if team.description %}<p>{{ team.description }}</p>{% endif %}
|
|
|
|
{% if can_join %}
|
|
<form method="post" action="{% url team_join team.slug %}">
|
|
{% csrf_token %}
|
|
<input type="submit" class="btn btn-primary" value="join">
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if can_leave %}
|
|
<form method="post" action="{% url team_leave team.slug %}">
|
|
{% csrf_token %}
|
|
<input type="submit" class="btn" value="leave">
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if can_apply %}
|
|
<form method="post" action="{% url team_apply team.slug %}">
|
|
{% csrf_token %}
|
|
<input type="submit" class="btn btn-primary" value="apply">
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if user.is_staff or state == "manager" %}
|
|
{% if team.members %}
|
|
<h2>Team Members</h2>
|
|
<table class="table table-striped">
|
|
{% for membership in team.members %}
|
|
<tr>
|
|
<td>{{ membership.user.email }}</td>
|
|
<td>{{ membership.state }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
{% if team.applicants and team.access == "application" %}
|
|
<h2>Applicants</h2>
|
|
<table class="table table-striped">
|
|
{% for membership in team.applicants %}
|
|
<tr>
|
|
<td>{{ membership.user.email }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endblock %}
|