blob: 9b10f2db7469bf48292c8b4e6664cefe268d28cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
{% extends 'base/form.html' %}
{% block title %}Record {{ workout.name }}{% endblock %}
{% block form %}
<div>
{% for exercise in workout.exercises %}
{{ form.exercises.entries[loop.index0]['id'] }}
<h1 class="title is-4 has-text-black">{{ exercise.name }}</h1>
<div>
<table class="table is-fullwidth is-hoverable">
<thead>
<th>Set</th>
{% if exercise.type == 'time' %}
<th>Timer</th>
{% else %}
<th>lbs</th>
<th>Reps</th>
{% endif %}
<th>Done</th>
</thead>
<tbody>
{% for set in form.exercises.entries[loop.index0].sets.entries %}
<tr>
<th>{{ loop.index }}</th>
{% if exercise.type == 'time' %}
<td>
<div class="timer">
<a class="button" onClick="onClickPausePlayTimer(this)">
<span class="icon is-small">
<i class="fa fa-play"></i>
</span>
</a>
<span class="{{ ['units'] }}">
</span>
</div>
</td>
{% else %}
<td>{{ set['lbs'](class_='input') }}</td>
<td>{{ set['units'](class_='input') }}</td>
{% endif %}
<td>
<a class="button" onClick="onClickSetCheck(this)">
<span class="icon is-small">
<i class="fa fa-check"></i>
</span>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="buttons is-centered">
<a class="button is-primary" onClick="onClickAddSet(this)">
<span class="icon is-small">
<i class="fa fa-plus"></i>
</span>
<span>Add Set</span>
</a>
</div>
<hr>
</div>
{% endfor %}
</div>
<div class="field is-horizontal is-grouped is-grouped-right">
<button class="button is-success ">
<span class="icon is-small">
<i class="fa fa-check"></i>
</span>
<span>Finish Workout</span>
</button>
</div>
<script async type="text/javascript" src="/static/js/record.js"></script>
{% endblock %}
|