Private
Public Access
1
0

createplan page

This commit is contained in:
Sander Roosendaal
2018-09-06 15:40:10 +02:00
parent de4df4473c
commit 1567b24900
4 changed files with 207 additions and 10 deletions

View File

@@ -0,0 +1,117 @@
{% 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">
<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>
</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">
<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> {{ plan.name }}</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 %}