Intitial teams support #147
@ -4,58 +4,64 @@
|
||||
<h1 class="mb-3">Teams</h1>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-100">
|
||||
Team name
|
||||
</th>
|
||||
<th>
|
||||
Role
|
||||
</th>
|
||||
<th>
|
||||
Users
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for team_member in user.team_users.all %}
|
||||
{% with team=team_member.team %}
|
||||
<tr>
|
||||
<td>
|
||||
<a class="px-0" href="{{ team.get_absolute_url }}">{{ team.name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="badge">
|
||||
{{ team_member.get_role_display }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="badge">
|
||||
{{ team.team_users.all.count }}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{# TODO: disable dropdown btn leave team if user is the only manager #}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-link dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="team-{{ team.id }}">
|
||||
<i class="i-more-vertical"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right js-dropdown-menu" id="team-{{ team.id }}">
|
||||
<li>
|
||||
{# TODO: add page leave team base and link #}
|
||||
{# TODO: add conditional class 'dropdown-item-disabled' if user is the only manager #}
|
||||
<a class="dropdown-item {% comment %}dropdown-item-disabled{% endcomment %}" href="#"><i class="i-log-out"></i>Leave Team</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if user.team_users.all %}
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-100">
|
||||
Team name
|
||||
</th>
|
||||
<th>
|
||||
Role
|
||||
</th>
|
||||
<th>
|
||||
Users
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for team_member in user.team_users.all %}
|
||||
{% with team=team_member.team %}
|
||||
<tr>
|
||||
<td>
|
||||
<a class="px-0" href="{{ team.get_absolute_url }}">{{ team.name }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="badge">
|
||||
{{ team_member.get_role_display }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="badge">
|
||||
{{ team.team_users.all.count }}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{# TODO: disable dropdown btn leave team if user is the only manager #}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-link dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="team-{{ team.id }}">
|
||||
<i class="i-more-vertical"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right js-dropdown-menu" id="team-{{ team.id }}">
|
||||
<li>
|
||||
{# TODO: add page leave team base and link #}
|
||||
{# TODO: add conditional class 'dropdown-item-disabled' if user is the only manager #}
|
||||
<a class="dropdown-item {% comment %}dropdown-item-disabled{% endcomment %}" href="#"><i class="i-log-out"></i>Leave Team</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>
|
||||
You are not assigned to any teams yet.
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock settings %}
|
||||
|
Loading…
Reference in New Issue
Block a user