diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2024-02-29 21:10:43 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-12-21 19:43:13 +0200 |
| commit | 5c64529e77f150f8b83930f17e792b2cb8e38a87 (patch) | |
| tree | 89b28f50812fb735dfdaa0bca24764959168d84d /templates/poll_choice_datetime_range.html.j2 | |
| parent | 3661c687f0c54bd9f4e1075aa651bc612d634a13 (diff) | |
Add whole day mode, various improvements
Diffstat (limited to 'templates/poll_choice_datetime_range.html.j2')
| -rw-r--r-- | templates/poll_choice_datetime_range.html.j2 | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ +<span> +{{ choice.start_datetime.strftime("%a %d.%m") }} +</span> +<span> + {% if now.year != choice.start_datetime.year %}.{{choice.start_datetime.year}}{% endif %} +</span> +<span> + {% if not poll.is_whole_day %}{{ choice.start_datetime.strftime("%H:%M") }}{% endif %} +</span> +{% 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()) %} +<span>—</span> +{% endif %} + +{% 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> + {% if not poll.is_whole_day %}{{ choice.end_datetime.strftime("%H:%M") }}{% endif %} +</span> |
