From 5c64529e77f150f8b83930f17e792b2cb8e38a87 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 29 Feb 2024 21:10:43 +0200 Subject: Add whole day mode, various improvements --- templates/poll_choice_datetime_range.html.j2 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 templates/poll_choice_datetime_range.html.j2 (limited to 'templates/poll_choice_datetime_range.html.j2') diff --git a/templates/poll_choice_datetime_range.html.j2 b/templates/poll_choice_datetime_range.html.j2 new file mode 100644 index 0000000..ddfa970 --- /dev/null +++ b/templates/poll_choice_datetime_range.html.j2 @@ -0,0 +1,24 @@ + +{{ choice.start_datetime.strftime("%a %d.%m") }} + + + {% if now.year != choice.start_datetime.year %}.{{choice.start_datetime.year}}{% endif %} + + + {% if not poll.is_whole_day %}{{ choice.start_datetime.strftime("%H:%M") }}{% endif %} + +{% if (poll.is_whole_day and not choice.ends_on_same_day()) or (not poll.is_whole_day and not choice.ends_at_same_datetime()) %} + +{% endif %} + +{% if not choice.ends_on_same_day() %} + + {{ choice.end_datetime.strftime("%a %d.%m") }} + + + {% if now.year != choice.end_datetime.year %}.{{choice.end_datetime.year}}{% endif %} + +{% endif %} + + {% if not poll.is_whole_day %}{{ choice.end_datetime.strftime("%H:%M") }}{% endif %} + -- cgit v1.3