aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-02-29 16:14:57 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-12-21 19:43:13 +0200
commit3213fb576a0aec19527f44237fbcfe4b65af6f29 (patch)
treedb3ac7ce2c883335cd5bc6d07f51d1b906a79a7d /templates
parente02adca954f7689745f69f33f9f5f80174848836 (diff)
Show end datetime if not the same date
Diffstat (limited to 'templates')
-rw-r--r--templates/poll_vote_list.html.j215
-rw-r--r--templates/poll_vote_table.html.j214
2 files changed, 27 insertions, 2 deletions
diff --git a/templates/poll_vote_list.html.j2 b/templates/poll_vote_list.html.j2
index 2170d40..c18b3e0 100644
--- a/templates/poll_vote_list.html.j2
+++ b/templates/poll_vote_list.html.j2
@@ -9,7 +9,20 @@
{% if now.year != choice.start_datetime.year %}.{{choice.start_datetime.year}}{% endif %}
</span>
<span>
- {{ choice.start_datetime.strftime("%H:%M") }} &ndash; {{ choice.end_datetime.strftime("%H:%M") }}
+ {{ choice.start_datetime.strftime("%H:%M") }}
+ </span>
+ <span>&mdash;</span>
+ {% if not choice.ends_on_same_day() %}
+ <span>
+ {{ choice.end_datetime.strftime("%a %d.%m") }}
+ </span>
+ <span>
+ {% if now.year != choice.end_datetime.year %}.{{choice.end_datetime.year}}{% endif %}
+ </span>
+ {% endif %}
+ <span>
+ {{ choice.end_datetime.strftime("%H:%M") }}
+ </span>
</span>
</strong>
<span>
diff --git a/templates/poll_vote_table.html.j2 b/templates/poll_vote_table.html.j2
index 072d17a..cfa336a 100644
--- a/templates/poll_vote_table.html.j2
+++ b/templates/poll_vote_table.html.j2
@@ -8,7 +8,19 @@
{% if now.year != choice.start_datetime.year %}.{{choice.start_datetime.year}}{% endif %}
</span>
<span>
- {{ choice.start_datetime.strftime("%H:%M") }} &ndash; {{ choice.end_datetime.strftime("%H:%M") }}
+ {{ choice.start_datetime.strftime("%H:%M") }}
+ </span>
+ <span>&mdash;</span>
+ {% if not choice.ends_on_same_day() %}
+ <span>
+ {{ choice.end_datetime.strftime("%a %d.%m") }}
+ </span>
+ <span>
+ {% if now.year != choice.end_datetime.year %}.{{choice.end_datetime.year}}{% endif %}
+ </span>
+ {% endif %}
+ <span>
+ {{ choice.end_datetime.strftime("%H:%M") }}
</span>
<span>
<i>{{ choice.votes | length }} votes</i>