Private
Public Access
1
0
Files
rowsandall/rowers/templates/plannedsessionscoach.html
Sander Roosendaal ff331330f7 completing new colors
2018-11-13 14:02:42 +01:00

138 lines
3.4 KiB
HTML

{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Planned Sessions{% endblock %}
{% block main %}
{% if theteam %}
<h1>Coach Overview. Team {{ theteam.name }}</h1>
{% else %}
<h1>Coach Overview</h1>
{% endif %}
<p>
<form enctype="multipart/form-data" method="get">
<table>
{{ dateform.as_table }}
</table>
<input type="Submit" value="Set Date Range">
</form>
</p>
<table width="90%" class="listtable">
<thead>
<tr>
<th align="left">On or after</th>
<th align="left">On or before</th>
<th align="left">Preferred date</th>
<th align="left">Name</th>
{% for r in rowers %}
<th class="rotate"><div><span>
{{ r.user.first_name }} {{ r.user.last_name }}
</span></div></th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for thedict in statusdict %}
<tr>
<td>
{{ thedict|lookup:'startdate'|date:"Y-m-d" }}
</td>
<td>
{{ thedict|lookup:'enddate'|date:"Y-m-d" }}
</td>
<td>
{{ thedict|lookup:'preferreddate'|date:"Y-m-d" }}
</td>
<td>
<a href="/rowers/sessions/{{ thedict|lookup:"id" }}">
{% if thedict|lookup:'name' %}
{{ thedict|lookup:'name' }}
{% else %}
Unnamed Session
{% endif %}
</a>
</td>
{% for r in rowers %}
<td>
{% if thedict|lookup:'results'|lookup:r.id != 'not assigned' %}
<a class="{{ thedict|lookup:'color'|lookup:r.id }} dot"
title="{{ thedict|lookup:'results'|lookup:r.id }}"
href="{% url 'plannedsession_view' id=thedict|lookup:"id" userid=r.user.id %}">&nbsp;</a>
{% else %}
&nbsp;
{% endif %}
</td>
{% endfor %}
</tr>
{% 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 %}
</form>
{% endblock %}
{% block sidebar %}
{% include 'menu_plan.html' %}
{% endblock %}