Private
Public Access
1
0
Files
rowsandall/rowers/templates/trainingplan_create.html
2018-09-10 21:11:57 +02:00

139 lines
3.3 KiB
HTML

{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Rowsandall Training Plans{% endblock %}
{% block scripts %}
{% endblock %}
{% block content %}
<style>
#mypointer {
cursor: pointer;
}
</style>
<div class="grid_12 alpha">
{% if user.is_authenticated and user|is_manager %}
<div class="grid_2 prefix_8 dropdown">
<button class="grid_2 alpha button green small dropbtn">
{{ rower.user.first_name }} {{ rower.user.last_name }}
</button>
<div class="dropdown-content">
{% for member in user|team_members %}
<a class="button green small" href="/rowers/createplan/{{ member.id }}">{{ member.first_name }} {{ member.last_name }}</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
<div class="grid_12 alpha">
<div id="targets_table" class="grid_8 alpha">
<h1>Training Targets</h1>
{% if targets %}
<table width="100%" class="listtable shortpadded">
<thead>
<tr>
<th>Target Date</th>
<th>Name</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for target in targets %}
<tr>
<td> {{ target.date }}</td>
<td> {{ target.name }}</td>
<td> {{ target.notes }}</td>
<td> <a href="/rowers/edittarget/{{ target.id }}">Edit</a>
<td> <a href="/rowers/deletetarget/{{ target.id }}">Delete</a>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
No training targets found
{% endif %}
</div>
<div class="grid_4 omega">
<div class="grid_4" id="planform">
<h1>Add a target</h1>
<form id="newplanform"
enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ targetform.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_2 suffix_1 omega">
<input class="button green" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
<div class="grid_12 alpha">
<div id="courses_table" class="grid_8 alpha">
<h1>Plans</h1>
{% if plans %}
<table width="100%" class="listtable shortpadded">
<thead>
<tr>
<th> Start Date</th>
<th> End Date</th>
<th> Name</th>
</tr>
</thead>
<tbody>
{% for plan in plans %}
<tr>
<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>
<td> <a href="/rowers/plan/{{ plan.id }}">Plan</a></td>
<td> <a href="/rowers/deleteplan/{{ plan.id }}">Delete</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> No plans found </p>
{% endif %}
</div>
<div class="grid_4 omega">
<div class="grid_4" id="planform">
<h1>Add a plan</h1>
<form id="newplanform"
enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_2 suffix_1 omega">
<input class="button green" type="submit" value="Save">
</div>
</form>
</div>
</div>
</div>
{% endblock %}