use tables to display teams on dashboard
This commit is contained in:
parent
6e1a2cb2ef
commit
93cd838bb3
1 changed files with 28 additions and 16 deletions
|
@ -132,30 +132,42 @@
|
||||||
<div class="dashboard-panel-content">
|
<div class="dashboard-panel-content">
|
||||||
{% if user.memberships.exists %}
|
{% if user.memberships.exists %}
|
||||||
<h4>Your Teams</h4>
|
<h4>Your Teams</h4>
|
||||||
<dl>
|
<table class="table table-striped">
|
||||||
{% for membership in user.memberships.all %}
|
{% for membership in user.memberships.all %}
|
||||||
<dt>
|
<tr>
|
||||||
|
<td>
|
||||||
<a href="{% url team_detail membership.team.slug %}">{{ membership.team.name }}</a>
|
<a href="{% url team_detail membership.team.slug %}">{{ membership.team.name }}</a>
|
||||||
|
{% if membership.team.description %}<br>{{ membership.team.description }}{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<span class="label">{{ membership.get_state_display }}</span>
|
<span class="label">{{ membership.get_state_display }}</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
{% if membership.state == "manager" or user.is_staff %}
|
{% if membership.state == "manager" or user.is_staff %}
|
||||||
{% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
|
{% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</dt>
|
</td>
|
||||||
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% available_teams as available_teams %}
|
{% available_teams as available_teams %}
|
||||||
{% if available_teams %}
|
{% if available_teams %}
|
||||||
<h4>Available Teams</h4>
|
<h4>Available Teams</h4>
|
||||||
<dl>
|
<table class="table table-striped">
|
||||||
{% for team in available_teams %}
|
{% for team in available_teams %}
|
||||||
<dt>
|
<tr>
|
||||||
|
<td>
|
||||||
<a href="{% url team_detail team.slug %}">{{ team }}</a>
|
<a href="{% url team_detail team.slug %}">{{ team }}</a>
|
||||||
|
{% if team.description %}<br>{{ team.description }}{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<span class="label">{{ team.get_access_display }}</span>
|
<span class="label">{{ team.get_access_display }}</span>
|
||||||
</dt>
|
</td>
|
||||||
{% if team.description %}<dd>{{ team.description }}</dd>{% endif %}
|
</tr>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</dl>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue