Skip to content

Commit 86cb81f

Browse files
committed
Fix Duplicate Year String At Render Template
Fix incorrect rendering logic at template ensuring: • Single day events only render one year string. • Multi-day events only render end-date-year string only if it's valid.
1 parent 7769a36 commit 86cb81f

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

templates/events/includes/time_tag.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
{{ next_time.dt_start|date:"Y" }}
55
</span>
66

7-
<span id="start-{{ object.id }}"{% if scheduled_end_this_year %} class="say-no-more"{% endif %}>
8-
{{ next_time.dt_start|date:"Y" }}
9-
</span>
10-
117
{% if not next_time.all_day %}
128
{{ next_time.dt_start|date:"fA"|lower }} {{ next_time.dt_start|date:"e" }}
139
{% if next_time.valid_dt_end %} – {{ next_time.dt_end|date:"fA"|lower }}
@@ -23,10 +19,10 @@
2319

2420
{% if next_time.valid_dt_end %} &ndash;
2521
{{ next_time.dt_end|date:"d N" }}
22+
<span id="end-{{ object.id }}"{% if scheduled_end_this_year %} class="say-no-more"{% endif %}>
23+
{{ next_time.dt_end|date:"Y" }}
24+
</span>
2625
{% endif %}
2726

28-
<span id="end-{{ object.id }}"{% if scheduled_end_this_year %} class="say-no-more"{% endif %}>
29-
{{ next_time.dt_end|date:"Y" }}
30-
</span>
3127
</time>
3228
{% endif %}

0 commit comments

Comments
 (0)