Amélioration de la mise en forme des événements

This commit is contained in:
Jean-Marie Favreau 2024-01-07 14:00:01 +01:00
parent bb6bebc5a7
commit f3d4f1fef2
4 changed files with 25 additions and 15 deletions

View File

@ -717,4 +717,10 @@ aside nav a.badge {
.container-fluid article form .hidden {
display: none;
}
article article {
margin-top: 3em;
margin-bottom: 3em;
padding: 0.6em 0.2em;
}

View File

@ -19,11 +19,11 @@
</form>
</header>
<ul>
<div>
{% for obj in paginator_filter %}
<li>{% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %}</li>
<article>{% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %}</article>
{% endfor %}
</ul>
</div>
<footer>
<span>
{% if paginator_filter.has_previous %}

View File

@ -30,13 +30,13 @@
{% if has_results %}
<div id="results">
<p>{{ paginator_filter.paginator.count }} événement{{paginator_filter.object_list.count | pluralize }} correspond{{paginator_filter.object_list.count | pluralize:"ent" }} à la recherche.</p>
<ul>
<div>
{% for obj in paginator_filter %}
<li>
<article>
{% include "agenda_culturel/single-event/event-in-flat-list-inc.html" with event=obj %}
</li>
</article>
{% endfor %}
</ul>
</div>
{% if paginator_filter.paginator.num_pages != 1 %}
<footer>
<span>

View File

@ -2,14 +2,17 @@
{% load cat_extra %}
{% load event_extra %}
<p>{{ event.category | small_cat }}
<header>{{ event.category | small_cat }}
{{ event|picto_status }}
<a href="{{ event.get_absolute_url }}">
{% if event.title_hl %}{{ event.title_hl | safe }}{% else %}{{ event.title }}{% endif %}</a></p>
<p class="subentry-search">{% picto_from_name "calendar" %}
{% if event.end_day %}du{% else %}le{% endif %}
{% include "agenda_culturel/date-times-inc.html" with event=event %}
</header>
<p class="subentry-search"></p>
{% picto_from_name "map-pin" %}
{% if event.location_hl %}{{ event.location_hl | safe }}{% else %}{{ event.location }}{% endif %}</p>
{% if event.has_recurrences %}
<p class="subentry-search">
{% picto_from_name "repeat" %}
@ -19,7 +22,6 @@
{% endfor %}
</p>
{% endif %}
{% if event.location_hl %}{{ event.location_hl | safe }}{% else %}{{ event.location }}{% endif %}</p>
<p class="subentry-search">
{% picto_from_name "tag" %}
{% for tag in event.tags %}
@ -28,11 +30,13 @@
{% endfor %}
</p>
<div class="description">
{% if event.description_hl %}{{ event.description_hl | safe }}{% else %}{% if event.description %}{{ event.description |truncatewords:60 }}{% else %}<em>pas de description</em>{% endif %}{% endif %}
{% if event.description_hl %}{{ event.description_hl | safe }} [...]{% else %}{% if event.description %}{{ event.description |truncatewords:60 }}{% else %}<em>pas de description</em>{% endif %}{% endif %}
{% if user.is_authenticated %}
<div class="buttons">
{% include "agenda_culturel/edit-buttons-inc.html" with event=event %}
</div>
{% endif %}
</div>
{% if user.is_authenticated %}
<footer>
<div class="buttons">
{% include "agenda_culturel/edit-buttons-inc.html" with event=event %}
</div>
</footer>
{% endif %}