Private
Public Access
1
0

Team create, delete, leave, create invite

This commit is contained in:
Sander Roosendaal
2017-02-09 17:50:32 +01:00
parent f459cea2bd
commit 40e18fee21
10 changed files with 473 additions and 60 deletions

View File

@@ -6,10 +6,33 @@
<div class="grid_12 alpha">
<div class="grid_6 alpha">
<p>
<h2>Teams</h2>
Future teams page
<h2>My Teams</h2>
{% if teams %}
<table width="70%" class="listtable">
<thead>
<tr>
<th>Name</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for team in teams %}
<tr>
<td>
<a href="/rowers/team/{{ team.id }}/">{{ team.name }}</a>
</td>
<td>
<div class="grid_1">
<a class="button small red" href="/rowers/team/{{ team.id }}/leaveconfirm">Leave</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>You are not a member of any team.</p>
{% endif %}
</p>
@@ -21,7 +44,40 @@
</div>
</div>
{% if user.rower.rowerplan == 'coach' %}
<div class="grid_12 alpha">
<div class="grid_6 alpha">
<h2>Teams I manage</h2>
{% if myteams %}
<table width="70%" class="listtable">
<thead>
<tr>
<th>Name</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for team in myteams %}
<tr>
<td>
<a href="/rowers/team/{{ team.id }}/">{{ team.name }}</a>
</td>
<td>
<div class="grid_1">
<a class="button small red" href="/rowers/team/{{ team.id }}/deleteconfirm">Delete</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="grid_2 suffix_2 prefix_2 alpha">
<a class="button green" href="/rowers/team/create">New Team</a>
</div>
</div>
</div>
{% endif %}
{% endblock %}