add some more details to team list and detail pages

This commit is contained in:
Thomas Steen Rasmussen 2017-04-02 19:11:11 +02:00
parent 0dc1ca9704
commit d2a78dcf1c
2 changed files with 16 additions and 12 deletions

View file

@ -7,19 +7,17 @@ Team: {{ team.name }} | {{ block.super }}
{% block content %}
<h3>{{ team.name }}</h3>
<h3>{{ team.name }} Team</h3>
{{ team.description|unsafecommonmark }}
{% if team.sub_teams.exists %}
<hr />
<h3>Subteams:</h3>
<ul>
{% for sub_team in team.sub_teams.all %}
<li>{{ sub_team.name }}</li>
{% endfor %}
</ul>
{% endif %}
<hr />
<h3>{{ team.area.name }} Area:</h3>
<p>This team is under the <b>{{ team.area.name }} area</b>. The following users are responsible for the <b>{{ team.area.name }} area</b>:</p>
<ul>
{% for resp in team.area.responsible.all %}
<li>{{ resp.name|default:"Unnamed" }}</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -14,6 +14,7 @@ Teams | {{ block.super }}
<th>Name</th>
<th>Description</th>
<th>Area</th>
<th>Responsible</th>
{% if request.user.is_authenticated %}
<th>Membership</th>
<th>Action</th>
@ -32,7 +33,12 @@ Teams | {{ block.super }}
{{ team.description|unsafecommonmark|truncatewords:50 }}
</td>
<td>
{{ team.area.name }}
{{ team.area.name }} Area
</td>
<td>
{% for resp in team.area.responsible.all %}
{{ resp.name|default:"Unnamed" }}<br>
{% endfor %}
</td>
{% if request.user.is_authenticated %}
<td>