blob: 2170d40612c3074102da251d7ff8bcd8a7206a6f (
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
|
<div class="vote-list">
{% for choice in choices %}
<div>
<label for="choice_{{ choice.id }}">
<input type="checkbox" name="choice_{{ choice.id }}" id="choice_{{ choice.id }}">
<strong>
{{ choice.start_datetime.strftime("%a %d.%m") }}
<span>
{% if now.year != choice.start_datetime.year %}.{{choice.start_datetime.year}}{% endif %}
</span>
<span>
{{ choice.start_datetime.strftime("%H:%M") }} – {{ choice.end_datetime.strftime("%H:%M") }}
</span>
</strong>
<span>
<i>{{ choice.votes | length }} votes</i>
</span>
<div>
{% if choice.votes | length != 0 %}
Voted by: {% for vote in choice.votes %}{{ vote.voter_name }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %}
</div>
</label>
</div>
<p></p>
{% endfor %}
</div>
<div>
<label for="voter_name" hidden>Your name</label>
<input type="text" name="voter_name" placeholder="Your name" required>
<input class="green" type="submit" value="Submit">
</div>
|