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

73 lines
2.4 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% load commonmark %}
{% block title %}
Teams | {{ block.super }}
{% endblock %}
{% block content %}
2017-04-08 08:09:06 +00:00
<h3>{{ camp.title }} Teams</h3>
<p>This is a list of the teams for {{ camp.title }}. To join a team just press the Join button. You can also leave a team if you are already a member (please let the team responsible know why!).</p>
<p>Team memberships need to be approved by a team responsible. You will receive a message when your membership has been approved.</p>
<p>At {{ camp.title }} all organisers and volunteers buy full tickets like everyone else. In the future our budget may allow for discounts or free tickets for volunteers, but not this year. However: Please let us know if you can't afford a ticket - we will figure something out!</p>
2017-04-08 08:09:06 +00:00
<p>We currently have {{ teams.count }} teams for {{ camp.title }}:</p>
{% if teams %}
2017-04-01 21:16:23 +00:00
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
2017-04-02 16:04:57 +00:00
<th>Area</th>
<th>Responsible</th>
<th>Members</th>
2017-04-08 07:58:16 +00:00
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for team in teams %}
<tr>
<td>
<a href="{% url 'team_detail' camp_slug=camp.slug slug=team.slug %}">
{{ team.name }} Team
</a>
</td>
<td>
{{ team.description|unsafecommonmark|truncatewords:50 }}
2017-04-02 16:04:57 +00:00
</td>
<td>
{{ team.area.name }} Area
</td>
<td>
{% for resp in team.responsible.all %}
2017-04-02 17:27:50 +00:00
{{ resp.get_full_name|default:"Unnamed" }}{% if not forloop.last %},{% endif %}<br>
{% endfor %}
2017-04-02 16:04:57 +00:00
</td>
<td class="text-center">
<span class="badge">{{ team.members.count }}</span>
</td>
2017-04-02 16:04:57 +00:00
{% if request.user.is_authenticated %}
<td>
{% if request.user in team.members.all %}
<a href="{% url 'team_leave' camp_slug=camp.slug slug=team.slug %}" class="btn btn-danger"><i class="fa fa-minus"></i> Leave</a>
{% else %}
{% if team.needs_members %}
<a href="{% url 'team_join' camp_slug=camp.slug slug=team.slug %}" class="btn btn-success"><i class="fa fa-plus"></i> Join</button>
{% else %}
<i>Team does not need members</i>
2017-04-01 21:16:23 +00:00
{% endif %}
{% endif %}
</td>
2017-04-08 07:58:16 +00:00
{% else %}
<td>Login to join!</td>
2017-04-02 16:04:57 +00:00
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>No teams for <b>{{ camp.title }}</b> yet!</h4>
{% endif %}
{% endblock %}