Private
Public Access
1
0

some more logic around fillers and start dates

This commit is contained in:
Sander Roosendaal
2018-09-10 21:11:57 +02:00
parent 357193c9c8
commit ae83fafdd0
4 changed files with 81 additions and 6 deletions

View File

@@ -29,7 +29,7 @@
are typically used to address specific phases of preparation and to indicate the racing
season and may span several months.
Meso cycles can be used to group sequences of three to five light, medium and
hard weeks. </p>
hard weeks. It is recommended to work from left to right, starting with the macro cycles.</p>
</div>
<div class="grid_4 alpha">
<h2>Macro Cycles</h2>
@@ -42,6 +42,7 @@
</div>
</div>
<div class="grid_12 alpha">
{% now "Y-m-d" as todays_date %}
{% for key,macrocycle in cycles.items %}
<div class="grid_12 alpha">
{% if macrocycle.0.type == 'filler' %}
@@ -51,9 +52,11 @@
{% 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></p>
/
<a href="/rowers/deletemacrocycle/{{ macrocycle.0.id }}">delete</a></p>
{% endif %}
</div>
</div>
<div class="grid_8 alpha">
@@ -65,9 +68,13 @@
{% 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></p>
<a href="/rowers/deletemesocycle/{{ mesocycle.0.id }}">delete</a></p>
{% endif %}
{% endif %}
</div>
</div>
<div class="grid_4 omega">
@@ -79,10 +86,14 @@
{% 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></p>
{% endif %}
{% endif %}
</div>
</div>
{% endfor %}

View File

@@ -100,8 +100,9 @@
<td> {{ plan.startdate }} </td>
<td> {{ plan.enddate }}</td>
<td><a href="/rowers/plan/{{ plan.id }}">{{ plan.name }}</a></td>
<td> <a href="/rowers/editplan/{{ plan.id }}">Edit</a>
<td> <a href="/rowers/deleteplan/{{ plan.id }}">Delete</a>
<td> <a href="/rowers/editplan/{{ plan.id }}">Edit</a></td>
<td> <a href="/rowers/plan/{{ plan.id }}">Plan</a></td>
<td> <a href="/rowers/deleteplan/{{ plan.id }}">Delete</a></td>
</tr>
{% endfor %}
</tbody>