mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: display user’s teams with a table
This commit is contained in:
parent
426780af2c
commit
11d3152682
1 changed files with 40 additions and 8 deletions
|
@ -6,14 +6,46 @@
|
|||
{% include "umap/dashboard_menu.html" with selected="teams" %}
|
||||
<div class="wrapper">
|
||||
<div class="row">
|
||||
<ul>
|
||||
{% for team in teams %}
|
||||
<li>
|
||||
<a href="{% url 'team_maps' team.pk %}">{{ team }}</a> <a href="{% url 'team_update' team.pk %}">({% trans "Edit" %})</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{% url 'team_new' %}">{% trans "New team" %}</a>
|
||||
<div class="table-wrapper">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{% blocktrans %}Name{% endblocktrans %}
|
||||
</th>
|
||||
<th>
|
||||
{% blocktrans %}Users{% endblocktrans %}
|
||||
</th>
|
||||
<th>
|
||||
{% blocktrans %}Actions{% endblocktrans %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for team in teams %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<a href="{% url 'team_maps' team.pk %}">{{ team }}</a>
|
||||
</th>
|
||||
<td>
|
||||
{% for user in team.users.all %}
|
||||
{{ user }}{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'team_update' team.pk %}"
|
||||
class="icon-link"
|
||||
title="{% translate "Edit" %}">
|
||||
<span class="icon-dashboard icon-edit"></span>
|
||||
<span class="sr-only">{% translate "Edit" %}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<a class="button" href="{% url 'team_new' %}">{% trans "New team" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock maincontent %}
|
||||
|
|
Loading…
Reference in a new issue