Amélioration de la présentation de la page des jours

This commit is contained in:
Jean-Marie Favreau 2024-09-14 23:08:54 +02:00
parent 0d8366e57b
commit 062864b6e3
4 changed files with 47 additions and 36 deletions

View File

@ -830,6 +830,10 @@ form .buttons [role="button"] {
grid-template-columns: 30% auto;
align-items: center;
}
.grid.two-columns.grid-reverse {
grid-template-columns: 25% auto;
}
}
aside nav a.selected {
@ -841,6 +845,10 @@ aside nav a.badge {
float: right;
}
aside nav.paragraph li a {
display: inline-block;
}
.body-fixed {
max-height: 50vh;
overflow-y: scroll;

View File

@ -1,9 +1,9 @@
{% if event.exact_location %}
{% if nolink %}
{{ event.exact_location.name }}, {{ event.exact_location.city }}
{{ event.exact_location.name }}{% if not nocity %}, {{ event.exact_location.city }}{% endif %}
{% else %}
<a href="{% url 'view_place' event.exact_location.pk %}">{{ event.exact_location.name }}, {{ event.exact_location.city }}</a>
<a href="{% url 'view_place' event.exact_location.pk %}">{{ event.exact_location.name }}{% if not nocity %}, {{ event.exact_location.city }}{% endif %}</a>
{% endif %}
{% else %}
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}

View File

@ -33,7 +33,38 @@
<div class="grid two-columns">
<div class="grid two-columns grid-reverse">
<aside>
<article>
<header>
<h2 id="index-day">En résumé</h2>
{% if events|length == 0 %}
<p class="remarque">Il n'y a pas d'événement le {{ day }}</p>
{% else %}
<nav class="paragraph">
<ul>
{% for event in events %}
<li id="index-event-{{ event.pk }}">{{ event.category | circle_cat:event.has_recurrences }}
{% if event.start_day == day and event.start_time %}
{{ event.start_time }}
{% endif %} {{ event|picto_status }} <a href="#event-{{ event.pk }}">{{ event.title }},</a>
{% include "agenda_culturel/event-location-inc.html" with event=event nolink=1 nocity=1 %}
</li>
{% endfor %}
</ul>
</nav>
{% endif %}
</header>
</article>
<article>
<header>
<h2>Voir aussi</h2>
</header>
<a role="button" href="{% url 'week_view' day.year day|week %}?{{ filter.get_url }}">Toute la semaine</a>
</article>
</aside>
<div>
<article>
<header>
@ -66,7 +97,7 @@
{% 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 %}
{% include "agenda_culturel/single-event/event-in-list-by-day-inc.html" with event=event filter=filter day=day indexlink=1 %}
{% endfor %}
{% else %}
<article>
@ -80,37 +111,7 @@
</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.pk|stringformat:"i" 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>{{ category.0.name }}&nbsp;: {{ category.1 }}</a>
</li>
{% endwith %}
{% endwith %}
{% endfor %}
</ul>
</nav>
{% endif %}
</header>
</article>
<article>
<header>
<h2>Voir aussi</h2>
</header>
<a role="button" href="{% url 'week_view' day.year day|week %}?{{ filter.get_url }}">Toute la semaine</a>
</article>
</aside>
</div>

View File

@ -4,7 +4,7 @@
{% load event_extra %}
{% load tag_extra %}
<article>
<article id="event-{{ event.pk}}">
{% if event|can_show_start_time:day %}
{% if event.start_time %}
<article class='ephemeris-hour'>
@ -24,7 +24,9 @@
{% if event.location or event.exact_location %}<hgroup>{% endif %}
<h3>
{{ event|picto_status }}
<a href="{{ event.get_absolute_url }}">{{ event.title }}</a></h3>
<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>
{% picto_from_name "map-pin" %}