Correction d'un bug d'affichage

This commit is contained in:
Jean-Marie Favreau 2025-03-09 20:37:29 +01:00
parent 3d4ff55fa7
commit 519528cf69
2 changed files with 15 additions and 14 deletions

View File

@ -408,7 +408,7 @@ class CalendarList:
def nb_days(self):
return (self.c_lastdate - self.c_firstdate).days + 1
def time_intervals_list(self, onlyfirst=False):
def time_intervals_list(self):
ds = self.calendar_days_list()
result = []
for d in ds:
@ -416,12 +416,11 @@ class CalendarList:
for t in tis:
if len(t.events) > 0:
result.append(t)
if onlyfirst:
break
return result
def time_intervals_list_first(self):
return self.time_intervals_list(True)
for i, ti in enumerate(result)[:-1]:
result[i].set_not_last()
return result
def export_to_ics(self, request):
from .models import Event

View File

@ -214,17 +214,19 @@
</dialog>
</li>
{% endfor %}
{% if day.is_today_after_events %}
<li class="line-now">
<div>
<div>{% now "H:i" %}</div>
<div class="line"></div>
</div>
</li>
{% endif %}
</ul>
{% endif %}
{% endfor %}
{% if day.is_today_after_events %}
<ul>
<li class="line-now">
<div>
<div>{% now "H:i" %}</div>
<div class="line"></div>
</div>
</li>
</ul>
{% endif %}
<p class="detail-link">
<a href="{{ day.date | url_day }}?{{ filter.get_url }}"
class="visible-link">voir en détail {% picto_from_name "chevrons-right" %}</a>