Private
Public Access
1
0
Files
rowsandall/rowers/templates/plannedsessions.html
Sander Roosendaal f149e2b431 minor improvements
2018-02-08 22:47:35 +01:00

127 lines
4.1 KiB
HTML

{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Planned Sessions{% endblock %}
{% block content %}
<div class="grid_12 alpha">
{% include "planningbuttons.html" %}
</div>
<div class="grid_6 alpha">
<h1>Plan for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
</div>
<div id="timeperiod" class="grid_2 dropdown">
<button class="grid_2 alpha button gray small dropbtn">Select Time Period ({{ timeperiod|verbosetimeperiod }})</button>
<div class="dropdown-content">
<a class="button gray small alpha"
href="/rowers/sessions/today/rower/{{ rower.id }}">
Today
</a>
<a class="button gray small alpha"
href="/rowers/sessions/thisweek/rower/{{ rower.id }}">
This Week
</a>
<a class="button gray small alpha"
href="/rowers/sessions/thismonth/rower/{{ rower.id }}">
This Month
</a>
<a class="button gray small alpha"
href="/rowers/sessions/lastweek/rower/{{ rower.id }}">
Last Week
</a>
<a class="button gray small alpha"
href="/rowers/sessions/lastmonth/rower/{{ rower.id }}">
Last Month
</a>
</div>
</div>
{% if user.is_authenticated and user|is_manager %}
<div class="grid_2 dropdown">
<button class="grid_2 alpha button green small dropbtn">
Change Rower
</button>
<div class="dropdown-content">
{% for member in user|team_rowers %}
<a class="button green small" href="/rowers/sessions/{{ timeperiod }}/rower/{{ member.id }}">{{ member.user.first_name }} {{ member.user.last_name }}</a>
{% endfor %}
</div>
</div>
{% endif %}
<div class="grid_12 alpha">
{% if plannedsessions %}
<p>
Click on session name to view, edit to change the session and on the
traffic light symbol to add workouts to the session
</p>
<table width="90%" class="listtable shortpadded">
<thead>
<tr>
<th>Status</th>
<th>On or After</th>
<th>On or Before</th>
<th>Name</th>
<th>Type</th>
<th>Edit</th>
<th>Planned</th>
<th>Actual</th>
<th>&nbsp;</th>
<th>Completion Date</th>
<th>
</tr>
</thead>
<tbody>
{% for ps in plannedsessions %}
<tr>
<td>
{% if completeness|lookup:ps.id == 'not done' %}
<a class="white dot" href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ rower.id }}/session/{{ ps.id }}">&nbsp;</a>
{% elif completeness|lookup:ps.id == 'completed' %}
<a class="green dot" href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ rower.id }}/session/{{ ps.id }}">&nbsp;</a>
{% elif completeness|lookup:ps.id == 'partial' %}
<a class="orange dot" href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ rower.id }}/session/{{ ps.id }}">&nbsp;</a>
{% else %}
<a class="red dot" href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ rower.id }}/session/{{ ps.id }}">&nbsp;</a>
{% endif %}
</td>
<td> {{ ps.startdate|date:"Y-m-d" }} </td>
<td> {{ ps.enddate|date:"Y-m-d" }} </td>
<td>
{% if ps.name != '' %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}">{{ ps.name }}</a>
{% else %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}">Unnamed Session</a>
{% endif %}
</td>
<td> {{ ps.sessiontype }} </td>
<td>
{% if ps.manager == request.user %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}/edit">Edit</a>
{% else %}
&nbsp;
{% endif %}
</td>
<td> {{ ps.sessionvalue }} </td>
<td> {{ actualvalue|lookup:ps.id }}</td>
<td> {{ ps.sessionunit }} </td>
<td> {{ completiondate|lookup:ps.id|date:"Y-m-d" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
You have no planned workouts for this period. Planned workouts are created
by your coach if you are part of a team. You can create your own
planned workouts by purchasing the "Coach" or "Self-Coach" plans.
{% endif %}
</div>
</form>
{% endblock %}