symposion_app/symposion_project/templates/teams/team_detail.html

70 lines
2.7 KiB
HTML
Raw Normal View History

2012-08-02 01:38:50 +00:00
{% 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 %}
2012-08-02 01:38:50 +00:00
2012-08-02 02:49:27 +00:00
{% 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 %}
2012-08-02 02:59:41 +00:00
{% if can_apply %}
<form method="post" action="{% url team_apply team.slug %}">
2012-08-02 02:59:41 +00:00
{% csrf_token %}
<input type="submit" class="btn btn-primary" value="apply">
</form>
{% endif %}
{% if user.is_staff or state == "manager" %}
{% if team.managers %}
<h2>Managers</h2>
<table class="table table-striped">
{% for membership in team.managers %}
<tr>
2012-08-02 22:05:54 +00:00
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
<td>
<form style="margin: 0;" method="post" action="{% url team_demote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if team.members %}
<h2>Team Members</h2>
<table class="table table-striped">
{% for membership in team.members %}
<tr>
2012-08-02 22:05:54 +00:00
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
<td>
<form style="margin: 0;" method="post" action="{% url team_promote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form>
</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 %}
2012-08-02 01:38:50 +00:00
{% endblock %}