Amélioration navigation page jour

Fix #149
This commit is contained in:
Jean-Marie Favreau 2024-09-15 19:15:04 +02:00
parent 24c7160e70
commit 25dbf0c1ad
2 changed files with 29 additions and 30 deletions

View File

@ -31,6 +31,34 @@
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
<article>
<header>
<div class="title"><h1>{{ day | date:"l j F Y"|frdate }}</h1></div>
<div class="navigation">
{% if day|shift_day:-1|not_before_first %}
{% if day|not_after_last %}
<div>
{% with day|shift_day:-1 as pred_day %}
<a role="button" href="{% url 'day_view' pred_day.year pred_day.month pred_day.day %}?{{ filter.get_url }}">
{% picto_from_name "chevron-left" %} précédent</a>
{% endwith %}
</div>
{% endif %}
{% endif %}
{% if day|shift_day:-1|not_before_first %}
{% if day|not_after_last %}
<div class="right">
{% with day|shift_day:1 as next_day %}
<a role="button" href="{% url 'day_view' next_day.year next_day.month next_day.day %}?{{ filter.get_url }}">suivant
{% picto_from_name "chevron-right" %}
</a>
{% endwith %}
{% endif %}
</div>
{% endif %}
</div>
</header>
</article>
<div class="grid two-columns grid-reverse">
@ -66,35 +94,6 @@
</aside>
<div>
<article>
<header>
<div class="title"><h1>{{ day | date:"l j F Y"|frdate }}</h1></div>
<div class="navigation">
{% if day|shift_day:-1|not_before_first %}
{% if day|not_after_last %}
<div>
{% with day|shift_day:-1 as pred_day %}
<a role="button" href="{% url 'day_view' pred_day.year pred_day.month pred_day.day %}?{{ filter.get_url }}">
{% picto_from_name "chevron-left" %} précédent</a>
{% endwith %}
</div>
{% endif %}
{% endif %}
{% if day|shift_day:-1|not_before_first %}
{% if day|not_after_last %}
<div class="right">
{% with day|shift_day:1 as next_day %}
<a role="button" href="{% url 'day_view' next_day.year next_day.month next_day.day %}?{{ filter.get_url }}">suivant
{% picto_from_name "chevron-right" %}
</a>
{% endwith %}
{% endif %}
</div>
{% endif %}
</div>
</header>
</article>
{% if events %}
{% for event in events %}
{% include "agenda_culturel/single-event/event-in-list-by-day-inc.html" with event=event filter=filter day=day indexlink=1 %}

View File

@ -5,6 +5,7 @@
{% load tag_extra %}
<article id="event-{{ event.pk}}">
{% if indexlink %}<a role="button" class="secondary slide-buttons" href="#index-day" data-tooltip="Retour au résumé">{% picto_from_name "arrow-up" %}</a>{% endif %}
{% if event|can_show_start_time:day %}
{% if event.start_time %}
<article class='ephemeris-hour'>
@ -25,7 +26,6 @@
<h3>
{{ event|picto_status }}
<a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
{% if indexlink %}<a href="#index-day" data-tooltip="Retour au résumé">{% picto_from_name "arrow-up" %}</a>{% endif %}
</h3>
{% if event.location or event.exact_location %}
<h4>