Private
Public Access
1
0

navigation for coach view

This commit is contained in:
Sander Roosendaal
2018-02-11 14:23:33 +01:00
parent 8884e2f7b1
commit c185d680c6
4 changed files with 81 additions and 4 deletions

View File

@@ -43,7 +43,7 @@
{% if user.is_authenticated and user|is_manager %}
<div class="grid_2 dropdown">
<button class="grid_2 alpha button green small dropbtn">
See individual plans for Rower
Select Rower Individual Plan
</button>
<div class="dropdown-content">
{% for member in user|team_rowers %}
@@ -118,6 +118,61 @@
{% endfor %}
</tbody>
</table>
{% if unmatchedworkouts %}
<h1>Workouts that are not linked to any session</h1>
<table width="90%" class="listtable shortpadded">
<thead>
<tr>
<th> Rower</th>
<th style="width:80"> Date</th>
<th> Time</th>
<th> Name</th>
<th> Type</th>
<th> Distance </th>
<th> Duration </th>
<th> Avg HR </th>
<th> Max HR </th>
</tr>
</thead>
<tbody>
{% for workout in unmatchedworkouts %}
<tr>
<td> {{ workout.user.user.first_name }} {{ workout.user.user.last_name }} </td>
<td> {{ workout.date|date:"Y-m-d" }} </td>
<td> {{ workout.starttime|date:"H:i" }} </td>
{% if workout.user.user == user or user == team.manager %}
{% if workout.name != '' %}
<td>
<a href={% url rower.defaultlandingpage id=workout.id %}>
{{ workout.name }}
</a>
</td>
{% else %}
<td>
<a href={% url rower.defaultlandingpage id=workout.id %}>No Name
</a></td>
{% endif %}
{% else %}
{% if workout.name != '' %}
<td><a href="/rowers/workout/{{ workout.id }}/">{{ workout.name }}</a></td>
{% else %}
<td><a href="/rowers/workout/{{ workout.id }}/">No Name</a> </td>
{% endif %}
{% endif %}
<td> {{ workout.workouttype }} </td>
<td> {{ workout.distance }}m</td>
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
<td> {{ workout.averagehr }} </td>
<td> {{ workout.maxhr }} </td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>