Private
Public Access
1
0

attach workouts to sessions version 0

This commit is contained in:
Sander Roosendaal
2018-02-07 16:37:03 +01:00
parent d3448c66f1
commit 91d59dfc28
13 changed files with 483 additions and 61 deletions

View File

@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Planned Session{% endblock %}
@@ -10,7 +11,7 @@
</div>
<div id="left" class="grid_6 alpha">
<h1>Session {{ psdict.name.1 }}</h1>
<table class="listtable shortpadded">
<table class="listtable shortpadded" width="80%">
{% for attr in attrs %}
{% for key,value in psdict.items %}
{% if key == attr %}
@@ -21,9 +22,36 @@
{% endfor %}
{% endfor %}
</table>
<h1>Result</h1>
<p>Status: {{ status }}</p>
<p>Percentage complete: {{ ratio }} </p>
</div>
<div id="right" class="grid_6 omega">
<p>&nbsp;</p>
<h1>Workouts attached</h1>
<table class="listtable shortpadded" width="80%">
<thead>
<tr>
<th>Date</th>
<th>Name</th>
<th>Distance</th>
<th>Duration</th>
</tr>
</thead>
<tbody>
{% for workout in workouts %}
<tr>
<td> {{ workout.date|date:"Y-m-d" }} </td>
<td>
<a href={% url manager.defaultlandingpage id=workout.id %}>
{{ workout.name }}
</a>
</td>
<td> {{ workout.distance }}m</td>
<td> {{ workout.duration |durationprint:"%H:%M:%S.%f" }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>