Change markup for the team detail page for a better overview/seperation.
This commit is contained in:
parent
92e394cce9
commit
025a5f76b7
|
@ -8,14 +8,17 @@ Team: {{ team.name }} | {{ block.super }}
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="page-header">
|
||||
<h1>{{ team.name }} Team Details</h1>
|
||||
</div>
|
||||
|
||||
{# Team communications #}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h4>{{ team.name }} Team Details</h4></div>
|
||||
<div class="panel-heading">
|
||||
<h4>Communication Channels</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ team.description|unsafecommonmark }}
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{{ team.name }} Team Communications</h4>
|
||||
{{ team.camp.title }} teams primarily use mailing lists and IRC to communicate. The <b>{{ team.name }} team</b> can be contacted in the following ways:</p>
|
||||
|
||||
<h5>Mailing List</h5>
|
||||
|
@ -38,9 +41,51 @@ Team: {{ team.name }} | {{ block.super }}
|
|||
<p>The {{ team.name }} Team private IRC channel is <a href="irc://{{ IRCBOT_SERVER_HOSTNAME }}/{{ team.private_irc_channel_name }}">{{ team.private_irc_channel_name }} on {{ IRCBOT_SERVER_HOSTNAME }}</a>.</p>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>{{ team.name }} Team Members</h4>
|
||||
{# Team tasks #}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>Tasks</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>The {{ team.name }} Team is responsible for the following tasks</p>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for task in team.tasks.all %}
|
||||
<tr>
|
||||
<td><a href="{% url 'teams:task_detail' slug=task.slug camp_slug=camp.slug team_slug=team.slug %}">{{ task.name }}</a></td>
|
||||
<td>{{ task.description }}</td>
|
||||
<td>
|
||||
<a href="{% url 'teams:task_detail' camp_slug=camp.slug team_slug=team.slug slug=task.slug %}" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> Details</a>
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<a href="{% url 'teams:task_update' camp_slug=camp.slug team_slug=team.slug slug=task.slug %}" class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> Edit Task</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<a href="{% url 'teams:task_create' camp_slug=camp.slug team_slug=team.slug %}" class="btn btn-primary"><i class="fa fa-plus"></i> Create Task</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Team members #}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>Members</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>The following <b>{{ team.approved_members.count }}</b> people {% if team.unapproved_members.count %}(and {{ team.unapproved_members.count }} pending){% endif %} are members of the <b>{{ team.name }} Team</b>:</p>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
|
@ -86,41 +131,16 @@ Team: {{ team.name }} | {{ block.super }}
|
|||
{% endif %}
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>{{ team.name }} Team Tasks</h4>
|
||||
<p>The {{ team.name }} Team is responsible for the following tasks</p>
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for task in team.tasks.all %}
|
||||
<tr>
|
||||
<td><a href="{% url 'teams:task_detail' slug=task.slug camp_slug=camp.slug team_slug=team.slug %}">{{ task.name }}</a></td>
|
||||
<td>{{ task.description }}</td>
|
||||
<td>
|
||||
<a href="{% url 'teams:task_detail' camp_slug=camp.slug team_slug=team.slug slug=task.slug %}" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> Details</a>
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<a href="{% url 'teams:task_update' camp_slug=camp.slug team_slug=team.slug slug=task.slug %}" class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> Edit Task</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<a href="{% url 'teams:task_create' camp_slug=camp.slug team_slug=team.slug %}" class="btn btn-primary"><i class="fa fa-plus"></i> Create Task</a>
|
||||
{% endif %}
|
||||
|
||||
{# Team info categories section - only visible for team responsible #}
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<hr />
|
||||
|
||||
<h4>Info categories</h4>
|
||||
{# Team info categories section - only visible for team responsible #}
|
||||
{% if request.user in team.responsible_members.all %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>Info Categories</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{% for info_category in team.info_categories.all %}
|
||||
|
||||
|
@ -151,9 +171,9 @@ Team: {{ team.name }} | {{ block.super }}
|
|||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -44,4 +44,3 @@ class InfoItemUpdateView(LoginRequiredMixin, CampViewMixin, EnsureTeamResponsibl
|
|||
|
||||
def get_success_url(self):
|
||||
return self.team.get_absolute_url()
|
||||
|
||||
|
|
Loading…
Reference in a new issue