79 lines
2.9 KiB
HTML
79 lines
2.9 KiB
HTML
{% extends "agenda_culturel/page.html" %}
|
|
{% load static %}
|
|
{% load utils_extra %}
|
|
{% load cat_extra %}
|
|
{% load event_extra %}
|
|
{% load tag_extra %}
|
|
|
|
|
|
{% block title %}Appliquer les catégorisations{% endblock %}
|
|
|
|
{% block entete_header %}
|
|
<script src="/static/admin/js/vendor/jquery/jquery.js"></script>
|
|
<script src="/static/admin/js/jquery.init.js"></script>
|
|
<link href="{% static 'css/django_better_admin_arrayfield.min.css' %}" type="text/css" media="all" rel="stylesheet">
|
|
<script src="{% static 'js/django_better_admin_arrayfield.min.js' %}"></script>
|
|
{% css_categories %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>Appliquer les catégorisations</h1>
|
|
<p>Les règles de catégorisation proposent de modifier comme suit les événements suivants. Sélectionnez les modifications qui vous conviennent.</p>
|
|
|
|
<form method="post">{% csrf_token %}
|
|
{% for field in form %}
|
|
{% if not field.is_hidden %}
|
|
<article>
|
|
{{ field.errors }}
|
|
|
|
{% with eid=field.auto_id|remove_id_prefix %}
|
|
{% with event=events|get_item:eid %}
|
|
{% with altcat=categories|get_item:eid %}
|
|
|
|
<header>
|
|
{{ field }} Changer {{ event.category|small_cat }} en {{ altcat|small_cat }} pour l'événement
|
|
<a href="#event-{{ event.id }}"
|
|
aria-label="Fermer"
|
|
class="close"
|
|
data-target="event-{{ event.id }}"
|
|
onClick="toggleModal(event)"></a>
|
|
<h3>{{ event|picto_status }} {{ event.title }}</h3>
|
|
|
|
<p>
|
|
{% picto_from_name "map-pin" %}
|
|
{{ event.location }}
|
|
</p>
|
|
<p>
|
|
{% picto_from_name "calendar" %}
|
|
{% if event.end_day and event.end_day != event.start_day %}du{% else %}le{% endif %}
|
|
{% include "agenda_culturel/date-times-inc.html" with event=event %}
|
|
</p>
|
|
</header>
|
|
|
|
<div class="body-fixed">{{ event.description |linebreaks }}</div>
|
|
|
|
|
|
<p>
|
|
{% for tag in event.tags %}
|
|
{{ tag | tag_button }}
|
|
{% endfor %}
|
|
</p>
|
|
|
|
{% endwith %}
|
|
{% endwith %}
|
|
{% endwith %}
|
|
|
|
</article>
|
|
{% else %}
|
|
{{ field }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
<div class="grid">
|
|
<a href="{% if request.META.HTTP_REFERER %}{{ request.META.HTTP_REFERER }}{% else %}{% url 'categorisation_rules' %}{% endif %}" role="button" class="secondary">Annuler</a>
|
|
<input type="submit" value="Envoyer">
|
|
</div>
|
|
</form>
|
|
|
|
|
|
{% endblock %} |