L'interface de modification reprend la présentation de l'interface de modération
Fix #290
This commit is contained in:
parent
f1ef693cd7
commit
ad089b87ba
@ -1,6 +1,7 @@
|
||||
{% extends "agenda_culturel/page.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% load cat_extra %}
|
||||
{% load utils_extra %}
|
||||
|
||||
{% block title %}{% block og_title %}
|
||||
{% if object %}{% if form.is_clone_from_url %}
|
||||
@ -25,6 +26,7 @@ Duplication de {% else %}
|
||||
|
||||
{% block entete_header %}
|
||||
<script src="{% static 'choicejs/choices.min.js' %}"></script>
|
||||
{% css_categories %}
|
||||
|
||||
<script src="{% url 'jsi18n' %}"></script>
|
||||
<script src="/static/admin/js/vendor/jquery/jquery.js"></script>
|
||||
@ -42,27 +44,69 @@ Duplication de {% else %}
|
||||
<script src="{% static 'js/django_better_admin_arrayfield.min.js' %}"></script>
|
||||
<script src="{% static 'js/adjust_datetimes.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% block fluid %}{% endblock %}
|
||||
|
||||
{% block fluid %}{% if object %}-fluid{% endif %}{% endblock %}
|
||||
|
||||
{% block sidemenu-bouton %}
|
||||
<li><a href="#event-preview" aria-label="Voir l'événement">{% picto_from_name "chevron-up" %}</a></li>
|
||||
<li><a href="#event_form" aria-label="Aller au formulaire">{% picto_from_name "chevron-down" %}</a></li>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% load static_content_extra %}
|
||||
|
||||
{% if object %}
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1>{% if form.is_clone_from_url %}
|
||||
Création d'une copie locale de {% else %}
|
||||
{% if form.is_simple_clone_from_url %}
|
||||
Duplication de {% else %}
|
||||
Édition de l'événement{% endif %}{% endif %} {{ object.title }} ({{ object.start_day }})</h1>
|
||||
{% if form.is_simple_clone_from_url %}
|
||||
<p>Vous allez créer une copie de l'événement original qui n'aura plus aucun lien avec ce dernier. Cette possibilité
|
||||
est généralement utilisée pour créer un événement semblable à une date différente, par exemple.
|
||||
</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="grid moderate-preview">
|
||||
|
||||
<div id="event-preview">
|
||||
{% include "agenda_culturel/single-event/event-single-inc.html" with event=event nobuttons=1 %}
|
||||
|
||||
{% with event.get_concurrent_events as concurrent_events %}
|
||||
{% if concurrent_events %}
|
||||
<article>
|
||||
<header>
|
||||
<h2>En même temps</h2>
|
||||
<p class="remarque">{% if concurrent_events|length > 1 %}Plusieurs événements se déroulent en même temps.{% else %}Un autre événement se déroule en même temps.{% endif %}</p>
|
||||
</header>
|
||||
<ul>
|
||||
{% for e in concurrent_events %}
|
||||
<li>
|
||||
{{ e.category|circle_cat }} {% if e.start_time %}{{ e.start_time }}{% else %}<em>toute la journée</em>{% endif %} <a href="{{ e.get_absolute_url }}">{{ e.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
<article>
|
||||
{% include "agenda_culturel/event-info-inc.html" %}
|
||||
</article>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<article id="event_form">
|
||||
<header>
|
||||
{% if object %}
|
||||
<h1>{% if form.is_clone_from_url %}
|
||||
Création d'une copie locale de {% else %}
|
||||
{% if form.is_simple_clone_from_url %}
|
||||
Duplication de {% else %}
|
||||
Édition de l'événement{% endif %}{% endif %} {{ object.title }} ({{ object.start_day }})</h1>
|
||||
{% if form.is_simple_clone_from_url %}
|
||||
<p>Vous allez créer une copie de l'événement original qui n'aura plus aucun lien avec ce dernier. Cette possibilité
|
||||
est généralement utilisée pour créer un événement semblable à une date différente, par exemple.
|
||||
</p>
|
||||
{% endif %}
|
||||
<h2>Édition des informations</h2>
|
||||
{% else %}
|
||||
|
||||
{% if from_import %}
|
||||
<h1>Ajuster l'événement importé</h1>
|
||||
{% else %}
|
||||
@ -81,14 +125,19 @@ Duplication de {% else %}
|
||||
{{ form }}
|
||||
<div class="grid buttons stick-bottom">
|
||||
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{{ object.get_absolute_url }}{% endif %}" role="button" class="secondary">Annuler</a>
|
||||
{% if form.is_simple_clone_from_url %}
|
||||
<input type="submit" value="Dupliquer et modérer">
|
||||
{% else %}
|
||||
<input type="submit" value="Enregistrer{% if form.is_clone_from_url %} et modérer{% endif %}">
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if object %}
|
||||
{% include "agenda_culturel/event-info-inc.html" %}
|
||||
{% endif %}
|
||||
</article>
|
||||
{% if object %}
|
||||
</article>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
const element = document.querySelector('#id_exact_location');
|
||||
|
@ -21,6 +21,11 @@
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidemenu-bouton %}
|
||||
<li><a href="#event-preview" aria-label="Voir l'événement">{% picto_from_name "chevron-up" %}</a></li>
|
||||
<li><a href="#event_form" aria-label="Aller au formulaire">{% picto_from_name "chevron-down" %}</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% load static_content_extra %}
|
||||
|
||||
@ -37,7 +42,7 @@
|
||||
|
||||
<div class="grid moderate-preview">
|
||||
|
||||
<div>
|
||||
<div id="event-preview">
|
||||
{% include "agenda_culturel/single-event/event-single-inc.html" with event=event onlyedit=1 %}
|
||||
|
||||
{% with event.get_concurrent_events as concurrent_events %}
|
||||
@ -60,10 +65,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<article id="event_form">
|
||||
<header>
|
||||
|
||||
<h2>Modification des méta-informations</h2>
|
||||
<h2>Édition des méta-informations</h2>
|
||||
{% if event.moderated_date %}
|
||||
<p class="message info">Cet événement a déjà été modéré {% if event.moderation_by_user %}par {<em>{ event.moderation_by_user.username }}</em> {% endif %}le {{ event.moderated_date }}.
|
||||
Vous pouvez bien sûr modifier de nouveau ces méta-informations en utilisant
|
||||
|
@ -23,7 +23,6 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if event.get_other_not_trash_versions|length == 0 %}<p class="remarque">Aucune autre version n'est accessible publiquement</p>{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if event.other_versions.representative and event.masked %}
|
||||
@ -144,6 +143,7 @@
|
||||
|
||||
{% include "agenda_culturel/event-date-info-inc.html" %}
|
||||
</div>
|
||||
{% if not nobuttons %}
|
||||
<div class="buttons">
|
||||
{% if onlyedit %}
|
||||
{% if event.pure_import %}
|
||||
@ -165,6 +165,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user