On ajoute des liens qui focalisent sur la partie du calendrier qui nous intéresse le plus: aujourd'hui, ou la semaine d'où l'on vient

Fix #63
This commit is contained in:
Jean-Marie Favreau 2024-01-03 11:49:39 +01:00
parent dddee846b1
commit 70d65bfcc1
3 changed files with 10 additions and 10 deletions

View File

@ -31,11 +31,11 @@
<div class="title"><h1>{{ calendar.firstdate | date:"F o" }}</h1></div> <div class="title"><h1>{{ calendar.firstdate | date:"F o" }}</h1></div>
<div class="navigation"> <div class="navigation">
<div> <div>
<a role="button" href="{% url 'month_view' calendar.previous_month.year calendar.previous_month.month %}?{{ filter.get_url }}"> <a role="button" href="{% url 'month_view' calendar.previous_month.year calendar.previous_month.month %}?{{ filter.get_url }}#today">
{% picto_from_name "chevron-left" %} précédent</a> {% picto_from_name "chevron-left" %} précédent</a>
</div> </div>
<div class="right"> <div class="right">
<a role="button" href="{% url 'month_view' calendar.next_month.year calendar.next_month.month %}?{{ filter.get_url }}">suivant <a role="button" href="{% url 'month_view' calendar.next_month.year calendar.next_month.month %}?{{ filter.get_url }}#today">suivant
{% picto_from_name "chevron-right" %} {% picto_from_name "chevron-right" %}
</a> </a>
</div> </div>
@ -46,7 +46,7 @@
{% for d in calendar.calendar_days_list %} {% for d in calendar.calendar_days_list %}
{% if forloop.counter0|divisibleby:7 %} {% if forloop.counter0|divisibleby:7 %}
{% if not forloop.first %}</div><div class="grid week-in-month">{% endif %} {% if not forloop.first %}</div><div class="grid week-in-month">{% endif %}
<div class="entete-semaine"><h2><a href="{% url 'week_view' calendar.year d.week %}?{{ filter.get_url }}">Semaine {{ d.week }}</a></h2></div> <div id="week-{{ d.date.isocalendar.1 }}" class="entete-semaine"><h2><a href="{% url 'week_view' calendar.year d.week %}?{{ filter.get_url }}#today">Semaine {{ d.week }}</a></h2></div>
{% endif %} {% endif %}
{% include "agenda_culturel/day-inc.html" with day=d resume=1 fixed_style=calendar.all_in_past filter=filter headers="h3" %} {% include "agenda_culturel/day-inc.html" with day=d resume=1 fixed_style=calendar.all_in_past filter=filter headers="h3" %}
{% endfor %} {% endfor %}
@ -60,7 +60,7 @@
<footer> <footer>
{% if calendar.today_in_calendar %} {% if calendar.today_in_calendar %}
<a role="button" href="{% url 'aujourdhui' %}?{{ filter.get_url }}">Aujourd'hui</a> <a role="button" href="{% url 'aujourdhui' %}?{{ filter.get_url }}">Aujourd'hui</a>
<a role="button" href="{% url 'cette_semaine' %}?{{ filter.get_url }}">Cette semaine</a> <a role="button" href="{% url 'cette_semaine' %}?{{ filter.get_url }}#today">Cette semaine</a>
{% endif %} {% endif %}
</footer> </footer>
</article> </article>

View File

@ -34,11 +34,11 @@ Semaine du {{ calendar.calendar_days_list.0.date }}
<div class="title"><h1>Semaine du {{ calendar.calendar_days_list.0.date }}</h1></div> <div class="title"><h1>Semaine du {{ calendar.calendar_days_list.0.date }}</h1></div>
<div class="navigation"> <div class="navigation">
<div> <div>
<a role="button" href="{% url 'week_view' calendar.previous_week.year calendar.previous_week|week %}?{{ filter.get_url }}"> <a role="button" href="{% url 'week_view' calendar.previous_week.year calendar.previous_week|week %}?{{ filter.get_url }}#today">
{% picto_from_name "chevron-left" %} précédente</a> {% picto_from_name "chevron-left" %} précédente</a>
</div> </div>
<div class="right"> <div class="right">
<a role="button" href="{% url 'week_view' calendar.next_week.year calendar.next_week|week %}?{{ filter.get_url }}">suivante <a role="button" href="{% url 'week_view' calendar.next_week.year calendar.next_week|week %}?{{ filter.get_url }}#today">suivante
{% picto_from_name "chevron-right" %} {% picto_from_name "chevron-right" %}
</a> </a>
</div> </div>
@ -61,9 +61,9 @@ Semaine du {{ calendar.calendar_days_list.0.date }}
{% if calendar.today_in_calendar %} {% if calendar.today_in_calendar %}
<a role="button" href="{% url 'aujourdhui' %}?{{ filter.get_url }}">Aujourd'hui</a> <a role="button" href="{% url 'aujourdhui' %}?{{ filter.get_url }}">Aujourd'hui</a>
{% endif %} {% endif %}
<a role="button" href="{% url 'month_view' calendar.firstdate.year calendar.firstdate.month %}?{{ filter.get_url }}">{{ calendar.firstdate | date:"F o" }}</a> <a role="button" href="{% url 'month_view' calendar.firstdate.year calendar.firstdate.month %}?{{ filter.get_url }}#week-{{ calendar.calendar_days_list.0.date.isocalendar.1 }}">{{ calendar.firstdate | date:"F o" }}</a>
{% if calendar.firstdate.month != calendar.lastdate.month %} {% if calendar.firstdate.month != calendar.lastdate.month %}
<a role="button" href="{% url 'month_view' calendar.lastdate.year calendar.lastdate.month %}?{{ filter.get_url }}">{{ calendar.lastdate | date:"F o" }}</a> <a role="button" href="{% url 'month_view' calendar.lastdate.year calendar.lastdate.month %}?{{ filter.get_url }}#week-{{ calendar.calendar_days_list.0.date.isocalendar.1 }}">{{ calendar.lastdate | date:"F o" }}</a>
{% endif %} {% endif %}
</footer> </footer>
</article> </article>

View File

@ -33,8 +33,8 @@
<ul class="menu"> <ul class="menu">
<li><a href="{% url 'event_search' %}">Rechercher {% picto_from_name "search" %}</a></li> <li><a href="{% url 'event_search' %}">Rechercher {% picto_from_name "search" %}</a></li>
<li><a href="{% url 'aujourdhui' %}">Aujourd'hui</a></li> <li><a href="{% url 'aujourdhui' %}">Aujourd'hui</a></li>
<li><a href="{% url 'cette_semaine' %}">Cette semaine</a></li> <li><a href="{% url 'cette_semaine' %}#today">Cette semaine</a></li>
<li><a href="{% url 'ce_mois_ci' %}">Ce mois-ci</a></li> <li><a href="{% url 'ce_mois_ci' %}#today">Ce mois-ci</a></li>
</ul> </ul>
</div> </div>
<nav class="container-fluid"> <nav class="container-fluid">