Show end dates or duration in event list

Closes: #85
This commit is contained in:
Edward Betts 2023-12-28 20:14:03 +00:00
parent c3a9d8cbfa
commit 81f6d457b5

View file

@ -160,7 +160,7 @@
{% else %} {% else %}
{% set cell_bg = " bg-warning-subtle" if delta == "today" else "" %} {% set cell_bg = " bg-warning-subtle" if delta == "today" else "" %}
<div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% else %}{{ cell_bg }}{% endif %}"> <div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% else %}{{ cell_bg }}{% endif %}">
<div class="col-md-3{{ cell_bg }}"> <div class="col-md-2{{ cell_bg }}">
{{event.as_date.strftime("%a, %d, %b")}} {{event.as_date.strftime("%a, %d, %b")}}
&nbsp; &nbsp;
&nbsp; &nbsp;
@ -170,7 +170,13 @@
{{event.display_timezone or ""}} {{event.display_timezone or ""}}
</div> </div>
<div class="col-md-8 text-start"> <div class="col-md-2{{ cell_bg }}">
{% if event.end_date and event.end_as_date != event.as_date %}
{{event.end_date}}
{% endif %}
</div>
<div class="col-md-7 text-start">
{% if event.url %}<a href="{{ event.url }}">{% endif %} {% if event.url %}<a href="{{ event.url }}">{% endif %}
{{ event_labels.get(event.name) or event.name }} {{ event_labels.get(event.name) or event.name }}
{%- if event.title -%}: {{ event.title }}{% endif %} {%- if event.title -%}: {{ event.title }}{% endif %}