Private
Public Access
1
0

adding plan/actual in plan view

This commit is contained in:
Sander Roosendaal
2018-09-15 22:05:29 +02:00
parent 90f022f690
commit 7fb606842d
4 changed files with 269 additions and 56 deletions

View File

@@ -40,18 +40,49 @@
{% else %}
<div class="grid_4 palegreen alpha">
{% endif %}
<div class="padded">
<h3>{{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})</h3>
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
<p><a href="/rowers/macrocycle/{{ macrocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</p>
{% else %}
<p>&nbsp;</p>
{% endif %}
<div class="padded">
<table width="100%">
<tr>
<th colspan="4">
{{ macrocycle.0.name }} ({{ macrocycle.0.startdate }} - {{ macrocycle.0.enddate }})
</th>
</tr>
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ macrocycle.0.plandistance }}</td>
<td>{{ macrocycle.0.plantime }}</td>
<td>{{ maccrocycle.0.planrscore }}</td>
<td>{{ macrocycle.0.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ macrocycle.0.actualdistance }}</td>
<td>{{ macrocycle.0.actualtime }}</td>
<td>{{ macrocycle.0.actualrscore }}</td>
<td>{{ macrocycle.0.actualtrimp }}</td>
</tr>
{% if todays_date <= macrocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/macrocycle/{{ macrocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ macrocycle.0.startdate|date:"Y-m-d" }}/{{ macrocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="grid_8 alpha">
@@ -59,55 +90,115 @@
{% if mesocycle.0.type == 'filler' %}
<div class="grid_4 filler alpha">
{% else %}
<div class="grid_4 lightsalmon alpha">
<div class="grid_4 lightsalmon alpha">
{% endif %}
<div class="padded">
<table width="100%">
<tr>
<th colspan="4">
{{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }})
</th>
</tr>
{% if mesocycle.0.plan.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ mesocycle.0.plandistance }}</td>
<td>{{ mesocycle.0.plantime }}</td>
<td>{{ mesocycle.0.planrscore }}</td>
<td>{{ mesocycle.0.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ mesocycle.0.actualdistance }}</td>
<td>{{ mesocycle.0.actualtime }}</td>
<td>{{ mesocycle.0.actualrscore }}</td>
<td>{{ mesocycle.0.actualtrimp }}</td>
</tr>
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/microcycle/{{ mesocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemicrocycle/{{ mesocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
</div>
<div class="grid_4 omega">
{% for microcycle in mesocycle.1 %}
{% if microcycle.type == 'filler' %}
<div class="grid_4 filler">
{% else %}
<div class="grid_4 paleblue ">
{% endif %}
<div class="padded">
<h3>{{ mesocycle.0.name }} ({{ mesocycle.0.startdate }} - {{ mesocycle.0.enddate }})</h3>
{% if mesocycle.0.plan.type == 'userdefined' %}
{% if todays_date <= mesocycle.0.enddate|date:"Y-m-d" %}
<p><a href="/rowers/mesocycle/{{ mesocycle.0.id }}">edit</a>
/
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}">delete</a>
/
<a href='/rowers/sessions/{{ mesocycle.0.startdate|date:"Y-m-d" }}/{{ mesocycle.0.enddate|date:"Y-m-d" }}'>sessions</a>
</p>
{% endif %}
{% else %}
<p>&nbsp;</p>
{% endif %}
<table width="100%">
<tr>
<th colspan="4">
{{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }})
</th>
</tr>
{% if microcycle.plan.type == 'userdefined' %}
<tr>
<td></td>
<td>dist (m)</td>
<td>t (min)</td>
<td>rScore</td>
<td>TRIMP</td>
</tr>
<tr>
<td>plan</td>
<td>{{ microcycle.plandistance }}</td>
<td>{{ microcycle.plantime }}</td>
<td>{{ microcycle.planrscore }}</td>
<td>{{ microcycle.plantrimp }}</td>
</tr>
<tr>
<td>actual</td>
<td>{{ microcycle.actualdistance }}</td>
<td>{{ microcycle.actualtime }}</td>
<td>{{ microcycle.actualrscore }}</td>
<td>{{ microcycle.actualtrimp }}</td>
</tr>
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4">
<a href="/rowers/microcycle/{{ microcycle.id }}">edit</a>
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
</td>
</tr>
{% endif %}
{% endif %}
</table>
</div>
</div>
<div class="grid_4 omega">
{% for microcycle in mesocycle.1 %}
{% if microcycle.type == 'filler' %}
<div class="grid_4 filler">
{% else %}
<div class="grid_4 paleblue ">
{% endif %}
<div class="padded">
<h3>{{ microcycle.name }} ({{ microcycle.startdate }} - {{ microcycle.enddate }})</h3>
{% if microcycle.plan.type == 'userdefined' %}
{% if todays_date <= microcycle.enddate|date:"Y-m-d" %}
<p>
<a href="/rowers/microcycle/{{ microcycle.id }}">edit</a>
/
<a href="/rowers/deletemicrocycle/{{ microcycle.id }}">delete</a>
/
<a href='/rowers/sessions/{{ microcycle.startdate|date:"Y-m-d" }}/{{ microcycle.enddate|date:"Y-m-d" }}'>sessions</a>
</p>
{% endif %}
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
</div>
{% endfor %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<div class="grid_12">
<p>Click on the plan cycles to edit their names, start and end dates. The gray "filler"