Private
Public Access
1
0

added requests, revoke and reject buttons

This commit is contained in:
Sander Roosendaal
2017-02-10 12:48:22 +01:00
parent fffdb89a53
commit fa86c0c9d5
8 changed files with 303 additions and 41 deletions

View File

@@ -38,14 +38,16 @@
</div>
<div class="grid_6 omega">
{% if invites %}
{% if invites or requests or myrequests %}
<p>
<h2>Invitations</h2>
<table width="70%" class="listtable">
<h2>Invitations and Requests</h2>
<table width="90%" class="listtable">
<thead>
<tr>
<th>Name</th>
<th>Team</th>
<th>Manager</th>
<th>User</th>
<th>Action</th>
<th>&nbsp;</th>
</tr>
</thead>
@@ -54,7 +56,32 @@
<tr>
<td><a href="/rowers/team/{{ i.team.id }}">{{ i.team.name }}</a></td>
<td>{{ i.team.manager.first_name }} {{ i.team.manager.last_name }}</td>
<td><a class="button small green" href="/rowers/me/invitation/{{ i.code }}">Accept</a></td>
<td>{{ user.first_name }} {{ user.last_name }}</td>
<td><a class="button small green" href="/rowers/me/invitation/{{ i.code }}">Accept</a>
</td>
<td>
<a class="button small red" href="/rowers/me/invitation/{{ i.id }}/reject">Reject</a>
</td>
</tr>
{% endfor %}
{% for i in requests %}
<tr>
<td><a href="/rowers/team/{{ i.team.id }}">{{ i.team.name }}</a></td>
<td>{{ i.team.manager.first_name }} {{ i.team.manager.last_name }}</td>
<td>{{ user.first_name }} {{ user.last_name }}</td>
<td></td>
<td><a class="button red small" href="/rowers/me/request/{{ i.id }}/revoke">Revoke</a>
</tr>
{% endfor %}
{% for i in myrequests %}
<tr>
<td><a href="/rowers/team/{{ i.team.id }}">{{ i.team.name }}</a></td>
<td>{{ i.team.manager.first_name }} {{ i.team.manager.last_name }}</td>
<td>{{ user.first_name }} {{ user.last_name }}</td>
<td><a class="button small green" href="/rowers/me/request/{{ i.code }}">Accept</a>
<td>
<a class="button small red" href="/rowers/me/request/{{ i.id }}/reject">Reject</a>
</td>
</tr>
{% endfor %}
</tbody>