123 lines
3.4 KiB
HTML
123 lines
3.4 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load static %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}{{ plan.name }}{% endblock %}
|
|
|
|
|
|
{% block main %}
|
|
<h1>{{ plan.name }}</h1>
|
|
|
|
<ul class="main-content">
|
|
<li class="grid_2">
|
|
<p>Created by: {{ plan.owner.first_name }} {{ plan.owner.last_name }}</p>
|
|
{% if plan.url %}
|
|
<p>Link:
|
|
<a href="{{ plan.url }}" target="_">{{ plan.url }}</a>
|
|
</p>
|
|
{% endif %}
|
|
<p>Plan length: {{ plan.duration }} days</p>
|
|
{% if plan.description %}
|
|
<p>{{ plan.description }}</p>
|
|
{% endif %}
|
|
{% if plan.goal %}
|
|
<p>Goal: {{ plan.goal }}</p>
|
|
{% endif %}
|
|
{% if plan.target %}
|
|
<p>What the plan will achieve: {{ plan.target }}</p>
|
|
{% endif %}
|
|
<p>Weekly volume: {{ plan.hoursperweek }} hours per week over {{ plan.sessionsperweek }} sessions.</p>
|
|
{% if plan.price == 0 %}
|
|
<p>Price: Free</p>
|
|
{% else %}
|
|
<p>Price: {{ plan.price }}€</p>
|
|
{% endif %}
|
|
{% if rower.eurocredits and plan.price > 0 %}
|
|
<p>Your discount: {{ plan.price|discount:rower }}€</p>
|
|
<p>You pay: {{ plan.price|discounted:rower }}€</p>
|
|
{% endif %}
|
|
</li>
|
|
{% if form %}
|
|
<li class="grid_2">
|
|
<p>
|
|
When you submit this form, a training plan will be created based on {{ plan.name }}. The sessions
|
|
will be copied to your training calendar.
|
|
</p>
|
|
<p>
|
|
You can plan by when you want the plan to start or by when you want it to
|
|
be done.
|
|
</p>
|
|
<p>
|
|
If you have <a href="/rowers/createplan/">set a training target</a>, you can also ask to plan by that target. Select the
|
|
target from the targets list, and select "plan by target".
|
|
</p>
|
|
{% if plan.price|discounted:rower == 0 %}
|
|
<form enctype="multipart/form-data" action="" method="post">
|
|
{% else %}
|
|
<form enctype="multipart/form-data" action="/rowers/buyplan/{{ plan.id }}/" method="post">
|
|
{% endif %}
|
|
<table>
|
|
{{ form.as_table }}
|
|
{% if byrscoreform %}
|
|
{{ byrscoreform.as_table }}
|
|
{% endif %}
|
|
</table>
|
|
{% csrf_token %}
|
|
{% if plan.price|discounted:rower == 0 %}
|
|
<p><input class="button" type="submit" value="Create Plan and Add Sessions"></p>
|
|
{% else %}
|
|
<p><input class="button" type="submit" action="/rowers/buyplan/{{ plan.id }}/" value="BUY NOW and Add Sessions"></p>
|
|
{% endif %}
|
|
</form>
|
|
</li>
|
|
{% else %}
|
|
<li class="grid_2">
|
|
<p>
|
|
<a href="/login/?next={{ request.get_full_path }}">Log in</a> to install this plan to your training calendar.
|
|
</p>
|
|
</li>
|
|
{% endif %}
|
|
<li class="grid_4">
|
|
<h1>Plan Details</h1>
|
|
<table width="100%" class="listtable shortpadded">
|
|
<thead>
|
|
<tr>
|
|
<th>Week</th>
|
|
<th>Day 1</th>
|
|
<th>Day 2</th>
|
|
<th>Day 3</th>
|
|
<th>Day 4</th>
|
|
<th>Day 5</th>
|
|
<th>Day 6</th>
|
|
<th>Day 7</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for day in trainingdays %}
|
|
{% if day.order|weekbegin %}
|
|
<tr>
|
|
<td width="5%">
|
|
Week {{ day.week }}
|
|
</td>
|
|
{% endif %}
|
|
<td width="14%">
|
|
{% for workout in day.workouts %}
|
|
<h3>{{ workout.workoutName }}</h3>
|
|
{{ workout|steptostring|safe }}
|
|
{% endfor %}
|
|
</td>
|
|
{% if day.order|weekend %}
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_plan.html' %}
|
|
{% endblock %}
|