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

84 lines
2.9 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% load commonmark %}
{% load teams_tags %}
{% block title %}
Teams | {{ block.super }}
{% endblock %}
{% block content %}
2017-04-08 08:09:06 +00:00
<h3>{{ camp.title }} Teams</h3>
2017-04-13 15:44:46 +00:00
<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>
2017-04-08 08:09:06 +00:00
<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>
<th>Responsible</th>
<th>Members</th>
<th>Member</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>
{% 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 %}
{% 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>
2017-04-02 16:04:57 +00:00
<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>
2017-04-02 16:04:57 +00:00
{% 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 %}