agenda_culturel/src/agenda_culturel/templates/agenda_culturel/page-day.html

107 lines
3.5 KiB
HTML

{% extends "agenda_culturel/page.html" %}
{% load i18n %}
{% load cat_extra %}
{% load event_extra %}
{% load utils_extra %}
{% load static %}
{% block entete_header %}
{% css_categories %}
<script src="{% static 'js/filters.js' %}"></script>
{% endblock %}
{% block title %}
{{ day | date:"l j F Y"|frdate }}
{% endblock %}
{% block content %}
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
<div class="grid two-columns">
<div>
<article>
<header>
<div class="title"><h1>{{ day | date:"l j F Y"|frdate }}</h1></div>
<div class="navigation">
<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>
<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 %}
</div>
</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 %}
{% endfor %}
{% else %}
<article>
{% if filter.is_active %}
<em>Il n'y a pas d'événement prévu à cette date correspondant au filtre sélectionné.</em>
{% else %}
<em>Il n'y a pas d'événement prévu à cette date.</em>
{% endif %}
</article>
{% endif %}
</div>
<aside>
<article>
<header>
<h2>En résumé</h2>
{% if events|length == 0 %}
<p class="remarque">Il n'y a pas d'événement le {{ day }}</p>
{% else %}
<nav>
<ul>
{% for category in categories %}
{% with category.0.name as idcat %}
{% with filter.get_url_without_filters|add:"?category="|add:idcat as cat_url %}
<li>
<a class="small-cat contrast selected" role="button" href="{{ cat_url }}"><span class="cat {{ category.0.css_class }}"></span>{{ idcat }}&nbsp;: {{ category.1 }}</a>
</li>
{% endwith %}
{% endwith %}
{% endfor %}
</ul>
</nav>
{% endif %}
</header>
</article>
<article>
<header>
<h2>Voir aussi</h2>
</header>
<div class="buttons">
<a role="button" href="{% url 'day_view_ical' day.year day.month day.day%}" >Exporter ical {% picto_from_name "calendar" %}</a>
<a role="button" href="{% url 'week_view' day.year day|week %}?{{ filter.get_url }}">Toute la semaine</a>
</div>
</article>
</aside>
</div>
{% endblock %}