138 lines
3.7 KiB
HTML
138 lines
3.7 KiB
HTML
{% extends "base.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Workouts{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grid_12">
|
|
|
|
Select start and end date for a date range:
|
|
<div class="grid_4 alpha">
|
|
|
|
<form enctype="multipart/form-data" action="/rowers/list-workouts/" method="post">
|
|
|
|
<table>
|
|
{{ dateform.as_table }}
|
|
</table>
|
|
{% csrf_token %}
|
|
</div>
|
|
<div class="grid_2 suffix_6 omega">
|
|
<input name='daterange' class="button green" type="submit" value="Submit"> </form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="grid_8 alpha">
|
|
<h3>My Workouts</h3>
|
|
|
|
{% if workouts %}
|
|
<table width="100%" class="listtable">
|
|
<thead>
|
|
<tr>
|
|
<th> Date</th>
|
|
<th> Time</th>
|
|
<th> Name</th>
|
|
<th> Type</th>
|
|
<th> Distance </th>
|
|
<th> Duration </th>
|
|
<th> Avg HR </th>
|
|
<th> Max HR </th>
|
|
<th> Delete</th>
|
|
<th> Export</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for workout in workouts %}
|
|
<tr>
|
|
<td> {{ workout.date |truncatechars:15}} </td>
|
|
<td> {{ workout.starttime }} </td>
|
|
<td>
|
|
{% if user.rower.rowerplan == 'pro' %}
|
|
<a href="/rowers/workout/{{ workout.id }}/edit">{{ workout.name }}</a> </td>
|
|
{% else %}
|
|
<a href="/rowers/workout/{{ workout.id }}/edit">{{ workout.name }}</a> </td>
|
|
{% endif %}
|
|
<td> {{ workout.workouttype }} </td>
|
|
<td> {{ workout.distance }}m</td>
|
|
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
|
|
<td> {{ workout.averagehr }} </td>
|
|
<td> {{ workout.maxhr }} </td>
|
|
<td> <a class="button red small" href="/rowers/workout/{{ workout.id }}/deleteconfirm">Delete</td>
|
|
<td> <a class="button blue small" href="/rowers/workout/{{ workout.id }}/export">Export</a> </td>
|
|
<td> <a class="button blue small" href="/rowers/workout/{{ workout.id }}/flexchart">Flex</a> </td>
|
|
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p> No workouts found </p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="grid_4 omega">
|
|
<div class="grid_4" id="announcements">
|
|
{% if announcements %}
|
|
<h3>What's New?</h3>
|
|
{% for a in announcements %}
|
|
<div class="site-announcement-box">
|
|
<div class="site-announcement">
|
|
<i>{{ a.created }}:</i>
|
|
{{ a.announcement|urlize }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
<p> </p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="grid_4" id="about">
|
|
<h3>About</h3>
|
|
<p>This site is a beta site, pioneering rowing data visualization and analysis. No warranties. The site's author is
|
|
Sander Roosendaal. A Masters rower.
|
|
|
|
Read his <a href="http://blog.rowsandall.com/">blog</a>
|
|
</p>
|
|
<div style="text-align: right; padding: 2em">
|
|
<a href="http://blog.rowsandall.com/">
|
|
<img src="/static/img/sander.jpg" width="80"></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="grid_5 alpha">
|
|
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
|
method="get" accept-charset="utf-8">
|
|
<div class="grid_3 prefix_1 alpha">
|
|
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
|
</div>
|
|
<div class="grid_1 omega">
|
|
<button class="button blue small" type="submit">
|
|
Search
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="grid_2 prefix_1 omega">
|
|
<span class="button gray small">
|
|
{% if workouts.has_previous %}
|
|
<a class="wh" href="?page={{ workouts.previous_page_number }}"><</a>
|
|
{% endif %}
|
|
|
|
<span>
|
|
Page {{ workouts.number }} of {{ workouts.paginator.num_pages }}.
|
|
</span>
|
|
|
|
{% if workouts.has_next %}
|
|
<a class="wh" href="?page={{ workouts.next_page_number }}">></a>
|
|
{% endif %}
|
|
</span>
|
|
|
|
|
|
{% endblock %}
|