Private
Public Access
1
0

not sure if this works

This commit is contained in:
Sander Roosendaal
2019-02-16 17:15:25 +01:00
parent 74cc925e59
commit ccdf24f671
16 changed files with 599 additions and 17 deletions

View File

@@ -80,7 +80,7 @@
</tbody>
</table>
{% endif %}
<a class="button green" href="/rowers/team/create/">New Team</a>
<a class="button green" href="/rowers/team/create/">New Training Group</a>
</li>
{% if coaches %}
<li>
@@ -136,7 +136,7 @@
{% endif %}
{% if invites or requests or myrequests or myinvites %}
<li class="grid_2">
<h2>Invitations and Requests</h2>
<h2>Group Invitations and Requests</h2>
<p>This section lists open invites to join a group. By accepting
a group invite, you are agreeing with the sharing
of personal data between group members and coaches according to
@@ -221,7 +221,131 @@
<input class="button green" type="submit" value="Submit">
</form>
{% endif %}
{% if mycoachrequests or mycoachoffers or coachoffers or coachrequests %}
<li class="grid_2">
<h2>Coaching Invitations and Requests</h2>
<p>This section lists open invites related to coaching.
By accepting a coaching invite, the coach can run
analysis, add workouts and edit settings on behalf of the athlete.
You agree to the sharing
of personal data between athletes and coaches according to
our <a href="/rowers/legal/">privacy policy</a>.
</p>
<table width="90%" class="listtable">
<thead>
<tr>
<th>Coach</th>
<th>User</th>
<th>Action</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for i in coachrequests %}
<tr>
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td><a
class="button small green"
href="/rowers/me/coachrequest/{{ i.code }}/accept">Accept</a>
</td>
<td>
<a class="button small red" href="/rowers/me/coachrequest/{{ i.id }}/reject/">Reject</a>
</td>
</tr>
{% endfor %}
{% for i in mycoachoffers %}
<tr>
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td>&nbsp;
</td>
<td>
<a class="button small red" href="/rowers/me/coachoffer/{{ i.id }}/revoke/">Revoke</a>
</td>
</tr>
{% endfor %}
{% for i in mycoachrequests %}
<tr>
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td>&nbsp;</td>
<td>
<a
class="button small red"
href="/rowers/me/coachrequest/{{ i.id }}/revoke/">Revoke</a>
</td>
</tr>
{% endfor %}
{% for i in coachoffers %}
<tr>
<td>{{ i.coach.user.first_name }} {{ i.coach.user.last_name }}</td>
<td>{{ i.user.first_name }} {{ i.user.last_name }}</td>
<td><a
class="button small green"
href="/rowers/me/coachoffer/{{ i.code }}/accept/">Accept</a>
</td>
<td>
<a
class="button small red"
href="/rowers/me/coachoffer/{{ i.id }}/revoke/">Reject</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</li>
{% if potentialathletes %}
<li>
<h2>Rowers you could coach</h2>
<table width="90%" class="listtable">
<thead>
<tr>
<th>User</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for a in potentialathletes %}
<tr>
<td>{{ a.user.first_name }} {{ a.user.last_name }}</td>
<td>
<a
class="button small green"
href="/rowers/me/coacheerequest/{{ a.user.id }}/">Offer Coaching</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</li>
{% endif %}
{% if potentialcoaches %}
<li>
<h2>Coaches who could coach you</h2>
<table width="90%" class="listtable">
<thead>
<tr>
<th>User</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for c in potentialcoaches %}
<tr>
<td>{{ c.first_name }} {{ c.last_name }}</td>
<td>
<a
class="button small green"
href="/rowers/me/coachrequest/{{ c.id }}/">Request Coaching</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</li>
{% endif %}
</ul>