Bouton d'ajout pour étiquettes sur la page liste des étiquettes

This commit is contained in:
Jean-Marie Favreau 2025-01-11 13:06:33 +01:00
parent b60950b12d
commit 748b665a59
4 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 4.2.9 on 2025-01-11 13:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('agenda_culturel', '0133_alter_event_reference_urls'),
]
operations = [
migrations.AlterField(
model_name='tag',
name='principal',
field=models.BooleanField(default=False, help_text='This tag is highlighted as a main tag for visitors, particularly in the filter.', verbose_name='Principal'),
),
]

View File

@ -206,7 +206,7 @@ class Tag(models.Model):
principal = models.BooleanField(
verbose_name=_("Principal"),
help_text=_("This tag is highlighted as a main tag for visitors, particularly in the filter."),
default=True,
default=False,
)
in_excluded_suggestions = models.BooleanField(

View File

@ -8,7 +8,7 @@
<script>window.CKEDITOR_BASEPATH = '/static/ckeditor/ckeditor/';</script>
{% endblock %}
{% block title %}{% block og_title %}{% if form.name.value %}Renseignement de l'étiquette {{ form.name.value }}{% else %}Création d'une étiquette{% endif %}{% endblock %}{% endblock %}
{% block title %}{% block og_title %}{% if form.name.value != None %}Renseignement de l'étiquette {{ form.name.value }}{% else %}Création d'une étiquette{% endif %}{% endblock %}{% endblock %}
{% block fluid %}{% endblock %}
@ -16,7 +16,7 @@
<article>
<header>
<h1>Renseignement de l'étiquette <em>{{ form.name.value }}</em></h1>
<h1>{% if form.name.value != None %}Renseignement de l'étiquette <em>{{ form.name.value }}</em>{% else %}Création d'une étiquette{% endif %}</h1>
</header>
<form method="post">{% csrf_token %}

View File

@ -20,6 +20,12 @@
<article class="tag-descriptions">
<header>
{% if user.is_authenticated %}
<div class="slide-buttons">
<a href="{% url 'add_tag' %}" role="button">Ajouter {% picto_from_name "plus-circle" %}</a>
</div>
{% endif %}
<h1>Les étiquettes des événements</h1>
</header>