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 %} {% block content %}
<h3>{{ team.name }}</h3> <h3>{{ team.name }} Team</h3>
{{ team.description|unsafecommonmark }} {{ team.description|unsafecommonmark }}
{% if team.sub_teams.exists %} <hr />
<hr /> <h3>{{ team.area.name }} Area:</h3>
<h3>Subteams:</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> <ul>
{% for sub_team in team.sub_teams.all %} {% for resp in team.area.responsible.all %}
<li>{{ sub_team.name }}</li> <li>{{ resp.name|default:"Unnamed" }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}
{% endblock %} {% endblock %}

View file

@ -14,6 +14,7 @@ Teams | {{ block.super }}
<th>Name</th> <th>Name</th>
<th>Description</th> <th>Description</th>
<th>Area</th> <th>Area</th>
<th>Responsible</th>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<th>Membership</th> <th>Membership</th>
<th>Action</th> <th>Action</th>
@ -32,7 +33,12 @@ Teams | {{ block.super }}
{{ team.description|unsafecommonmark|truncatewords:50 }} {{ team.description|unsafecommonmark|truncatewords:50 }}
</td> </td>
<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> </td>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<td> <td>