diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index 41eaad1..5560752 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -40,6 +40,54 @@ import logging logger = logging.getLogger(__name__) +class GroupFormMixin: + + template_name = 'agenda_culturel/forms/div_group.html' + + class FieldGroup: + + def __init__(self, id, label, display_label=False, maskable=False, default_masked=True): + self.id = id + self.label = label + self.display_label = display_label + self.maskable = maskable + self.default_masked = default_masked + + def toggle_field_name(self): + return 'group_' + self.id + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.groups = [] + + def add_group(self, *args, **kwargs): + self.groups.append(GroupFormMixin.FieldGroup(*args, **kwargs)) + if self.groups[-1].maskable: + self.fields[self.groups[-1].toggle_field_name()] = BooleanField(required=False) + self.fields[self.groups[-1].toggle_field_name()].toggle_group = True + + def get_fields_in_group(self, g): + return [f for f in self.visible_fields() if not hasattr(f.field, "toggle_group") and hasattr(f.field, "group_id") and f.field.group_id == g.id] + + def get_no_group_fields(self): + return [f for f in self.visible_fields() if not hasattr(f.field, "toggle_group") and (not hasattr(f.field, "group_id") or f.field.group_id == None)] + + def fields_by_group(self): + return [(g, self.get_fields_in_group(g)) for g in self.groups] + [(None, self.get_no_group_fields())] + + def clean(self): + result = super().clean() + + if result: + data = dict(self.data) + # for each masked group, we remove data + for g in self.groups: + if g.maskable and not g.toggle_field_name() in data: + fields = self.get_fields_in_group(g) + for f in fields: + self.cleaned_data[f.name] = None + + return result class TagForm(ModelForm): required_css_class = 'required' @@ -68,16 +116,12 @@ class TagRenameForm(Form): name = kwargs.pop("name", None) super().__init__(*args, **kwargs) if not (force or (not len(args) == 0 and 'force' in args[0])): - logger.warning('on delete ' + str(args)) del self.fields["force"] - else: - logger.warning('on delete pas') if not name is None and self.fields["name"].initial is None: self.fields["name"].initial = name def is_force(self): - logger.warning(self.cleaned_data) return "force" in self.fields and self.cleaned_data["force"] == True class URLSubmissionForm(Form): @@ -88,14 +132,12 @@ class URLSubmissionForm(Form): label=_("Category"), queryset=Category.objects.all().order_by("name"), initial=None, - help_text=_('Optional. If you don''t specify a category, we''ll find it for you.'), required=False, ) tags = MultipleChoiceField( label=_("Tags"), initial=None, choices=[], - help_text=_('Optional. If you offer labels, they''ll make it easier for your girlfriends to find your event.'), required=False ) @@ -133,7 +175,7 @@ class CategorisationRuleImportForm(ModelForm): fields = "__all__" -class EventForm(ModelForm): +class EventForm(GroupFormMixin, ModelForm): required_css_class = 'required' old_local_image = CharField(widget=HiddenInput(), required=False) @@ -143,7 +185,6 @@ class EventForm(ModelForm): label=_("Tags"), initial=None, choices=[], - help_text=_('Optional. If you offer labels, they''ll make it easier for your girlfriends to find your event.'), required=False ) @@ -192,6 +233,45 @@ class EventForm(ModelForm): self.fields['category'].initial = Category.get_default_category() self.fields['tags'].choices = Tag.get_tag_groups(all=True) + # set groups + self.add_group('main', _('Main fields')) + self.fields['title'].group_id = 'main' + + self.add_group('start', _('Start of event')) + self.fields['start_day'].group_id = 'start' + self.fields['start_time'].group_id = 'start' + + self.add_group('end', _('End of event')) + self.fields['end_day'].group_id = 'end' + self.fields['end_time'].group_id = 'end' + + self.add_group('recurrences', _('This is a recurring event'), maskable=True, default_masked=True) + self.fields['recurrences'].group_id = 'recurrences' + + self.add_group('details', _('Details')) + self.fields['description'].group_id = 'details' + if is_authenticated: + self.fields['organisers'].group_id = 'details' + + self.add_group('location', _('Location')) + self.fields['location'].group_id = 'location' + self.fields['exact_location'].group_id = 'location' + + self.add_group('illustration', _('Illustration')) + self.fields['local_image'].group_id = 'illustration' + self.fields['image_alt'].group_id = 'illustration' + + + if is_authenticated: + self.add_group('meta-admin', _('Meta information')) + self.fields['category'].group_id = 'meta-admin' + self.fields['tags'].group_id = 'meta-admin' + self.fields['status'].group_id = 'meta-admin' + else: + self.add_group('meta', _('Meta information')) + self.fields['category'].group_id = 'meta' + self.fields['tags'].group_id = 'meta' + def is_clone_from_url(self): return self.cloning diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po index 3760be4..f7c8e41 100644 --- a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po +++ b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: agenda_culturel\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-22 23:02+0100\n" +"POT-Creation-Date: 2024-11-24 18:58+0100\n" "PO-Revision-Date: 2023-10-29 14:16+0000\n" "Last-Translator: Jean-Marie Favreau \n" "Language-Team: Jean-Marie Favreau \n" @@ -110,7 +110,7 @@ msgstr "Non" msgid "Imported from" msgstr "Importé depuis" -#: agenda_culturel/filters.py:355 agenda_culturel/models.py:1696 +#: agenda_culturel/filters.py:355 agenda_culturel/models.py:1706 msgid "Closed" msgstr "Fermé" @@ -118,7 +118,7 @@ msgstr "Fermé" msgid "Open" msgstr "Ouvert" -#: agenda_culturel/filters.py:360 agenda_culturel/models.py:1690 +#: agenda_culturel/filters.py:360 agenda_culturel/models.py:1700 msgid "Spam" msgstr "Spam" @@ -130,58 +130,79 @@ msgstr "Non spam" msgid "Search" msgstr "Rechercher" -#: agenda_culturel/forms.py:58 +#: agenda_culturel/forms.py:106 msgid "Name of new tag" msgstr "Nom de la nouvelle étiquette" -#: agenda_culturel/forms.py:63 +#: agenda_culturel/forms.py:111 msgid "" "Force renaming despite the existence of events already using the chosen tag." msgstr "" "Forcer le renommage malgré l'existence d'événements utilisant déjà " "l'étiquette choisie." -#: agenda_culturel/forms.py:88 agenda_culturel/models.py:170 -#: agenda_culturel/models.py:547 agenda_culturel/models.py:1811 -#: agenda_culturel/models.py:1916 +#: agenda_culturel/forms.py:132 agenda_culturel/models.py:175 +#: agenda_culturel/models.py:567 agenda_culturel/models.py:1821 +#: agenda_culturel/models.py:1926 msgid "Category" msgstr "Catégorie" -#: agenda_culturel/forms.py:91 -msgid "Optional. If you dont specify a category, well find it for you." -msgstr "" -"Facultatif. Si tu ne donnes pas la catégorie, on s'occupe de la trouver." - -#: agenda_culturel/forms.py:95 agenda_culturel/forms.py:143 -#: agenda_culturel/forms.py:249 agenda_culturel/models.py:662 +#: agenda_culturel/forms.py:138 agenda_culturel/forms.py:185 +#: agenda_culturel/forms.py:329 agenda_culturel/models.py:216 +#: agenda_culturel/models.py:675 msgid "Tags" msgstr "Étiquettes" -#: agenda_culturel/forms.py:98 agenda_culturel/forms.py:146 -msgid "" -"Optional. If you offer labels, theyll make it easier for your girlfriends to " -"find your event." -msgstr "" -"Facultatif. Si tu proposes des étiquettes, ça aidera les copaines à " -"retrouver facilement ton événement." +#: agenda_culturel/forms.py:237 +msgid "Main fields" +msgstr "Champs principaux" -#: agenda_culturel/forms.py:206 +#: agenda_culturel/forms.py:240 +msgid "Start of event" +msgstr "Début de l'événement" + +#: agenda_culturel/forms.py:244 +msgid "End of event" +msgstr "Fin de l'événement" + +#: agenda_culturel/forms.py:248 +msgid "This is a recurring event" +msgstr "Cet événement est récurrent" + +#: agenda_culturel/forms.py:251 +msgid "Details" +msgstr "Détails" + +#: agenda_culturel/forms.py:256 agenda_culturel/models.py:597 +#: agenda_culturel/models.py:1802 +msgid "Location" +msgstr "Localisation" + +#: agenda_culturel/forms.py:260 agenda_culturel/models.py:630 +msgid "Illustration" +msgstr "Illustration" + +#: agenda_culturel/forms.py:266 agenda_culturel/forms.py:271 +msgid "Meta information" +msgstr "Méta-informations" + +#: agenda_culturel/forms.py:286 msgid "The end date must be after the start date." msgstr "La date de fin doit être après la date de début." -#: agenda_culturel/forms.py:222 +#: agenda_culturel/forms.py:302 msgid "The end time cannot be earlier than the start time." msgstr "L'heure de fin ne peut pas être avant l'heure de début." -#: agenda_culturel/forms.py:250 +#: agenda_culturel/forms.py:330 msgid "Select tags from existing ones." msgstr "Sélectionner des étiquettes depuis celles existantes." -#: agenda_culturel/forms.py:255 +#: agenda_culturel/forms.py:335 msgid "New tags" msgstr "Nouvelles étiquettes" -#: agenda_culturel/forms.py:256 +#: agenda_culturel/forms.py:336 msgid "" "Create new labels (sparingly). Note: by starting your tag with the " "characters “TW:”, youll create a “trigger warning” tag, and the associated " @@ -192,152 +213,152 @@ msgstr "" "étiquette “trigger warning”, et les événements associés seront annoncés " "comme tels." -#: agenda_culturel/forms.py:299 +#: agenda_culturel/forms.py:379 msgid "JSON in the format expected for the import." msgstr "JSON dans le format attendu pour l'import" -#: agenda_culturel/forms.py:321 +#: agenda_culturel/forms.py:401 msgid " (locally modified version)" msgstr " (version modifiée localement)" -#: agenda_culturel/forms.py:325 +#: agenda_culturel/forms.py:405 msgid " (synchronized on import version)" msgstr " (version synchronisée sur l'import)" -#: agenda_culturel/forms.py:329 +#: agenda_culturel/forms.py:409 msgid "Select {} as representative version." msgstr "Sélectionner {} comme version représentative" -#: agenda_culturel/forms.py:338 +#: agenda_culturel/forms.py:418 msgid "Update {} using some fields from other versions (interactive mode)." msgstr "" "Mettre à jour {} en utilisant quelques champs des autres versions (mode " "interactif)." -#: agenda_culturel/forms.py:345 +#: agenda_culturel/forms.py:425 msgid " Warning: a version is already locally modified." msgstr " Attention: une version a déjà été modifiée localement." -#: agenda_culturel/forms.py:350 +#: agenda_culturel/forms.py:430 msgid "Create a new version by merging (interactive mode)." msgstr "Créer une nouvelle version par fusion (mode interactif)." -#: agenda_culturel/forms.py:357 +#: agenda_culturel/forms.py:437 msgid "Make {} independent." msgstr "Rendre {} indépendant." -#: agenda_culturel/forms.py:359 +#: agenda_culturel/forms.py:439 msgid "Make all versions independent." msgstr "Rendre toutes les versions indépendantes." -#: agenda_culturel/forms.py:418 +#: agenda_culturel/forms.py:498 msgid "Value of the selected version" msgstr "Valeur de la version sélectionnée" -#: agenda_culturel/forms.py:420 agenda_culturel/forms.py:424 +#: agenda_culturel/forms.py:500 agenda_culturel/forms.py:504 msgid "Value of version {}" msgstr "Valeur de la version {}" -#: agenda_culturel/forms.py:573 +#: agenda_culturel/forms.py:653 msgid "Apply category {} to the event {}" msgstr "Appliquer la catégorie {} à l'événement {}" -#: agenda_culturel/forms.py:590 agenda_culturel/models.py:431 -#: agenda_culturel/models.py:1968 +#: agenda_culturel/forms.py:670 agenda_culturel/models.py:451 +#: agenda_culturel/models.py:1978 msgid "Place" msgstr "Lieu" -#: agenda_culturel/forms.py:592 +#: agenda_culturel/forms.py:672 msgid "Create a missing place" msgstr "Créer un lieu manquant" -#: agenda_culturel/forms.py:602 +#: agenda_culturel/forms.py:682 msgid "Add \"{}\" to the aliases of the place" msgstr "Ajouter « {} » aux alias du lieu" -#: agenda_culturel/forms.py:631 +#: agenda_culturel/forms.py:711 msgid "On saving, use aliases to detect all matching events with missing place" msgstr "" "Lors de l'enregistrement, utiliser des alias pour détecter tous les " "événements correspondants dont la place est manquante." -#: agenda_culturel/models.py:54 agenda_culturel/models.py:99 -#: agenda_culturel/models.py:177 agenda_culturel/models.py:386 -#: agenda_culturel/models.py:403 agenda_culturel/models.py:484 -#: agenda_culturel/models.py:1672 agenda_culturel/models.py:1746 +#: agenda_culturel/models.py:56 agenda_culturel/models.py:104 +#: agenda_culturel/models.py:185 agenda_culturel/models.py:401 +#: agenda_culturel/models.py:423 agenda_culturel/models.py:504 +#: agenda_culturel/models.py:1682 agenda_culturel/models.py:1756 msgid "Name" msgstr "Nom" -#: agenda_culturel/models.py:55 agenda_culturel/models.py:99 +#: agenda_culturel/models.py:57 agenda_culturel/models.py:104 msgid "Category name" msgstr "Nom de la catégorie" -#: agenda_culturel/models.py:60 +#: agenda_culturel/models.py:62 msgid "Content" msgstr "Contenu" -#: agenda_culturel/models.py:60 +#: agenda_culturel/models.py:62 msgid "Text as shown to the visitors" msgstr "Texte tel que présenté aux visiteureuses" -#: agenda_culturel/models.py:64 +#: agenda_culturel/models.py:66 msgid "URL path" msgstr "Chemin URL" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:67 msgid "URL path where the content is included." msgstr "Chemin URL où le contenu est présent." -#: agenda_culturel/models.py:69 +#: agenda_culturel/models.py:71 msgid "Static content" msgstr "Contenu statique" -#: agenda_culturel/models.py:70 +#: agenda_culturel/models.py:72 msgid "Static contents" msgstr "Contenus statiques" -#: agenda_culturel/models.py:103 +#: agenda_culturel/models.py:108 msgid "Color" msgstr "Couleur" -#: agenda_culturel/models.py:104 +#: agenda_culturel/models.py:109 msgid "Color used as background for the category" msgstr "Couleur utilisée comme fond de la catégorie" -#: agenda_culturel/models.py:110 +#: agenda_culturel/models.py:115 msgid "Pictogram" msgstr "Pictogramme" -#: agenda_culturel/models.py:111 +#: agenda_culturel/models.py:116 msgid "Pictogram of the category (svg format)" msgstr "Pictogramme de la catégorie (format svg)" -#: agenda_culturel/models.py:118 +#: agenda_culturel/models.py:123 msgid "Position for ordering categories" msgstr "Position pour ordonner les catégories" -#: agenda_culturel/models.py:171 +#: agenda_culturel/models.py:176 msgid "Categories" msgstr "Catégories" -#: agenda_culturel/models.py:177 +#: agenda_culturel/models.py:185 msgid "Tag name" msgstr "Nom de l'étiquette" -#: agenda_culturel/models.py:182 agenda_culturel/models.py:414 -#: agenda_culturel/models.py:496 agenda_culturel/models.py:609 +#: agenda_culturel/models.py:190 agenda_culturel/models.py:434 +#: agenda_culturel/models.py:516 agenda_culturel/models.py:614 msgid "Description" msgstr "Description" -#: agenda_culturel/models.py:183 +#: agenda_culturel/models.py:191 msgid "Description of the tag" msgstr "Description de l'étiquette" -#: agenda_culturel/models.py:189 +#: agenda_culturel/models.py:197 msgid "Principal" msgstr "Principal" -#: agenda_culturel/models.py:190 +#: agenda_culturel/models.py:198 msgid "" "This tag is highlighted as a main tag for visitors, particularly in the " "filter." @@ -345,94 +366,98 @@ msgstr "" "Cette étiquette est mise en avant comme étiquette principale pour les " "visiteurs, en particulier dans le filtre." -#: agenda_culturel/models.py:195 +#: agenda_culturel/models.py:203 msgid "In excluded suggestions" msgstr "Dans les suggestions d'exclusion" -#: agenda_culturel/models.py:196 +#: agenda_culturel/models.py:204 msgid "This tag will be part of the excluded suggestions." msgstr "Cette étiquette fera partie des suggestions d'exclusion." -#: agenda_culturel/models.py:201 +#: agenda_culturel/models.py:209 msgid "In included suggestions" msgstr "Dans les suggestions d'inclusion." -#: agenda_culturel/models.py:202 +#: agenda_culturel/models.py:210 msgid "This tag will be part of the included suggestions." msgstr "Cette étiquette fera partie des suggestions d'inclusion." -#: agenda_culturel/models.py:246 +#: agenda_culturel/models.py:215 +msgid "Tag" +msgstr "Étiquette" + +#: agenda_culturel/models.py:261 msgid "Suggestions" msgstr "Suggestions" -#: agenda_culturel/models.py:247 +#: agenda_culturel/models.py:262 msgid "Others" msgstr "Autres" -#: agenda_culturel/models.py:262 +#: agenda_culturel/models.py:277 msgid "Representative event" msgstr "Événement représentatif" -#: agenda_culturel/models.py:263 +#: agenda_culturel/models.py:278 msgid "This event is the representative event of the duplicated events group" msgstr "" "Cet événement est l'événement représentatif du groupe d'événements dupliqués." -#: agenda_culturel/models.py:270 agenda_culturel/models.py:271 +#: agenda_culturel/models.py:285 agenda_culturel/models.py:286 msgid "Duplicated events" msgstr "Événements dupliqués" -#: agenda_culturel/models.py:386 +#: agenda_culturel/models.py:401 msgid "Name of the location" msgstr "Nom de la position" -#: agenda_culturel/models.py:389 +#: agenda_culturel/models.py:404 msgid "Main" msgstr "Principale" -#: agenda_culturel/models.py:390 +#: agenda_culturel/models.py:405 msgid "This location is one of the main locations (shown first higher values)." msgstr "" "Cette position est une position principale (affichage en premier des plus " "grandes valeurs)." -#: agenda_culturel/models.py:395 +#: agenda_culturel/models.py:410 msgid "Reference location" msgstr "Position de référence" -#: agenda_culturel/models.py:396 +#: agenda_culturel/models.py:411 msgid "Reference locations" msgstr "Positions de référence" -#: agenda_culturel/models.py:403 +#: agenda_culturel/models.py:423 msgid "Name of the place" msgstr "Nom du lieu" -#: agenda_culturel/models.py:405 +#: agenda_culturel/models.py:425 msgid "Address" msgstr "Adresse" -#: agenda_culturel/models.py:406 +#: agenda_culturel/models.py:426 msgid "Address of this place (without city name)" msgstr "Adresse de ce lieu (sans le nom de la ville)" -#: agenda_culturel/models.py:410 +#: agenda_culturel/models.py:430 msgid "City" msgstr "Ville" -#: agenda_culturel/models.py:410 +#: agenda_culturel/models.py:430 msgid "City name" msgstr "Nom de la ville" -#: agenda_culturel/models.py:415 +#: agenda_culturel/models.py:435 msgid "Description of the place, including accessibility." msgstr "Description du lieu, inclus l'accessibilité." -#: agenda_culturel/models.py:422 +#: agenda_culturel/models.py:442 msgid "Alternative names" msgstr "Noms alternatifs" -#: agenda_culturel/models.py:424 +#: agenda_culturel/models.py:444 msgid "" "Alternative names or addresses used to match a place with the free-form " "location of an event." @@ -440,31 +465,31 @@ msgstr "" "Noms et adresses alternatives qui seront utilisées pour associer une adresse " "avec la localisation en forme libre d'un événement" -#: agenda_culturel/models.py:432 +#: agenda_culturel/models.py:452 msgid "Places" msgstr "Lieux" -#: agenda_culturel/models.py:484 +#: agenda_culturel/models.py:504 msgid "Organisation name" msgstr "Nom de l'organisme" -#: agenda_culturel/models.py:488 +#: agenda_culturel/models.py:508 msgid "Website" msgstr "Site internet" -#: agenda_culturel/models.py:489 +#: agenda_culturel/models.py:509 msgid "Website of the organisation" msgstr "Site internet de l'organisme" -#: agenda_culturel/models.py:497 +#: agenda_culturel/models.py:517 msgid "Description of the organisation." msgstr "Description de l'organisme" -#: agenda_culturel/models.py:504 +#: agenda_culturel/models.py:524 msgid "Principal place" msgstr "Lieu principal" -#: agenda_culturel/models.py:505 +#: agenda_culturel/models.py:525 msgid "" "Place mainly associated with this organizer. Mainly used if there is a " "similarity in the name, to avoid redundant displays." @@ -472,81 +497,59 @@ msgstr "" "Lieu principalement associé à cet organisateur. Principalement utilisé s'il " "y a une similarité de nom, pour éviter les affichages redondants." -#: agenda_culturel/models.py:512 +#: agenda_culturel/models.py:532 msgid "Organisation" msgstr "Organisme" -#: agenda_culturel/models.py:513 +#: agenda_culturel/models.py:533 msgid "Organisations" msgstr "Organismes" -#: agenda_culturel/models.py:525 agenda_culturel/models.py:1787 +#: agenda_culturel/models.py:545 agenda_culturel/models.py:1797 msgid "Published" msgstr "Publié" -#: agenda_culturel/models.py:526 +#: agenda_culturel/models.py:546 msgid "Draft" msgstr "Brouillon" -#: agenda_culturel/models.py:527 +#: agenda_culturel/models.py:547 msgid "Trash" msgstr "Corbeille" -#: agenda_culturel/models.py:538 +#: agenda_culturel/models.py:558 msgid "Title" msgstr "Titre" -#: agenda_culturel/models.py:538 -msgid "Short title" -msgstr "Titre court" - -#: agenda_culturel/models.py:542 agenda_culturel/models.py:1884 +#: agenda_culturel/models.py:562 agenda_culturel/models.py:1894 msgid "Status" msgstr "Status" -#: agenda_culturel/models.py:548 -msgid "Category of the event" -msgstr "Catégorie de l'événement" - -#: agenda_culturel/models.py:555 -msgid "Day of the event" -msgstr "Date de l'événement" - -#: agenda_culturel/models.py:558 agenda_culturel/models.py:559 -msgid "Starting time" -msgstr "Heure de début" - -#: agenda_culturel/models.py:565 -msgid "End day of the event" -msgstr "Fin de l'événement" - -#: agenda_culturel/models.py:567 -msgid "End day of the event, only required if different from the start day." -msgstr "" -"Date de fin de l'événement, uniquement nécessaire s'il est différent du " -"premier jour de l'événement" - -#: agenda_culturel/models.py:573 -msgid "Final time" -msgstr "Heure de fin" +#: agenda_culturel/models.py:574 +msgid "Start day" +msgstr "Date de début" #: agenda_culturel/models.py:577 +msgid "Start time" +msgstr "Heure de début" + +#: agenda_culturel/models.py:583 +msgid "End day" +msgstr "Date de fin" + +#: agenda_culturel/models.py:588 +msgid "End time" +msgstr "Heure de fin" + +#: agenda_culturel/models.py:592 msgid "Recurrence" msgstr "Récurrence" -#: agenda_culturel/models.py:582 agenda_culturel/models.py:1792 -msgid "Location" -msgstr "Localisation" - -#: agenda_culturel/models.py:583 -msgid "Address of the event" -msgstr "Adresse de l'événement" - -#: agenda_culturel/models.py:589 +#: agenda_culturel/models.py:603 msgid "Location (free form)" msgstr "Localisation (forme libre)" -#: agenda_culturel/models.py:591 +#: agenda_culturel/models.py:605 msgid "" "Address of the event in case its not available in the already known places " "(free form)" @@ -554,11 +557,11 @@ msgstr "" "Addresse d'un événement si elle n'est pas déjà présente dans la liste des " "lieux disponible (forme libre)" -#: agenda_culturel/models.py:601 +#: agenda_culturel/models.py:622 msgid "Organisers" msgstr "Organisateurs" -#: agenda_culturel/models.py:603 +#: agenda_culturel/models.py:624 msgid "" "list of event organisers. Organizers will only be displayed if one of them " "does not normally use the venue." @@ -566,199 +569,183 @@ msgstr "" "Liste des organisateurs de l'événements. Les organisateurs seront affichés " "uniquement si au moins un d'entre eux n'utilise pas habituellement le lieu." -#: agenda_culturel/models.py:610 -msgid "General description of the event" -msgstr "Description générale de l'événement" +#: agenda_culturel/models.py:637 +msgid "Illustration (URL)" +msgstr "Illustration (URL)" -#: agenda_culturel/models.py:616 -msgid "Illustration (local image)" -msgstr "Illustration (image locale)" +#: agenda_culturel/models.py:638 +msgid "External URL of the illustration image" +msgstr "URL externe de l'image illustrative" -#: agenda_culturel/models.py:617 -msgid "Illustration image stored in the agenda server" -msgstr "Image d'illustration stockée sur le serveur de l'agenda" - -#: agenda_culturel/models.py:624 -msgid "Illustration" -msgstr "Illustration" - -#: agenda_culturel/models.py:625 -msgid "URL of the illustration image" -msgstr "URL de l'image illustrative" - -#: agenda_culturel/models.py:631 +#: agenda_culturel/models.py:644 msgid "Illustration description" msgstr "Description de l'illustration" -#: agenda_culturel/models.py:632 +#: agenda_culturel/models.py:645 msgid "Alternative text used by screen readers for the image" msgstr "Texte alternatif utiliser par les lecteurs d'écrans pour l'image" -#: agenda_culturel/models.py:640 +#: agenda_culturel/models.py:653 msgid "Importation source" msgstr "Source d'importation" -#: agenda_culturel/models.py:641 +#: agenda_culturel/models.py:654 msgid "Importation source used to detect removed entries." msgstr "Source d'importation utilisée pour détecter les éléments supprimés/" -#: agenda_culturel/models.py:647 +#: agenda_culturel/models.py:660 msgid "UUIDs" msgstr "UUIDs" -#: agenda_culturel/models.py:648 +#: agenda_culturel/models.py:661 msgid "UUIDs from import to detect duplicated entries." msgstr "UUIDs utilisés pendant l'import pour détecter les entrées dupliquées" -#: agenda_culturel/models.py:654 +#: agenda_culturel/models.py:667 msgid "URLs" msgstr "URLs" -#: agenda_culturel/models.py:655 +#: agenda_culturel/models.py:668 msgid "List of all the urls where this event can be found." msgstr "Liste de toutes les urls où l'événement peut être trouvé." -#: agenda_culturel/models.py:663 -msgid "A list of tags that describe the event." -msgstr "Une liste d'étiquettes décrivant l'événement" - -#: agenda_culturel/models.py:670 +#: agenda_culturel/models.py:682 msgid "Other versions" msgstr "" -#: agenda_culturel/models.py:735 +#: agenda_culturel/models.py:750 msgid "Event" msgstr "Événement" -#: agenda_culturel/models.py:736 +#: agenda_culturel/models.py:751 msgid "Events" msgstr "Événements" -#: agenda_culturel/models.py:1663 +#: agenda_culturel/models.py:1673 msgid "Contact message" msgstr "Message de contact" -#: agenda_culturel/models.py:1664 +#: agenda_culturel/models.py:1674 msgid "Contact messages" msgstr "Messages de contact" -#: agenda_culturel/models.py:1667 +#: agenda_culturel/models.py:1677 msgid "Subject" msgstr "Sujet" -#: agenda_culturel/models.py:1668 +#: agenda_culturel/models.py:1678 msgid "The subject of your message" msgstr "Sujet de votre message" -#: agenda_culturel/models.py:1673 +#: agenda_culturel/models.py:1683 msgid "Your name" msgstr "Votre nom" -#: agenda_culturel/models.py:1679 +#: agenda_culturel/models.py:1689 msgid "Email address" msgstr "Adresse email" -#: agenda_culturel/models.py:1680 +#: agenda_culturel/models.py:1690 msgid "Your email address" msgstr "Votre adresse email" -#: agenda_culturel/models.py:1685 +#: agenda_culturel/models.py:1695 msgid "Message" msgstr "Message" -#: agenda_culturel/models.py:1685 +#: agenda_culturel/models.py:1695 msgid "Your message" msgstr "Votre message" -#: agenda_culturel/models.py:1691 +#: agenda_culturel/models.py:1701 msgid "This message is a spam." msgstr "Ce message est un spam." -#: agenda_culturel/models.py:1698 +#: agenda_culturel/models.py:1708 msgid "this message has been processed and no longer needs to be handled" msgstr "Ce message a été traité et ne nécessite plus d'être pris en charge" -#: agenda_culturel/models.py:1703 +#: agenda_culturel/models.py:1713 msgid "Comments" msgstr "Commentaires" -#: agenda_culturel/models.py:1704 +#: agenda_culturel/models.py:1714 msgid "Comments on the message from the moderation team" msgstr "Commentaires sur ce message par l'équipe de modération" -#: agenda_culturel/models.py:1716 agenda_culturel/models.py:1864 +#: agenda_culturel/models.py:1726 agenda_culturel/models.py:1874 msgid "Recurrent import" msgstr "Import récurrent" -#: agenda_culturel/models.py:1717 +#: agenda_culturel/models.py:1727 msgid "Recurrent imports" msgstr "Imports récurrents" -#: agenda_culturel/models.py:1721 +#: agenda_culturel/models.py:1731 msgid "ical" msgstr "ical" -#: agenda_culturel/models.py:1722 +#: agenda_culturel/models.py:1732 msgid "ical no busy" msgstr "ical sans busy" -#: agenda_culturel/models.py:1723 +#: agenda_culturel/models.py:1733 msgid "ical no VC" msgstr "ical sans VC" -#: agenda_culturel/models.py:1724 +#: agenda_culturel/models.py:1734 msgid "lacoope.org" msgstr "lacoope.org" -#: agenda_culturel/models.py:1725 +#: agenda_culturel/models.py:1735 msgid "la comédie" msgstr "la comédie" -#: agenda_culturel/models.py:1726 +#: agenda_culturel/models.py:1736 msgid "le fotomat" msgstr "le fotomat" -#: agenda_culturel/models.py:1727 +#: agenda_culturel/models.py:1737 msgid "la puce à l'oreille" msgstr "la puce à loreille" -#: agenda_culturel/models.py:1728 +#: agenda_culturel/models.py:1738 msgid "Plugin wordpress MEC" msgstr "Plugin wordpress MEC" -#: agenda_culturel/models.py:1729 +#: agenda_culturel/models.py:1739 msgid "Événements d'une page FB" msgstr "Événements d'une page FB" -#: agenda_culturel/models.py:1730 +#: agenda_culturel/models.py:1740 msgid "la cour des 3 coquins" msgstr "la cour des 3 coquins" -#: agenda_culturel/models.py:1731 +#: agenda_culturel/models.py:1741 msgid "Arachnée concert" msgstr "Arachnée concert" -#: agenda_culturel/models.py:1734 +#: agenda_culturel/models.py:1744 msgid "simple" msgstr "simple" -#: agenda_culturel/models.py:1735 +#: agenda_culturel/models.py:1745 msgid "Headless Chromium" msgstr "chromium sans interface" -#: agenda_culturel/models.py:1736 +#: agenda_culturel/models.py:1746 msgid "Headless Chromium (pause)" msgstr "chromium sans interface (pause)" -#: agenda_culturel/models.py:1741 +#: agenda_culturel/models.py:1751 msgid "daily" msgstr "chaque jour" -#: agenda_culturel/models.py:1743 +#: agenda_culturel/models.py:1753 msgid "weekly" msgstr "chaque semaine" -#: agenda_culturel/models.py:1748 +#: agenda_culturel/models.py:1758 msgid "" "Recurrent import name. Be careful to choose a name that is easy to " "understand, as it will be public and displayed on the sites About page." @@ -766,143 +753,143 @@ msgstr "" "Nom de l'import récurrent. Attention à choisir un nom compréhensible, car il " "sera public, et affiché sur la page à propos du site." -#: agenda_culturel/models.py:1755 +#: agenda_culturel/models.py:1765 msgid "Processor" msgstr "Processeur" -#: agenda_culturel/models.py:1758 +#: agenda_culturel/models.py:1768 msgid "Downloader" msgstr "Téléchargeur" -#: agenda_culturel/models.py:1765 +#: agenda_culturel/models.py:1775 msgid "Import recurrence" msgstr "Récurrence d'import" -#: agenda_culturel/models.py:1772 +#: agenda_culturel/models.py:1782 msgid "Source" msgstr "Source" -#: agenda_culturel/models.py:1773 +#: agenda_culturel/models.py:1783 msgid "URL of the source document" msgstr "URL du document source" -#: agenda_culturel/models.py:1777 +#: agenda_culturel/models.py:1787 msgid "Browsable url" msgstr "URL navigable" -#: agenda_culturel/models.py:1779 +#: agenda_culturel/models.py:1789 msgid "URL of the corresponding document that will be shown to visitors." msgstr "URL correspondant au document et qui sera montrée aux visiteurs" -#: agenda_culturel/models.py:1788 +#: agenda_culturel/models.py:1798 msgid "Status of each imported event (published or draft)" msgstr "Status de chaque événement importé (publié ou brouillon)" -#: agenda_culturel/models.py:1793 +#: agenda_culturel/models.py:1803 msgid "Address for each imported event" msgstr "Adresse de chaque événement importé" -#: agenda_culturel/models.py:1801 +#: agenda_culturel/models.py:1811 msgid "Organiser" msgstr "Organisateur" -#: agenda_culturel/models.py:1802 +#: agenda_culturel/models.py:1812 msgid "Organiser of each imported event" msgstr "Organisateur de chaque événement importé" -#: agenda_culturel/models.py:1812 +#: agenda_culturel/models.py:1822 msgid "Category of each imported event" msgstr "Catégorie de chaque événement importé" -#: agenda_culturel/models.py:1820 +#: agenda_culturel/models.py:1830 msgid "Tags for each imported event" msgstr "Étiquettes de chaque événement importé" -#: agenda_culturel/models.py:1821 +#: agenda_culturel/models.py:1831 msgid "A list of tags that describe each imported event." msgstr "Une liste d'étiquettes décrivant chaque événement importé" -#: agenda_culturel/models.py:1850 +#: agenda_culturel/models.py:1860 msgid "Running" msgstr "En cours" -#: agenda_culturel/models.py:1851 +#: agenda_culturel/models.py:1861 msgid "Canceled" msgstr "Annulé" -#: agenda_culturel/models.py:1852 +#: agenda_culturel/models.py:1862 msgid "Success" msgstr "Succès" -#: agenda_culturel/models.py:1853 +#: agenda_culturel/models.py:1863 msgid "Failed" msgstr "Erreur" -#: agenda_culturel/models.py:1856 +#: agenda_culturel/models.py:1866 msgid "Batch importation" msgstr "Importation par lot" -#: agenda_culturel/models.py:1857 +#: agenda_culturel/models.py:1867 msgid "Batch importations" msgstr "Importations par lot" -#: agenda_culturel/models.py:1865 +#: agenda_culturel/models.py:1875 msgid "Reference to the recurrent import processing" msgstr "Référence du processus d'import récurrent" -#: agenda_culturel/models.py:1873 +#: agenda_culturel/models.py:1883 msgid "URL (if not recurrent import)" msgstr "URL (si pas d'import récurrent)" -#: agenda_culturel/models.py:1875 +#: agenda_culturel/models.py:1885 msgid "Source URL if no RecurrentImport is associated." msgstr "URL source si aucun import récurrent n'est associé" -#: agenda_culturel/models.py:1888 +#: agenda_culturel/models.py:1898 msgid "Error message" msgstr "Votre message" -#: agenda_culturel/models.py:1892 +#: agenda_culturel/models.py:1902 msgid "Number of collected events" msgstr "Nombre d'événements collectés" -#: agenda_culturel/models.py:1895 +#: agenda_culturel/models.py:1905 msgid "Number of imported events" msgstr "Nombre d'événements importés" -#: agenda_culturel/models.py:1898 +#: agenda_culturel/models.py:1908 msgid "Number of updated events" msgstr "Nombre d'événements mis à jour" -#: agenda_culturel/models.py:1901 +#: agenda_culturel/models.py:1911 msgid "Number of removed events" msgstr "Nombre d'événements supprimés" -#: agenda_culturel/models.py:1909 +#: agenda_culturel/models.py:1919 msgid "Weight" msgstr "Poids" -#: agenda_culturel/models.py:1910 +#: agenda_culturel/models.py:1920 msgid "The lower is the weight, the earlier the filter is applied" msgstr "Plus le poids est léger, plus le filtre sera appliqué tôt" -#: agenda_culturel/models.py:1917 +#: agenda_culturel/models.py:1927 msgid "Category applied to the event" msgstr "Catégorie appliquée à l'événement" -#: agenda_culturel/models.py:1922 +#: agenda_culturel/models.py:1932 msgid "Contained in the title" msgstr "Contenu dans le titre" -#: agenda_culturel/models.py:1923 +#: agenda_culturel/models.py:1933 msgid "Text contained in the event title" msgstr "Texte contenu dans le titre de l'événement" -#: agenda_culturel/models.py:1929 +#: agenda_culturel/models.py:1939 msgid "Exact title extract" msgstr "Extrait exact du titre" -#: agenda_culturel/models.py:1931 +#: agenda_culturel/models.py:1941 msgid "" "If checked, the extract will be searched for in the title using the exact " "form (capitals, accents)." @@ -910,19 +897,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans le titre en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:1937 +#: agenda_culturel/models.py:1947 msgid "Contained in the description" msgstr "Contenu dans la description" -#: agenda_culturel/models.py:1938 +#: agenda_culturel/models.py:1948 msgid "Text contained in the description" msgstr "Texte contenu dans la description" -#: agenda_culturel/models.py:1944 +#: agenda_culturel/models.py:1954 msgid "Exact description extract" msgstr "Extrait exact de description" -#: agenda_culturel/models.py:1946 +#: agenda_culturel/models.py:1956 msgid "" "If checked, the extract will be searched for in the description using the " "exact form (capitals, accents)." @@ -930,19 +917,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans la description en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:1952 +#: agenda_culturel/models.py:1962 msgid "Contained in the location" msgstr "Contenu dans la localisation" -#: agenda_culturel/models.py:1953 +#: agenda_culturel/models.py:1963 msgid "Text contained in the event location" msgstr "Texte contenu dans la localisation de l'événement" -#: agenda_culturel/models.py:1959 +#: agenda_culturel/models.py:1969 msgid "Exact location extract" msgstr "Extrait exact de localisation" -#: agenda_culturel/models.py:1961 +#: agenda_culturel/models.py:1971 msgid "" "If checked, the extract will be searched for in the location using the exact " "form (capitals, accents)." @@ -950,43 +937,43 @@ msgstr "" "Si coché, l'extrait sera recherché dans la localisation en utilisant la " "forme exacte (majuscules, accents)" -#: agenda_culturel/models.py:1969 +#: agenda_culturel/models.py:1979 msgid "Location from place" msgstr "Localisation depuis le lieu" -#: agenda_culturel/models.py:1978 +#: agenda_culturel/models.py:1988 msgid "Categorisation rule" msgstr "Règle de catégorisation" -#: agenda_culturel/models.py:1979 +#: agenda_culturel/models.py:1989 msgid "Categorisation rules" msgstr "Règles de catégorisation" -#: agenda_culturel/settings/base.py:150 +#: agenda_culturel/settings/base.py:151 msgid "French" msgstr "français" -#: agenda_culturel/views.py:145 +#: agenda_culturel/views.py:146 msgid "Recurrent import name" msgstr "Nome de l'import récurrent" -#: agenda_culturel/views.py:146 +#: agenda_culturel/views.py:147 msgid "Add another" msgstr "Ajouter un autre" -#: agenda_culturel/views.py:147 +#: agenda_culturel/views.py:148 msgid "Browse..." msgstr "Naviguer..." -#: agenda_culturel/views.py:148 +#: agenda_culturel/views.py:149 msgid "No file selected." msgstr "Pas de fichier sélectionné." -#: agenda_culturel/views.py:284 +#: agenda_culturel/views.py:285 msgid "The static content has been successfully updated." msgstr "Le contenu statique a été modifié avec succès." -#: agenda_culturel/views.py:292 +#: agenda_culturel/views.py:293 msgid "" "The event cannot be updated because the import process is not available for " "the referenced sources." @@ -994,13 +981,13 @@ msgstr "" "La mise à jour de l'événement n'est pas possible car le processus d'import " "n'est pas disponible pour les sources référencées." -#: agenda_culturel/views.py:295 +#: agenda_culturel/views.py:296 msgid "The event update has been queued and will be completed shortly." msgstr "" "La mise à jour de l'événement a été mise en attente et sera effectuée sous " "peu." -#: agenda_culturel/views.py:305 +#: agenda_culturel/views.py:306 msgid "The event has been successfully modified." msgstr "L'événement a été modifié avec succès." @@ -1008,19 +995,19 @@ msgstr "L'événement a été modifié avec succès." msgid "The event has been successfully moderated." msgstr "L'événement a été modéré avec succès." -#: agenda_culturel/views.py:439 +#: agenda_culturel/views.py:445 msgid "The event has been successfully deleted." msgstr "L'événement a été supprimé avec succès." -#: agenda_culturel/views.py:471 +#: agenda_culturel/views.py:477 msgid "The status has been successfully modified." msgstr "Le status a été modifié avec succès." -#: agenda_culturel/views.py:505 +#: agenda_culturel/views.py:511 msgid "The event was created: {}." msgstr "L'événement a été créé: {}." -#: agenda_culturel/views.py:507 agenda_culturel/views.py:532 +#: agenda_culturel/views.py:513 agenda_culturel/views.py:537 msgid "" "The event has been submitted and will be published as soon as it has been " "validated by the moderation team." @@ -1028,82 +1015,82 @@ msgstr "" "L'événement a été soumis et sera publié dès qu'il aura été validé par " "l'équipe de modération." -#: agenda_culturel/views.py:526 +#: agenda_culturel/views.py:531 msgid "The event is saved." msgstr "L'événement est enregistré." -#: agenda_culturel/views.py:620 agenda_culturel/views.py:672 +#: agenda_culturel/views.py:625 agenda_culturel/views.py:677 msgid "{} has not been submitted since its already known: {}." msgstr "{} n'a pas été soumis car il est déjà connu: {}." -#: agenda_culturel/views.py:625 agenda_culturel/views.py:678 +#: agenda_culturel/views.py:630 agenda_culturel/views.py:683 msgid "" "{} has not been submitted since its already known and currently into " "moderation process." msgstr "{} n'a pas été soumis car il est déjà connu et en cours de modération" -#: agenda_culturel/views.py:635 +#: agenda_culturel/views.py:640 msgid "Integrating {} url(s) into our import process." msgstr "Intégration de {} url(s) dans notre processus d'import." -#: agenda_culturel/views.py:685 +#: agenda_culturel/views.py:690 msgid "Integrating {} into our import process." msgstr "Intégration de {} dans notre processus d'import." -#: agenda_culturel/views.py:740 +#: agenda_culturel/views.py:745 msgid "Your message has been sent successfully." msgstr "Votre message a été envoyé avec succès." -#: agenda_culturel/views.py:750 +#: agenda_culturel/views.py:755 msgid "The contact message has been successfully deleted." msgstr "Le message de contact a été supprimé avec succès." -#: agenda_culturel/views.py:764 +#: agenda_culturel/views.py:769 msgid "The contact message properties has been successfully modified." msgstr "Les propriétés du message de contact ont été modifié avec succès." -#: agenda_culturel/views.py:901 +#: agenda_culturel/views.py:906 msgid "Spam has been successfully deleted." msgstr "Le spam a été supprimé avec succès" -#: agenda_culturel/views.py:1017 +#: agenda_culturel/views.py:1029 msgid "The import has been run successfully." msgstr "L'import a été lancé avec succès" -#: agenda_culturel/views.py:1036 +#: agenda_culturel/views.py:1048 msgid "The import has been canceled." msgstr "L'import a été annulé" -#: agenda_culturel/views.py:1110 +#: agenda_culturel/views.py:1126 msgid "The recurrent import has been successfully modified." msgstr "L'import récurrent a été modifié avec succès." -#: agenda_culturel/views.py:1119 +#: agenda_culturel/views.py:1135 msgid "The recurrent import has been successfully deleted." msgstr "L'import récurrent a été supprimé avec succès" -#: agenda_culturel/views.py:1159 +#: agenda_culturel/views.py:1175 msgid "The import has been launched." msgstr "L'import a été lancé" -#: agenda_culturel/views.py:1181 +#: agenda_culturel/views.py:1197 msgid "Imports has been launched." msgstr "Les imports ont été lancés" -#: agenda_culturel/views.py:1243 +#: agenda_culturel/views.py:1259 msgid "Update successfully completed." msgstr "Mise à jour réalisée avec succès." -#: agenda_culturel/views.py:1301 +#: agenda_culturel/views.py:1317 msgid "Creation of a merged event has been successfully completed." msgstr "Création d'un événement fusionné réalisée avec succès." -#: agenda_culturel/views.py:1337 +#: agenda_culturel/views.py:1353 msgid "Events have been marked as unduplicated." msgstr "Les événements ont été marqués comme non dupliqués." -#: agenda_culturel/views.py:1351 agenda_culturel/views.py:1360 -#: agenda_culturel/views.py:1378 +#: agenda_culturel/views.py:1367 agenda_culturel/views.py:1376 +#: agenda_culturel/views.py:1394 msgid "" "The selected item is no longer included in the list of duplicates. Someone " "else has probably modified the list in the meantime." @@ -1111,23 +1098,23 @@ msgstr "" "L'élément sélectionné ne fait plus partie de la liste des dupliqués. Une " "autre personne a probablement modifié la liste entre temps." -#: agenda_culturel/views.py:1354 +#: agenda_culturel/views.py:1370 msgid "The selected event has been set as representative" msgstr "L'événement sélectionné a été défini comme representatif." -#: agenda_culturel/views.py:1369 +#: agenda_culturel/views.py:1385 msgid "The event has been withdrawn from the group and made independent." msgstr "L'événement a été retiré du groupe et rendu indépendant." -#: agenda_culturel/views.py:1413 +#: agenda_culturel/views.py:1429 msgid "Cleaning up duplicates: {} item(s) fixed." msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)." -#: agenda_culturel/views.py:1462 +#: agenda_culturel/views.py:1478 msgid "The event was successfully duplicated." msgstr "L'événement a été marqué dupliqué avec succès." -#: agenda_culturel/views.py:1470 +#: agenda_culturel/views.py:1486 msgid "" "The event has been successfully flagged as a duplicate. The moderation team " "will deal with your suggestion shortly." @@ -1135,32 +1122,32 @@ msgstr "" "L'événement a été signalé comme dupliqué avec succès. Votre suggestion sera " "prochainement prise en charge par l'équipe de modération." -#: agenda_culturel/views.py:1523 +#: agenda_culturel/views.py:1539 msgid "The categorisation rule has been successfully modified." msgstr "La règle de catégorisation a été modifiée avec succès." -#: agenda_culturel/views.py:1532 +#: agenda_culturel/views.py:1548 msgid "The categorisation rule has been successfully deleted." msgstr "La règle de catégorisation a été supprimée avec succès" -#: agenda_culturel/views.py:1554 +#: agenda_culturel/views.py:1570 msgid "The rules were successfully applied and 1 event was categorised." msgstr "" "Les règles ont été appliquées avec succès et 1 événement a été catégorisé" -#: agenda_culturel/views.py:1561 +#: agenda_culturel/views.py:1577 msgid "The rules were successfully applied and {} events were categorised." msgstr "" "Les règles ont été appliquées avec succès et {} événements ont été " "catégorisés" -#: agenda_culturel/views.py:1568 agenda_culturel/views.py:1621 +#: agenda_culturel/views.py:1584 agenda_culturel/views.py:1637 msgid "The rules were successfully applied and no events were categorised." msgstr "" "Les règles ont été appliquées avec succès et aucun événement n'a été " "catégorisé" -#: agenda_culturel/views.py:1607 +#: agenda_culturel/views.py:1623 msgid "" "The rules were successfully applied and 1 event with default category was " "categorised." @@ -1168,7 +1155,7 @@ msgstr "" "Les règles ont été appliquées avec succès et 1 événement avec catégorie par " "défaut a été catégorisé" -#: agenda_culturel/views.py:1614 +#: agenda_culturel/views.py:1630 msgid "" "The rules were successfully applied and {} events with default category were " "categorised." @@ -1176,58 +1163,58 @@ msgstr "" "Les règles ont été appliquées avec succès et {} événements avec catégorie " "par défaut ont été catégorisés" -#: agenda_culturel/views.py:1706 agenda_culturel/views.py:1768 -#: agenda_culturel/views.py:1806 +#: agenda_culturel/views.py:1722 agenda_culturel/views.py:1784 +#: agenda_culturel/views.py:1822 msgid "{} events have been updated." msgstr "{} événements ont été mis à jour." -#: agenda_culturel/views.py:1709 agenda_culturel/views.py:1770 -#: agenda_culturel/views.py:1809 +#: agenda_culturel/views.py:1725 agenda_culturel/views.py:1786 +#: agenda_culturel/views.py:1825 msgid "1 event has been updated." msgstr "1 événement a été mis à jour" -#: agenda_culturel/views.py:1711 agenda_culturel/views.py:1772 -#: agenda_culturel/views.py:1811 +#: agenda_culturel/views.py:1727 agenda_culturel/views.py:1788 +#: agenda_culturel/views.py:1827 msgid "No events have been modified." msgstr "Aucun événement n'a été modifié." -#: agenda_culturel/views.py:1720 +#: agenda_culturel/views.py:1736 msgid "The place has been successfully updated." msgstr "Le lieu a été modifié avec succès." -#: agenda_culturel/views.py:1729 +#: agenda_culturel/views.py:1745 msgid "The place has been successfully created." msgstr "Le lieu a été créé avec succès." -#: agenda_culturel/views.py:1794 +#: agenda_culturel/views.py:1810 msgid "The selected place has been assigned to the event." msgstr "Le lieu sélectionné a été assigné à l'événement." -#: agenda_culturel/views.py:1798 +#: agenda_culturel/views.py:1814 msgid "A new alias has been added to the selected place." msgstr "Un nouvel alias a été créé pour le lieu sélectionné." -#: agenda_culturel/views.py:1891 +#: agenda_culturel/views.py:1907 msgid "The organisation has been successfully updated." msgstr "L'organisme a été modifié avec succès." -#: agenda_culturel/views.py:1900 +#: agenda_culturel/views.py:1916 msgid "The organisation has been successfully created." msgstr "L'organisme a été créé avec succès." -#: agenda_culturel/views.py:1917 +#: agenda_culturel/views.py:1933 msgid "The tag has been successfully updated." msgstr "L'étiquette a été modifiée avec succès." -#: agenda_culturel/views.py:1924 +#: agenda_culturel/views.py:1940 msgid "The tag has been successfully created." msgstr "L'étiquette a été créée avec succès." -#: agenda_culturel/views.py:1988 +#: agenda_culturel/views.py:2004 msgid "You have not modified the tag name." msgstr "Vous n'avez pas modifié le nom de l'étiquette." -#: agenda_culturel/views.py:1998 +#: agenda_culturel/views.py:2014 msgid "" "This tag {} is already in use, and is described by different information " "from the current tag. You can force renaming by checking the corresponding " @@ -1240,7 +1227,7 @@ msgstr "" "sera supprimée, et tous les événements associés à l'étiquette {} seront " "associés à l'étiquette {}." -#: agenda_culturel/views.py:2005 +#: agenda_culturel/views.py:2021 msgid "" "This tag {} is already in use. You can force renaming by checking the " "corresponding option." @@ -1248,10 +1235,10 @@ msgstr "" "Cette étiquette {} est déjà utilisée. Vous pouvez forcer le renommage en " "cochant l'option correspondante." -#: agenda_culturel/views.py:2029 +#: agenda_culturel/views.py:2045 msgid "The tag {} has been successfully renamed to {}." msgstr "L'étiquette {} a été renommée avec succès en {}." -#: agenda_culturel/views.py:2063 +#: agenda_culturel/views.py:2079 msgid "The tag {} has been successfully deleted." msgstr "L'événement {} a été supprimé avec succès." diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 8e806c7..aa6fd8d 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -212,8 +212,8 @@ class Tag(models.Model): ) class Meta: - verbose_name = _("Étiquette") - verbose_name_plural = _("Étiquettes") + verbose_name = _("Tag") + verbose_name_plural = _("Tags") indexes = [ models.Index(fields=['name']), ] @@ -555,7 +555,7 @@ class Event(models.Model): recurrence_dtend = models.DateTimeField(editable=False, blank=True, null=True) title = models.CharField( - verbose_name=_("Title"), help_text=_("Short title"), max_length=512 + verbose_name=_("Title"), max_length=512 ) status = models.CharField( @@ -565,32 +565,27 @@ class Event(models.Model): category = models.ForeignKey( Category, verbose_name=_("Category"), - help_text=_("Category of the event"), null=True, default=None, on_delete=models.SET_DEFAULT, ) start_day = models.DateField( - verbose_name=_("Day of the event"), help_text=_("Day of the event") + verbose_name=_("Start day") ) start_time = models.TimeField( - verbose_name=_("Starting time"), - help_text=_("Starting time"), + verbose_name=_("Start time"), blank=True, null=True, ) end_day = models.DateField( - verbose_name=_("End day of the event"), - help_text=_( - "End day of the event, only required if different from the start day." - ), + verbose_name=_("End day"), blank=True, null=True, ) end_time = models.TimeField( - verbose_name=_("Final time"), help_text=_("Final time"), blank=True, null=True + verbose_name=_("End time"), blank=True, null=True ) recurrences = recurrence.fields.RecurrenceField( @@ -600,7 +595,6 @@ class Event(models.Model): exact_location = models.ForeignKey( Place, verbose_name=_("Location"), - help_text=_("Address of the event"), null=True, on_delete=models.SET_NULL, blank=True, @@ -616,6 +610,13 @@ class Event(models.Model): blank=True ) + description = models.TextField( + verbose_name=_("Description"), + blank=True, + null=True, + ) + + organisers = models.ManyToManyField(Organisation, related_name='organised_events', verbose_name=_("Organisers"), @@ -625,24 +626,16 @@ class Event(models.Model): blank=True ) - description = models.TextField( - verbose_name=_("Description"), - help_text=_("General description of the event"), - blank=True, - null=True, - ) - local_image = models.ImageField( - verbose_name=_("Illustration (local image)"), - help_text=_("Illustration image stored in the agenda server"), + verbose_name=_("Illustration"), max_length=1024, blank=True, null=True, ) image = models.URLField( - verbose_name=_("Illustration"), - help_text=_("URL of the illustration image"), + verbose_name=_("Illustration (URL)"), + help_text=_("External URL of the illustration image"), max_length=1024, blank=True, null=True, @@ -680,7 +673,6 @@ class Event(models.Model): tags = ArrayField( models.CharField(max_length=64), verbose_name=_("Tags"), - help_text=_("A list of tags that describe the event."), blank=True, null=True, ) diff --git a/src/agenda_culturel/static/js/adjust_datetimes.js b/src/agenda_culturel/static/js/adjust_datetimes.js index f6cb46f..9230f1e 100644 --- a/src/agenda_culturel/static/js/adjust_datetimes.js +++ b/src/agenda_culturel/static/js/adjust_datetimes.js @@ -43,6 +43,10 @@ const update_datetimes = (event) => { start_day.oldvalue = start_day.value; } + else { + new_date = new Date(start_day.value); + end_day.value = formatDate(new_date); + } } else { if (end_day.value && end_time.value && start_day.value) { diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 63a32be..6e0b43c 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -972,7 +972,7 @@ aside nav.paragraph li a, aside .no-breakline li a { } /* mise en forme pour les récurrences */ -article form p .recurrence-widget { +article form div .recurrence-widget { width: 100%; border: 0; @@ -1451,4 +1451,48 @@ form.messages div, form.moderation-events { label.required::after { content: ' *'; color: red; -} \ No newline at end of file +} + +.contenu #event_form { + div#group_start, div#group_end { + grid-column: auto; + .body_group { + display: grid; + grid-gap: 10px; + grid-template-columns: repeat(2, 1fr); + } + } +} + +/* group form */ +@media only screen and (min-width: 992px) { + .contenu #event_form form { + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-gap: 10px; + + >div { + grid-column: 1 / 3; + } + div#group_meta, div#group_meta-admin { + .body_group { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-gap: 10px; + div { + grid-column: auto; + } + } + } + div#group_meta { + .body_group { + display: grid; + grid-template-columns: repeat(2, 1fr); + } + } + } +} + +.maskable_group .body_group.closed { + display: none; +} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_form.html b/src/agenda_culturel/templates/agenda_culturel/event_form.html index f2a8207..fbc1128 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_form.html @@ -48,7 +48,7 @@ Duplication de {% else %} {% block content %} {% load static_content_extra %} -
+
{% if object %}

{% if form.is_clone_from_url %} @@ -78,8 +78,8 @@ Duplication de {% else %} {% endif %}
{% csrf_token %} {{ form.media }} - {{ form.as_p }} -
+ {{ form }} + diff --git a/src/agenda_culturel/templates/agenda_culturel/forms/div_group.html b/src/agenda_culturel/templates/agenda_culturel/forms/div_group.html new file mode 100644 index 0000000..969e31f --- /dev/null +++ b/src/agenda_culturel/templates/agenda_culturel/forms/div_group.html @@ -0,0 +1,59 @@ + +{{ errors }} +{% if errors and not fields %} +

{% for field in hidden_fields %}{{ field }}{% endfor %}

+{% endif %} +{% for group, fields in form.fields_by_group %} +
+ {% if group.maskable %} + + {% endif %} +
+ {% for field in fields %} +
+ {{ field.errors }} +
+ {% endfor %} +
+
+ {% for field in fields %} +
+ + {% if field.label %}{{ field.label_tag }}{% endif %} + {{ field }} + {% if field.help_text %} + {{ field.help_text|safe }} + {% endif %} +
+
+ {% endfor %} +
+
+{% endfor %} +{% if not errors %} + {% for field in hidden_fields %}{{ field }}{% endfor %} +{% endif %} + \ No newline at end of file