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