diff options
| author | Jan T <jan@jantuomi.fi> | 2024-02-28 17:32:01 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-12-21 19:43:13 +0200 |
| commit | b6bc5c5794b4df182175da34e6b08298084c0324 (patch) | |
| tree | 501362805ac744eb71e0e9d7b70addb9f0c9ae99 /templates/poll_vote_list.html.j2 | |
Initial commit
Diffstat (limited to 'templates/poll_vote_list.html.j2')
| -rw-r--r-- | templates/poll_vote_list.html.j2 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/poll_vote_list.html.j2 b/templates/poll_vote_list.html.j2 new file mode 100644 index 0000000..37b9406 --- /dev/null +++ b/templates/poll_vote_list.html.j2 @@ -0,0 +1,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> + |
