Amélioration de la navigation
This commit is contained in:
parent
ea483c9c37
commit
427272fde1
@ -23,14 +23,17 @@
|
|||||||
|
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
||||||
{% cache cache_timeout upcoming user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %}
|
{% cache cache_timeout upcoming user.is_authenticated calendar.firstdate filter.to_str calendar.calendar_days_list|length LANGUAGE_CODE %}
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<header><h1 id="index-avenir">{% block title %}{% block og_title %}
|
<header><h1 id="index-avenir">{% block title %}{% block og_title %}
|
||||||
{% if calendar.calendar_days_list.0.is_now %}
|
{% if calendar.calendar_days_list.0.is_today %}
|
||||||
Événements à venir
|
Événements à venir
|
||||||
{% else %}
|
{% else %}
|
||||||
Événements du {{ calendar.calendar_days_list.0.date| date:"l j F Y" }}
|
Événements du {{ calendar.calendar_days_list.0.date| date:"l j F Y" }}
|
||||||
|
{% if calendar.calendar_days_list|length > 1 %}
|
||||||
|
et suivants
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}{% endblock %}</h1></header>
|
{% endblock %}{% endblock %}</h1></header>
|
||||||
|
|
||||||
@ -38,7 +41,7 @@
|
|||||||
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
|
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<a href="{% url 'a_venir_jour' date_pred.year date_pred.month date_pred.day %}" aria-label="dates précédentes" role="button">
|
<a href="{% if calendar.calendar_days_list|length == 1 %}{% url 'day_view' date_pred.year date_pred.month date_pred.day %}{% else %}{% url 'a_venir_jour' date_pred.year date_pred.month date_pred.day %}{% endif %}" aria-label="dates précédentes" role="button">
|
||||||
{% picto_from_name "chevrons-left" %}
|
{% picto_from_name "chevrons-left" %}
|
||||||
{% if calendar.calendar_days_list|length == 1 %}
|
{% if calendar.calendar_days_list|length == 1 %}
|
||||||
{{ date_pred }}
|
{{ date_pred }}
|
||||||
@ -57,7 +60,7 @@
|
|||||||
{% picto_from_name "chevrons-down" %}</a>
|
{% picto_from_name "chevrons-down" %}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'a_venir_jour' date_next.year date_next.month date_next.day %}" aria-label="dates suivantes" role="button">
|
<a href="{% if calendar.calendar_days_list|length == 1 %}{% url 'day_view' date_next.year date_next.month date_next.day %}{% else %}{% url 'a_venir_jour' date_next.year date_next.month date_next.day %}{% endif %}" aria-label="dates suivantes" role="button">
|
||||||
{% if calendar.calendar_days_list|length == 1 %}
|
{% if calendar.calendar_days_list|length == 1 %}
|
||||||
{{ date_next }}
|
{{ date_next }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -130,9 +133,12 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
<article>
|
<article>
|
||||||
<header><h2>Voir aussi</h2></header>
|
<header><h2>Voir aussi</h2></header>
|
||||||
{% if date_pred %}
|
<a href="{% if calendar.calendar_days_list|length == 1 %}{% url 'day_view' date_pred.year date_pred.month date_pred.day %}{% else %}{% url 'a_venir_jour' date_pred.year date_pred.month date_pred.day %}{% endif %}" aria-label="dates précédentes" role="button">
|
||||||
<a href="{% url 'a_venir_jour' date_pred.year date_pred.month date_pred.day %}" aria-label="dates précédentes" role="button">{% picto_from_name "chevrons-left" %}</a>
|
{% picto_from_name "chevrons-left" %}
|
||||||
{% endif %}
|
{% if calendar.calendar_days_list|length == 1 %}
|
||||||
|
{{ date_pred }}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
{% 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 %}
|
||||||
@ -145,9 +151,12 @@
|
|||||||
<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 }}">{{ calendar.lastdate | date:"F o" }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a role="button" data-tooltip="Copiez ce lien et importez-le dans votre agenda" href="{% url 'export_ical' %}?{{ filter.get_url }}">Export ical {% picto_from_name "calendar" %}</a>
|
<a role="button" data-tooltip="Copiez ce lien et importez-le dans votre agenda" href="{% url 'export_ical' %}?{{ filter.get_url }}">Export ical {% picto_from_name "calendar" %}</a>
|
||||||
{% if date_next %}
|
<a href="{% if calendar.calendar_days_list|length == 1 %}{% url 'day_view' date_next.year date_next.month date_next.day %}{% else %}{% url 'a_venir_jour' date_next.year date_next.month date_next.day %}{% endif %}" aria-label="dates suivantes" role="button">
|
||||||
<a href="{% url 'a_venir_jour' date_next.year date_next.month date_next.day %}" aria-label="dates suivantes" role="button">{% picto_from_name "chevrons-right" %}</a>
|
{% if calendar.calendar_days_list|length == 1 %}
|
||||||
{% endif %}
|
{{ date_next }}
|
||||||
|
{% endif %}
|
||||||
|
{% picto_from_name "chevrons-right" %}
|
||||||
|
</a>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user