Newer
Older
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
{% extends "_base.html" %}
{# probably a little overkill ;p #}
{% block content %}
{% for (name, wk_key) in (('Week 1', 'week1'), ('Week 2', 'week2')) %}
<h2 id="{{wk_key}}">{{name}}</h2>
<table class="table text-center">
<thead>
<tr class="thead-dark">
<th></th>
{% for day in days %}
<th>{{day|title}}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for (session, key) in sessions.items() %}
<tr>
<th class="table-dark">{{session}}</th>
{% if key in breaks %}
<td class="table-secondary" colspan="5">{{key|title}}</td>
{% else %}
{% for day in days %}
{% set sess_slug = '{}_{}'.format(day, key) -%}
{% if sess_slug in data[wk_key] %}
<td>{{data[wk_key][sess_slug][0]}}</td>
{% else %}
<td class="table-warning">Not defined</td>
{% endif %}
{% endfor %}
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% endblock %}