a few template fixes for team pages

This commit is contained in:
Thomas Steen Rasmussen 2017-04-02 20:05:43 +02:00
parent fe1708bb2c
commit 56741335aa
2 changed files with 12 additions and 4 deletions

View file

@ -10,7 +10,15 @@ Team: {{ team.name }} | {{ block.super }}
<h3>{{ team.name }} Team</h3>
{{ team.description|unsafecommonmark }}
<p>Currently {{ team.members.count }} people are members of this team{% if request.user in team.members.all %} (including you){% endif %}.</p>
{% if request.user in team.members.all %}
<a href="{% url 'team_leave' camp_slug=camp.slug slug=team.slug %}" class="btn btn-danger">Leave Team</a>
{% else %}
{% if team.needs_members %}
<a href="{% url 'team_join' camp_slug=camp.slug slug=team.slug %}" class="btn btn-success">Join Team</a>
{% endif %}
{% endif %}
<hr />
<h3>{{ team.area.name }} Area:</h3>

View file

@ -17,7 +17,7 @@ Teams | {{ block.super }}
<th>Responsible</th>
<th>Members</th>
{% if request.user.is_authenticated %}
<th>Membership</th>
<th>Member?</th>
<th>Action</th>
{% endif %}
</tr>
@ -45,11 +45,11 @@ Teams | {{ block.super }}
<span class="badge">{{ team.members.count }}</span>
</td>
{% if request.user.is_authenticated %}
<td>
<td class="text-center">
{% if request.user in team.members.all %}
Member
<span class="text-success"><i class="fa fa-check"></i></span>
{% else %}
Not member
<span class="text-danger"><i class="fa fa-remove"></i></span>
{% endif %}
</td>
<td>