84 lines
2.9 KiB
HTML
84 lines
2.9 KiB
HTML
{% extends 'base.html' %}
|
|
{% load commonmark %}
|
|
{% load teams_tags %}
|
|
|
|
{% block title %}
|
|
Teams | {{ block.super }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<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, but please put some info in your <a href="{% url 'profiles:detail' %}">profile</a> first, so the team responsible has some idea who you are.</p>
|
|
<p>You can also leave a team of course, but 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>
|
|
<p>We currently have {{ teams.count }} teams for {{ camp.title }}:</p>
|
|
{% if teams %}
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
<th>Responsible</th>
|
|
<th>Members</th>
|
|
<th>Member</th>
|
|
<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 }}
|
|
</td>
|
|
<td>
|
|
{% for resp in team.responsible.all %}
|
|
{{ resp.get_full_name|default:"Unnamed" }}{% if not forloop.last %},{% endif %}<br>
|
|
{% endfor %}
|
|
</td>
|
|
<td class="text-center">
|
|
<span class="badge">{{ team.members.count }}</span>
|
|
</td>
|
|
{% if request.user.is_authenticated %}
|
|
{% membershipstatus request.user team as membership_status %}
|
|
<td class="text-center">
|
|
{% if membership_status == 'Membership Pending' %}
|
|
<i class='fa fa-clock-o' title='Pending'></i>
|
|
{% else %}
|
|
{% if membership_status == 'Member' %}
|
|
<i class='fa fa-thumbs-o-up' title='Member'></i>
|
|
{% else %}
|
|
<i class='fa fa-times' title='Not a member'></i>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
<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>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% else %}
|
|
<td>Login to join!</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<h4>No teams for <b>{{ camp.title }}</b> yet!</h4>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|