87 lines
3.3 KiB
HTML
87 lines
3.3 KiB
HTML
{% extends "agenda_culturel/page.html" %}
|
|
|
|
{% block title %}Règles de catégorisation{% endblock %}
|
|
|
|
{% load utils_extra %}
|
|
{% load cat_extra %}
|
|
{% block entete_header %}
|
|
{% css_categories %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="grid two-columns">
|
|
<article>
|
|
<header>
|
|
<div class="slide-buttons">
|
|
<a href="{% url 'apply_catrules'%}" role="button" data-tooltip="Appliquer à tous les événements sans catégorie">Appliquer {% picto_from_name "arrow-down-circle" %}</a>
|
|
<a href="{% url 'add_catrule'%}" role="button">Ajouter {% picto_from_name "plus-circle" %}</a>
|
|
</div>
|
|
<h1>Règles de catégorisation</h1>
|
|
<p>Chaque règle est considérée dans l'ordre croissant des poids. La première règle satisfaite est appliquée par un changement de catégorie, et on les suivantes ne sont pas appliquées.</p>
|
|
<p>Une règle est satisfaite si au moins une des conditions est satisfaite.</p>
|
|
<p>Les règles sont appliquées à l'import sur tous les événements, et à la demande sur les événements sans catégorie.</p>
|
|
</header>
|
|
|
|
<table role="grid">
|
|
<thead>
|
|
<tr>
|
|
<th>Identifiant</th>
|
|
<th>Catégorie</th>
|
|
<th>Conditions</th>
|
|
<th>Poids</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for obj in paginator_filter %}
|
|
<tr>
|
|
<td>{{ obj.pk }}</a></td>
|
|
<td>{{ obj.category }}</td>
|
|
<td>
|
|
<ul>
|
|
{% if obj.title_contains %}
|
|
<li>Le titre contient {% if obj.title_exact %}exactement {% endif %} « {{ obj.title_contains }} »</li>
|
|
{% endif %}
|
|
{% if obj.description_contains %}
|
|
<li>La description contient {% if obj.desc_exact %}exactement {% endif %} « {{ obj.description_contains }} »</li>
|
|
{% endif %}
|
|
{% if obj.location_contains %}
|
|
<li>La localisation contient {% if obj.loc_exact %}exactement {% endif %} « {{ obj.location_contains }} »</li>
|
|
{% endif %}
|
|
</ul>
|
|
</td>
|
|
<td>{{ obj.weight }}</td>
|
|
<td>
|
|
<div class="buttons">
|
|
<a href="{% url 'edit_catrule' obj.pk %}" role="button">Modifier</a>
|
|
<a href="{% url 'delete_catrule' obj.pk %}" role="button">Supprimer</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<footer>
|
|
<span>
|
|
{% if paginator_filter.has_previous %}
|
|
<a href="?page=1" role="button">« premier</a>
|
|
<a href="?page={{ paginator_filter.previous_page_number }}" role="button">précédent</a>
|
|
{% endif %}
|
|
|
|
<span>
|
|
Page {{ paginator_filter.number }} sur {{ paginator_filter.paginator.num_pages }}
|
|
</span>
|
|
|
|
{% if paginator_filter.has_next %}
|
|
<a href="?page={{ paginator_filter.next_page_number }}" role="button">suivant</a>
|
|
<a href="?page={{ paginator_filter.paginator.num_pages }}" role="button">dernier »</a>
|
|
{% endif %}
|
|
</span>
|
|
</footer>
|
|
</article>
|
|
|
|
{% include "agenda_culturel/side-nav.html" with current="catrules" %}
|
|
</div>
|
|
|
|
{% endblock %} |