diff --git a/src/agenda_culturel/calendar.py b/src/agenda_culturel/calendar.py index 4b7e2b2..809d75c 100644 --- a/src/agenda_culturel/calendar.py +++ b/src/agenda_culturel/calendar.py @@ -44,6 +44,9 @@ class DayInCalendar: self.time_intervals = None self.id = d.strftime("%Y-%m-%d") + self.periods = [] + self.has_special_period_same_week = False + def is_in_past(self): return self.in_past @@ -77,6 +80,37 @@ class DayInCalendar: [(k, v) for k, v in self.events_by_category.items() if len(v) > 0] ) + def add_special_period(self, period): + self.periods.append(period) + + def is_public_holiday(self): + from .models import SpecialPeriod + + return ( + len( + [ + p + for p in self.periods + if p.periodtype == SpecialPeriod.PERIODTYPE.PUBLICHOLIDAYS + ] + ) + > 0 + ) + + def is_school_vacation(self): + from .models import SpecialPeriod + + return ( + len( + [ + p + for p in self.periods + if p.periodtype == SpecialPeriod.PERIODTYPE.SCHOOLVACATIONS + ] + ) + > 0 + ) + def add_event(self, event): if event.contains_date(self.date): if self.is_ancestor_uuid_event_from_other(event): @@ -276,6 +310,9 @@ class CalendarList: # create a list of DayInCalendars self.create_calendar_days() + # get special periods + self.load_special_periods() + # fill DayInCalendars with events self.fill_calendar_days() @@ -283,6 +320,13 @@ class CalendarList: for i, c in self.calendar_days.items(): c.filter_events() + def load_special_periods(self): + from .models import SpecialPeriod + + self.special_periods = SpecialPeriod.objects.filter( + Q(start_date__lte=self.lastdate) & Q(end_date__gte=self.firstdate) + ).order_by("-periodtype") + def get_calendar_days(self): if self.calendar_days is None: self.build_internal() @@ -388,6 +432,42 @@ class CalendarList: ): self.calendar_days[d.__str__()].add_event(e_rec) + for p in self.special_periods: + first_date = max(p.start_date, self.firstdate) + end_date = min(p.end_date, self.lastdate) + current_date = first_date + while current_date <= end_date: + self.calendar_days[current_date.__str__()].add_special_period(p) + current_date += timedelta(days=1) + + start_week = first_date - timedelta(days=first_date.weekday()) + end_week = end_date + timedelta(end_date.weekday()) + c = start_week + while c < p.start_date: + if c.__str__() in self.calendar_days: + self.calendar_days[c.__str__()].has_special_period_same_week = True + c += timedelta(days=1) + + c = p.end_date + timedelta(days=1) + while c <= end_week: + if c.__str__() in self.calendar_days: + self.calendar_days[c.__str__()].has_special_period_same_week = True + c += timedelta(days=1) + + def has_school_vacation(self): + from .models import SpecialPeriod + + return ( + len( + [ + p + for p in self.special_periods + if p.periodtype == SpecialPeriod.PERIODTYPE.SCHOOLVACATIONS + ] + ) + > 0 + ) + def create_calendar_days(self): # create daylist self.calendar_days = {} diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index 8f6d041..17d68b9 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -20,6 +20,7 @@ from django.forms import ( TextInput, URLField, ValidationError, + FileField, formset_factory, ) from django.utils.formats import localize @@ -1003,3 +1004,12 @@ class SpecialPeriodForm(ModelForm): "start_date": TextInput(attrs={"type": "date"}), "end_date": TextInput(attrs={"type": "date"}), } + + +class SpecialPeriodFileForm(Form): + periodtype = ChoiceField( + label=_("Period type"), + required=True, + choices=SpecialPeriod.PERIODTYPE.choices, + ) + file = FileField(label=_("ICAL file"), required=True) diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po index db3fade..aeb13d2 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: 2025-04-04 20:44+0200\n" +"POT-Creation-Date: 2025-04-06 11:21+0200\n" "PO-Revision-Date: 2023-10-29 14:16+0000\n" "Last-Translator: Jean-Marie Favreau \n" "Language-Team: Jean-Marie Favreau \n" @@ -142,12 +142,12 @@ msgstr "dernier créé d'abord" msgid "Imported from" msgstr "Importé depuis" -#: agenda_culturel/filters.py:470 agenda_culturel/models.py:874 -#: agenda_culturel/models.py:2990 +#: agenda_culturel/filters.py:470 agenda_culturel/models.py:875 +#: agenda_culturel/models.py:2991 msgid "Status" msgstr "Status" -#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2754 +#: agenda_culturel/filters.py:471 agenda_culturel/models.py:2755 msgid "Closed" msgstr "Fermé" @@ -156,7 +156,7 @@ msgid "Open" msgstr "Ouvert" #: agenda_culturel/filters.py:475 agenda_culturel/filters.py:476 -#: agenda_culturel/models.py:2748 +#: agenda_culturel/models.py:2749 msgid "Spam" msgstr "Spam" @@ -164,7 +164,7 @@ msgstr "Spam" msgid "Non spam" msgstr "Non spam" -#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2769 +#: agenda_culturel/filters.py:481 agenda_culturel/models.py:2770 msgid "Type" msgstr "Type" @@ -176,70 +176,70 @@ msgstr "Rechercher" msgid "In the past" msgstr "Dans le passé" -#: agenda_culturel/forms.py:100 +#: agenda_culturel/forms.py:101 msgid "Other" msgstr "Autres" -#: agenda_culturel/forms.py:143 +#: agenda_culturel/forms.py:144 msgid "Name of new tag" msgstr "Nom de la nouvelle étiquette" -#: agenda_culturel/forms.py:147 +#: agenda_culturel/forms.py:148 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:166 +#: agenda_culturel/forms.py:167 msgid "Your email" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:167 agenda_culturel/models.py:2736 +#: agenda_culturel/forms.py:168 agenda_culturel/models.py:2737 msgid "Your email address" msgstr "Votre adresse email" -#: agenda_culturel/forms.py:173 agenda_culturel/models.py:2761 +#: agenda_culturel/forms.py:174 agenda_culturel/models.py:2762 msgid "Comments" msgstr "Commentaires" -#: agenda_culturel/forms.py:175 +#: agenda_culturel/forms.py:176 msgid "" "Your message for the moderation team (comments, clarifications, requests...)" msgstr "" "Votre message pour l'équipe de modération (commentaires, précisions, " "demandes, ...)" -#: agenda_culturel/forms.py:190 +#: agenda_culturel/forms.py:191 msgid "Receive notification of publication or leave a message for moderation" msgstr "Être notifié de la publication ou laisser un message à la modération" -#: agenda_culturel/forms.py:207 agenda_culturel/models.py:314 -#: agenda_culturel/models.py:882 agenda_culturel/models.py:2914 -#: agenda_culturel/models.py:3025 +#: agenda_culturel/forms.py:208 agenda_culturel/models.py:315 +#: agenda_culturel/models.py:883 agenda_culturel/models.py:2915 +#: agenda_culturel/models.py:3026 msgid "Category" msgstr "Catégorie" -#: agenda_culturel/forms.py:213 agenda_culturel/forms.py:246 -#: agenda_culturel/forms.py:292 agenda_culturel/forms.py:476 -#: agenda_culturel/models.py:368 agenda_culturel/models.py:999 +#: agenda_culturel/forms.py:214 agenda_culturel/forms.py:247 +#: agenda_culturel/forms.py:293 agenda_culturel/forms.py:477 +#: agenda_culturel/models.py:369 agenda_culturel/models.py:1000 msgid "Tags" msgstr "Étiquettes" -#: agenda_culturel/forms.py:221 agenda_culturel/forms.py:641 -#: agenda_culturel/models.py:1129 +#: agenda_culturel/forms.py:222 agenda_culturel/forms.py:642 +#: agenda_culturel/models.py:1130 msgid "Event" msgstr "Événement" -#: agenda_culturel/forms.py:271 agenda_culturel/models.py:70 +#: agenda_culturel/forms.py:272 agenda_culturel/models.py:71 msgid "The '/' character is not allowed." msgstr "Le caractère '/' n'est pas autorisé." -#: agenda_culturel/forms.py:278 agenda_culturel/forms.py:482 +#: agenda_culturel/forms.py:279 agenda_culturel/forms.py:483 msgid "New tags" msgstr "Nouvelles étiquettes" -#: agenda_culturel/forms.py:280 agenda_culturel/forms.py:484 +#: agenda_culturel/forms.py:281 agenda_culturel/forms.py:485 msgid "" "Create new labels (sparingly). Note: by starting your tag with the " "characters “TW:”, youll create a “trigger warning” tag, and the associated " @@ -250,145 +250,153 @@ msgstr "" "étiquette “trigger warning”, et les événements associés seront annoncés " "comme tels." -#: agenda_culturel/forms.py:352 +#: agenda_culturel/forms.py:353 msgid "Main fields" msgstr "Champs principaux" -#: agenda_culturel/forms.py:355 +#: agenda_culturel/forms.py:356 msgid "Start of event" msgstr "Début de l'événement" -#: agenda_culturel/forms.py:359 +#: agenda_culturel/forms.py:360 msgid "End of event" msgstr "Fin de l'événement" -#: agenda_culturel/forms.py:365 +#: agenda_culturel/forms.py:366 msgid "This is a recurring event" msgstr "Cet événement est récurrent" -#: agenda_culturel/forms.py:377 +#: agenda_culturel/forms.py:378 msgid "Details" msgstr "Détails" -#: agenda_culturel/forms.py:382 agenda_culturel/models.py:911 -#: agenda_culturel/models.py:2889 +#: agenda_culturel/forms.py:383 agenda_culturel/models.py:912 +#: agenda_culturel/models.py:2890 msgid "Location" msgstr "Localisation" -#: agenda_culturel/forms.py:387 agenda_culturel/models.py:112 -#: agenda_culturel/models.py:955 +#: agenda_culturel/forms.py:388 agenda_culturel/models.py:113 +#: agenda_culturel/models.py:956 msgid "Illustration" msgstr "Illustration" -#: agenda_culturel/forms.py:391 +#: agenda_culturel/forms.py:392 msgid "URLs" msgstr "URLs" -#: agenda_culturel/forms.py:395 agenda_culturel/forms.py:402 +#: agenda_culturel/forms.py:396 agenda_culturel/forms.py:403 msgid "Meta information" msgstr "Méta-informations" -#: agenda_culturel/forms.py:419 +#: agenda_culturel/forms.py:420 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:435 +#: agenda_culturel/forms.py:436 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:477 +#: agenda_culturel/forms.py:478 msgid "Select tags from existing ones." msgstr "Sélectionner des étiquettes depuis celles existantes." -#: agenda_culturel/forms.py:538 +#: agenda_culturel/forms.py:539 msgid "JSON in the format expected for the import." msgstr "JSON dans le format attendu pour l'import" -#: agenda_culturel/forms.py:560 +#: agenda_culturel/forms.py:561 msgid " (locally modified version)" msgstr " (version modifiée localement)" -#: agenda_culturel/forms.py:564 +#: agenda_culturel/forms.py:565 msgid " (synchronized on import version)" msgstr " (version synchronisée sur l'import)" -#: agenda_culturel/forms.py:568 +#: agenda_culturel/forms.py:569 msgid "Select {} as representative version." msgstr "Sélectionner {} comme version représentative" -#: agenda_culturel/forms.py:578 +#: agenda_culturel/forms.py:579 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:585 +#: agenda_culturel/forms.py:586 msgid " Warning: a version is already locally modified." msgstr " Attention: une version a déjà été modifiée localement." -#: agenda_culturel/forms.py:592 +#: agenda_culturel/forms.py:593 msgid "Create a new version by merging (interactive mode)." msgstr "Créer une nouvelle version par fusion (mode interactif)." -#: agenda_culturel/forms.py:600 +#: agenda_culturel/forms.py:601 msgid "Make {} independent." msgstr "Rendre {} indépendant." -#: agenda_culturel/forms.py:603 +#: agenda_culturel/forms.py:604 msgid "Make all versions independent." msgstr "Rendre toutes les versions indépendantes." -#: agenda_culturel/forms.py:675 agenda_culturel/forms.py:688 +#: agenda_culturel/forms.py:676 agenda_culturel/forms.py:689 msgid "Value of version {}" msgstr "Valeur de la version {}" -#: agenda_culturel/forms.py:680 +#: agenda_culturel/forms.py:681 msgid "Value of the selected version" msgstr "Valeur de la version sélectionnée" -#: agenda_culturel/forms.py:850 +#: agenda_culturel/forms.py:851 msgid "Apply category {} to the event {}" msgstr "Appliquer la catégorie {} à l'événement {}" -#: agenda_culturel/forms.py:867 agenda_culturel/models.py:699 -#: agenda_culturel/models.py:3077 +#: agenda_culturel/forms.py:868 agenda_culturel/models.py:700 +#: agenda_culturel/models.py:3078 msgid "Place" msgstr "Lieu" -#: agenda_culturel/forms.py:869 +#: agenda_culturel/forms.py:870 msgid "Create a missing place" msgstr "Créer un lieu manquant" -#: agenda_culturel/forms.py:879 +#: agenda_culturel/forms.py:880 msgid "Add \"{}\" to the aliases of the place" msgstr "Ajouter « {} » aux alias du lieu" -#: agenda_culturel/forms.py:908 +#: agenda_culturel/forms.py:909 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/forms.py:921 +#: agenda_culturel/forms.py:922 msgid "Header" msgstr "Entête" -#: agenda_culturel/forms.py:924 agenda_culturel/models.py:661 +#: agenda_culturel/forms.py:925 agenda_culturel/models.py:662 msgid "Address" msgstr "Adresse" -#: agenda_culturel/forms.py:930 +#: agenda_culturel/forms.py:931 msgid "Meta" msgstr "Méta" -#: agenda_culturel/forms.py:933 +#: agenda_culturel/forms.py:934 msgid "Information" msgstr "Informations" -#: agenda_culturel/forms.py:985 +#: agenda_culturel/forms.py:986 msgid "Add a comment" msgstr "Ajouter un commentaire" +#: agenda_culturel/forms.py:1011 agenda_culturel/models.py:3179 +msgid "Period type" +msgstr "Type de période" + +#: agenda_culturel/forms.py:1015 +msgid "ICAL file" +msgstr "Fichier ICAL" + #: agenda_culturel/import_tasks/extractor.py:225 msgid "Unknown title" msgstr "Titre inconnu" @@ -418,67 +426,67 @@ msgstr "" "la page n'était pas encore peuplée des événements, le temps de chargement a " "sans doute été trop court" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:66 msgid "mean" msgstr "moyenne" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:66 msgid "median" msgstr "médiane" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:66 msgid "maximum" msgstr "maximum" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:66 msgid "minimum" msgstr "minimum" -#: agenda_culturel/models.py:65 +#: agenda_culturel/models.py:66 msgid "stdev" msgstr "écart-type" -#: agenda_culturel/models.py:75 +#: agenda_culturel/models.py:76 msgid "Site name" msgstr "Nom du site" -#: agenda_culturel/models.py:78 +#: agenda_culturel/models.py:79 msgid "Site url" msgstr "URL du site" -#: agenda_culturel/models.py:81 +#: agenda_culturel/models.py:82 msgid "Site description" msgstr "Description du site" -#: agenda_culturel/models.py:87 +#: agenda_culturel/models.py:88 msgid "Keywords in html header" msgstr "Mots-clés dans l'entête html" -#: agenda_culturel/models.py:92 +#: agenda_culturel/models.py:93 msgid "Description in html header" msgstr "Description dans l'entête html" -#: agenda_culturel/models.py:97 +#: agenda_culturel/models.py:98 msgid "Google site verification value" msgstr "Valeur de vérification de site Google" -#: agenda_culturel/models.py:104 +#: agenda_culturel/models.py:105 msgid "Microsoft (bing) site verification value" msgstr "Valeur de vérification de site Microsoft (bing)" -#: agenda_culturel/models.py:118 +#: agenda_culturel/models.py:119 msgid "Illustration (development version)" msgstr "Illustration (version de développement)" -#: agenda_culturel/models.py:151 agenda_culturel/models.py:154 +#: agenda_culturel/models.py:152 agenda_culturel/models.py:155 msgid "Site Configuration" msgstr "Configuration du site" -#: agenda_culturel/models.py:165 +#: agenda_culturel/models.py:166 msgid "Expert moderation user" msgstr "Utilisateur expert en modération" -#: agenda_culturel/models.py:167 +#: agenda_culturel/models.py:168 msgid "" "This user is an expert in moderation, and the interface features additional " "functionalities." @@ -486,102 +494,102 @@ msgstr "" "Cet utilisateur est un expert en modération, et l'interface comporte des " "fonctionnalités additionnelles." -#: agenda_culturel/models.py:173 agenda_culturel/models.py:177 +#: agenda_culturel/models.py:174 agenda_culturel/models.py:178 msgid "User profile" msgstr "" -#: agenda_culturel/models.py:174 +#: agenda_culturel/models.py:175 msgid "User profiles" msgstr "" -#: agenda_culturel/models.py:197 agenda_culturel/models.py:244 -#: agenda_culturel/models.py:323 agenda_culturel/models.py:618 -#: agenda_culturel/models.py:659 agenda_culturel/models.py:765 -#: agenda_culturel/models.py:2728 agenda_culturel/models.py:2839 +#: agenda_culturel/models.py:198 agenda_culturel/models.py:245 +#: agenda_culturel/models.py:324 agenda_culturel/models.py:619 +#: agenda_culturel/models.py:660 agenda_culturel/models.py:766 +#: agenda_culturel/models.py:2729 agenda_culturel/models.py:2840 msgid "Name" msgstr "Nom" -#: agenda_culturel/models.py:198 agenda_culturel/models.py:244 +#: agenda_culturel/models.py:199 agenda_culturel/models.py:245 msgid "Category name" msgstr "Nom de la catégorie" -#: agenda_culturel/models.py:203 +#: agenda_culturel/models.py:204 msgid "Content" msgstr "Contenu" -#: agenda_culturel/models.py:204 +#: agenda_culturel/models.py:205 msgid "Text as shown to the visitors" msgstr "Texte tel que présenté aux visiteureuses" -#: agenda_culturel/models.py:208 +#: agenda_culturel/models.py:209 msgid "URL path" msgstr "Chemin URL" -#: agenda_culturel/models.py:209 +#: agenda_culturel/models.py:210 msgid "URL path where the content is included." msgstr "Chemin URL où le contenu est présent." -#: agenda_culturel/models.py:213 +#: agenda_culturel/models.py:214 msgid "Static content" msgstr "Contenu statique" -#: agenda_culturel/models.py:214 +#: agenda_culturel/models.py:215 msgid "Static contents" msgstr "Contenus statiques" -#: agenda_culturel/models.py:250 +#: agenda_culturel/models.py:251 msgid "Color" msgstr "Couleur" -#: agenda_culturel/models.py:251 +#: agenda_culturel/models.py:252 msgid "Color used as background for the category" msgstr "Couleur utilisée comme fond de la catégorie" -#: agenda_culturel/models.py:257 +#: agenda_culturel/models.py:258 msgid "Pictogram" msgstr "Pictogramme" -#: agenda_culturel/models.py:258 +#: agenda_culturel/models.py:259 msgid "Pictogram of the category (svg format)" msgstr "Pictogramme de la catégorie (format svg)" -#: agenda_culturel/models.py:265 +#: agenda_culturel/models.py:266 msgid "Position for ordering categories" msgstr "Position pour ordonner les catégories" -#: agenda_culturel/models.py:315 +#: agenda_culturel/models.py:316 msgid "Categories" msgstr "Catégories" -#: agenda_culturel/models.py:324 +#: agenda_culturel/models.py:325 msgid "Tag name" msgstr "Nom de l'étiquette" -#: agenda_culturel/models.py:331 agenda_culturel/models.py:682 -#: agenda_culturel/models.py:781 agenda_culturel/models.py:938 +#: agenda_culturel/models.py:332 agenda_culturel/models.py:683 +#: agenda_culturel/models.py:782 agenda_culturel/models.py:939 msgid "Description" msgstr "Description" -#: agenda_culturel/models.py:332 +#: agenda_culturel/models.py:333 msgid "Description of the tag" msgstr "Description de l'étiquette" -#: agenda_culturel/models.py:338 agenda_culturel/models.py:2695 -#: agenda_culturel/models.py:2742 +#: agenda_culturel/models.py:339 agenda_culturel/models.py:2696 +#: agenda_culturel/models.py:2743 msgid "Message" msgstr "Message" -#: agenda_culturel/models.py:340 +#: agenda_culturel/models.py:341 msgid "Message displayed to the user on each event associated with this tag." msgstr "" "Message affiché à l'utilisateur sur chaque événement associé à cette " "étiquette." -#: agenda_culturel/models.py:347 +#: agenda_culturel/models.py:348 msgid "Principal" msgstr "Principal" -#: agenda_culturel/models.py:349 +#: agenda_culturel/models.py:350 msgid "" "This tag is highlighted as a main tag for visitors, particularly in the " "filter." @@ -589,91 +597,91 @@ msgstr "" "Cette étiquette est mise en avant comme étiquette principale pour les " "visiteurs, en particulier dans le filtre." -#: agenda_culturel/models.py:355 +#: agenda_culturel/models.py:356 msgid "In excluded suggestions" msgstr "Dans les suggestions d'exclusion" -#: agenda_culturel/models.py:356 +#: agenda_culturel/models.py:357 msgid "This tag will be part of the excluded suggestions." msgstr "Cette étiquette fera partie des suggestions d'exclusion." -#: agenda_culturel/models.py:361 +#: agenda_culturel/models.py:362 msgid "In included suggestions" msgstr "Dans les suggestions d'inclusion." -#: agenda_culturel/models.py:362 +#: agenda_culturel/models.py:363 msgid "This tag will be part of the included suggestions." msgstr "Cette étiquette fera partie des suggestions d'inclusion." -#: agenda_culturel/models.py:367 +#: agenda_culturel/models.py:368 msgid "Tag" msgstr "Étiquette" -#: agenda_culturel/models.py:456 +#: agenda_culturel/models.py:457 msgid "Suggestions" msgstr "Suggestions" -#: agenda_culturel/models.py:457 +#: agenda_culturel/models.py:458 msgid "Others" msgstr "Autres" -#: agenda_culturel/models.py:470 +#: agenda_culturel/models.py:471 msgid "Representative event" msgstr "Événement représentatif" -#: agenda_culturel/models.py:472 +#: agenda_culturel/models.py:473 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:480 agenda_culturel/models.py:481 +#: agenda_culturel/models.py:481 agenda_culturel/models.py:482 msgid "Duplicated events" msgstr "Événements dupliqués" -#: agenda_culturel/models.py:619 +#: agenda_culturel/models.py:620 msgid "Name of the location" msgstr "Nom de la position" -#: agenda_culturel/models.py:630 +#: agenda_culturel/models.py:631 msgid "Main" msgstr "Principale" -#: agenda_culturel/models.py:632 +#: agenda_culturel/models.py:633 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:637 +#: agenda_culturel/models.py:638 msgid "Suggested distance (km)" msgstr "" -#: agenda_culturel/models.py:639 +#: agenda_culturel/models.py:640 msgid "" "If this distance is given, this location is part of the suggested filters." msgstr "" -#: agenda_culturel/models.py:648 +#: agenda_culturel/models.py:649 msgid "Reference location" msgstr "Position de référence" -#: agenda_culturel/models.py:649 +#: agenda_culturel/models.py:650 msgid "Reference locations" msgstr "Positions de référence" -#: agenda_culturel/models.py:659 +#: agenda_culturel/models.py:660 msgid "Name of the place" msgstr "Nom du lieu" -#: agenda_culturel/models.py:662 +#: agenda_culturel/models.py:663 msgid "Address of this place (without city name)" msgstr "Adresse de ce lieu (sans le nom de la ville)" -#: agenda_culturel/models.py:667 +#: agenda_culturel/models.py:668 msgid "Postcode" msgstr "Code postal" -#: agenda_culturel/models.py:669 +#: agenda_culturel/models.py:670 msgid "" "The post code is not displayed, but makes it easier to find an address when " "you enter it." @@ -681,23 +689,23 @@ msgstr "" "Le code postal ne sera pas affiché, mais facilite la recherche d'adresse au " "moment de la saisie." -#: agenda_culturel/models.py:674 +#: agenda_culturel/models.py:675 msgid "City" msgstr "Ville" -#: agenda_culturel/models.py:674 +#: agenda_culturel/models.py:675 msgid "City name" msgstr "Nom de la ville" -#: agenda_culturel/models.py:683 +#: agenda_culturel/models.py:684 msgid "Description of the place, including accessibility." msgstr "Description du lieu, inclus l'accessibilité." -#: agenda_culturel/models.py:690 +#: agenda_culturel/models.py:691 msgid "Alternative names" msgstr "Noms alternatifs" -#: agenda_culturel/models.py:692 +#: agenda_culturel/models.py:693 msgid "" "Alternative names or addresses used to match a place with the free-form " "location of an event." @@ -705,31 +713,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:700 +#: agenda_culturel/models.py:701 msgid "Places" msgstr "Lieux" -#: agenda_culturel/models.py:766 +#: agenda_culturel/models.py:767 msgid "Organisation name" msgstr "Nom de l'organisme" -#: agenda_culturel/models.py:773 +#: agenda_culturel/models.py:774 msgid "Website" msgstr "Site internet" -#: agenda_culturel/models.py:774 +#: agenda_culturel/models.py:775 msgid "Website of the organisation" msgstr "Site internet de l'organisme" -#: agenda_culturel/models.py:782 +#: agenda_culturel/models.py:783 msgid "Description of the organisation." msgstr "Description de l'organisme" -#: agenda_culturel/models.py:789 +#: agenda_culturel/models.py:790 msgid "Principal place" msgstr "Lieu principal" -#: agenda_culturel/models.py:791 +#: agenda_culturel/models.py:792 msgid "" "Place mainly associated with this organizer. Mainly used if there is a " "similarity in the name, to avoid redundant displays." @@ -737,75 +745,75 @@ 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:799 +#: agenda_culturel/models.py:800 msgid "Organisation" msgstr "Organisme" -#: agenda_culturel/models.py:800 +#: agenda_culturel/models.py:801 msgid "Organisations" msgstr "Organismes" -#: agenda_culturel/models.py:811 agenda_culturel/models.py:2884 +#: agenda_culturel/models.py:812 agenda_culturel/models.py:2885 msgid "Published" msgstr "Publié" -#: agenda_culturel/models.py:812 +#: agenda_culturel/models.py:813 msgid "Draft" msgstr "Brouillon" -#: agenda_culturel/models.py:813 +#: agenda_culturel/models.py:814 msgid "Trash" msgstr "Corbeille" -#: agenda_culturel/models.py:823 +#: agenda_culturel/models.py:824 msgid "Author currently editing/moderating the event" msgstr "" -#: agenda_culturel/models.py:833 +#: agenda_culturel/models.py:834 msgid "Author of the event creation" msgstr "Auteur de la création de l'événement" -#: agenda_culturel/models.py:842 +#: agenda_culturel/models.py:843 msgid "Author of the last importation" msgstr "Auteur de la dernière importation" -#: agenda_culturel/models.py:851 +#: agenda_culturel/models.py:852 msgid "Author of the last modification" msgstr "Auteur de la dernière modification" -#: agenda_culturel/models.py:860 +#: agenda_culturel/models.py:861 msgid "Author of the last moderation" msgstr "Auteur de la dernière modération" -#: agenda_culturel/models.py:871 +#: agenda_culturel/models.py:872 msgid "Title" msgstr "Titre" -#: agenda_culturel/models.py:888 agenda_culturel/models.py:3163 +#: agenda_culturel/models.py:889 agenda_culturel/models.py:3164 msgid "Start day" msgstr "Date de début" -#: agenda_culturel/models.py:890 +#: agenda_culturel/models.py:891 msgid "Start time" msgstr "Heure de début" -#: agenda_culturel/models.py:896 agenda_culturel/models.py:3164 +#: agenda_culturel/models.py:897 agenda_culturel/models.py:3165 msgid "End day" msgstr "Date de fin" -#: agenda_culturel/models.py:900 +#: agenda_culturel/models.py:901 msgid "End time" msgstr "Heure de fin" -#: agenda_culturel/models.py:903 +#: agenda_culturel/models.py:904 msgid "Recurrence" msgstr "Récurrence" -#: agenda_culturel/models.py:917 +#: agenda_culturel/models.py:918 msgid "Location (free form)" msgstr "Localisation (forme libre)" -#: agenda_culturel/models.py:919 +#: agenda_culturel/models.py:920 msgid "" "Address of the event in case its not available in the already known places " "(free form)" @@ -813,11 +821,11 @@ msgstr "" "Adresse d'un événement si elle n'est pas déjà présente dans la liste des " "lieux disponibles (forme libre)" -#: agenda_culturel/models.py:928 +#: agenda_culturel/models.py:929 msgid "Local event" msgstr "Événement de portée locale" -#: agenda_culturel/models.py:930 +#: agenda_culturel/models.py:931 msgid "" "If the event is a local event, it will not be proposed by default in daily, " "weekly or monthly views, unless the user has explicitly indicated that he " @@ -827,11 +835,11 @@ msgstr "" "les vues quotidiennes, hebdomadaires ou mensuelles, sauf si l'utilisateur a " "explicitement indiqué qu'il souhaite voir ces événements." -#: agenda_culturel/models.py:946 +#: agenda_culturel/models.py:947 msgid "Organisers" msgstr "Organisateurs" -#: agenda_culturel/models.py:948 +#: agenda_culturel/models.py:949 msgid "" "list of event organisers. Organizers will only be displayed if one of them " "does not normally use the venue." @@ -839,112 +847,112 @@ 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:962 +#: agenda_culturel/models.py:963 msgid "Illustration (URL)" msgstr "Illustration (URL)" -#: agenda_culturel/models.py:963 +#: agenda_culturel/models.py:964 msgid "External URL of the illustration image" msgstr "URL externe de l'image illustrative" -#: agenda_culturel/models.py:969 +#: agenda_culturel/models.py:970 msgid "Illustration description" msgstr "Description de l'illustration" -#: agenda_culturel/models.py:970 +#: agenda_culturel/models.py:971 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:978 +#: agenda_culturel/models.py:979 msgid "Importation source" msgstr "Source d'importation" -#: agenda_culturel/models.py:979 +#: agenda_culturel/models.py:980 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:985 +#: agenda_culturel/models.py:986 msgid "UUIDs" msgstr "UUIDs" -#: agenda_culturel/models.py:986 +#: agenda_culturel/models.py:987 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:992 +#: agenda_culturel/models.py:993 msgid "Online sources or ticketing" msgstr "Sources en ligne ou billetterie" -#: agenda_culturel/models.py:1006 +#: agenda_culturel/models.py:1007 msgid "Other versions" msgstr "" -#: agenda_culturel/models.py:1130 +#: agenda_culturel/models.py:1131 msgid "Events" msgstr "Événements" -#: agenda_culturel/models.py:1291 +#: agenda_culturel/models.py:1292 msgid "recurrent import" msgstr "import récurrent" -#: agenda_culturel/models.py:1293 +#: agenda_culturel/models.py:1294 msgid "a non authenticated user" msgstr "un utilisateur non connecté" -#: agenda_culturel/models.py:1776 +#: agenda_culturel/models.py:1777 msgid "Your event has been published" msgstr "Ton événement a été publié" -#: agenda_culturel/models.py:1781 +#: agenda_culturel/models.py:1782 msgid "Your message has not been retained" msgstr "Ton événement n'a pas été retenu" -#: agenda_culturel/models.py:1869 agenda_culturel/models.py:2692 +#: agenda_culturel/models.py:1870 agenda_culturel/models.py:2693 msgid "Warning" msgstr "Warning" -#: agenda_culturel/models.py:1871 agenda_culturel/models.py:1977 +#: agenda_culturel/models.py:1872 agenda_culturel/models.py:1978 msgid "the date has not been imported correctly." msgstr "la date n'a pas été importée correctement." -#: agenda_culturel/models.py:1959 +#: agenda_culturel/models.py:1960 msgid "during import process" msgstr "pendant le processus d'import" -#: agenda_culturel/models.py:1975 agenda_culturel/models.py:1985 -#: agenda_culturel/models.py:1996 +#: agenda_culturel/models.py:1976 agenda_culturel/models.py:1986 +#: agenda_culturel/models.py:1997 msgid "warning" msgstr "attention" -#: agenda_culturel/models.py:1987 +#: agenda_culturel/models.py:1988 msgid "the title has not been imported correctly." msgstr "le titre n'a pas été importé correctement." -#: agenda_culturel/models.py:1999 +#: agenda_culturel/models.py:2000 msgid "The import was unable to find an event in the page." msgstr "L'import a été incapable de trouver un événement dans la page." -#: agenda_culturel/models.py:2347 +#: agenda_culturel/models.py:2348 msgid "Updated field(s): " msgstr "Champ(s) mis à jour: " -#: agenda_culturel/models.py:2351 +#: agenda_culturel/models.py:2352 msgid "Update" msgstr "Mise à jour" -#: agenda_culturel/models.py:2352 +#: agenda_culturel/models.py:2353 msgid "update process" msgstr "processus de mise à jour" -#: agenda_culturel/models.py:2421 +#: agenda_culturel/models.py:2422 msgid "Import" msgstr "Import" -#: agenda_culturel/models.py:2422 +#: agenda_culturel/models.py:2423 msgid "import process" msgstr "processus d'import" -#: agenda_culturel/models.py:2424 +#: agenda_culturel/models.py:2425 msgid "" "The duration of the event is a little too long for direct publication. " "Moderators can choose to publish it or not." @@ -952,195 +960,195 @@ msgstr "" "La durée de l'événement est un peu trop longue pour qu'il soit publié " "directement. Les modérateurs peuvent choisir de le publier ou non." -#: agenda_culturel/models.py:2683 +#: agenda_culturel/models.py:2684 msgid "From contributor" msgstr "D'un·e contributeurice" -#: agenda_culturel/models.py:2684 +#: agenda_culturel/models.py:2685 msgid "Import process" msgstr "Processus d'import" -#: agenda_culturel/models.py:2685 +#: agenda_culturel/models.py:2686 msgid "Update process" msgstr "Processus de mise à jour" -#: agenda_culturel/models.py:2686 +#: agenda_culturel/models.py:2687 msgid "Contact form" msgstr "Formulaire de contact" -#: agenda_culturel/models.py:2687 +#: agenda_culturel/models.py:2688 msgid "Event report" msgstr "Signalemet d'événement" -#: agenda_culturel/models.py:2690 +#: agenda_culturel/models.py:2691 msgid "From contributor (without message)" msgstr "D'un·e contributeurice (sans message)" -#: agenda_culturel/models.py:2696 +#: agenda_culturel/models.py:2697 msgid "Messages" msgstr "Messages" -#: agenda_culturel/models.py:2705 +#: agenda_culturel/models.py:2706 msgid "Subject" msgstr "Sujet" -#: agenda_culturel/models.py:2706 +#: agenda_culturel/models.py:2707 msgid "The subject of your message" msgstr "Sujet de votre message" -#: agenda_culturel/models.py:2712 +#: agenda_culturel/models.py:2713 msgid "Related event" msgstr "Événement associé" -#: agenda_culturel/models.py:2713 +#: agenda_culturel/models.py:2714 msgid "The message is associated with this event." msgstr "Le message est associé à cet événement." -#: agenda_culturel/models.py:2721 +#: agenda_culturel/models.py:2722 msgid "Author of the message" msgstr "Auteur du message" -#: agenda_culturel/models.py:2729 +#: agenda_culturel/models.py:2730 msgid "Your name" msgstr "Votre nom" -#: agenda_culturel/models.py:2735 +#: agenda_culturel/models.py:2736 msgid "Email address" msgstr "Adresse email" -#: agenda_culturel/models.py:2742 +#: agenda_culturel/models.py:2743 msgid "Your message" msgstr "Votre message" -#: agenda_culturel/models.py:2749 +#: agenda_culturel/models.py:2750 msgid "This message is a spam." msgstr "Ce message est un spam." -#: agenda_culturel/models.py:2756 +#: agenda_culturel/models.py:2757 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:2762 +#: agenda_culturel/models.py:2763 msgid "Comments on the message from the moderation team" msgstr "Commentaires sur ce message par l'équipe de modération" -#: agenda_culturel/models.py:2795 agenda_culturel/models.py:2972 +#: agenda_culturel/models.py:2796 agenda_culturel/models.py:2973 msgid "Recurrent import" msgstr "Import récurrent" -#: agenda_culturel/models.py:2796 +#: agenda_culturel/models.py:2797 msgid "Recurrent imports" msgstr "Imports récurrents" -#: agenda_culturel/models.py:2800 +#: agenda_culturel/models.py:2801 msgid "ical" msgstr "ical" -#: agenda_culturel/models.py:2801 +#: agenda_culturel/models.py:2802 msgid "ical no busy" msgstr "ical sans busy" -#: agenda_culturel/models.py:2802 +#: agenda_culturel/models.py:2803 msgid "ical no VC" msgstr "ical sans VC" -#: agenda_culturel/models.py:2803 +#: agenda_culturel/models.py:2804 msgid "ical naive timezone" msgstr "ical timezone naïve" -#: agenda_culturel/models.py:2804 +#: agenda_culturel/models.py:2805 msgid "lacoope.org" msgstr "lacoope.org" -#: agenda_culturel/models.py:2805 +#: agenda_culturel/models.py:2806 msgid "la comédie" msgstr "la comédie" -#: agenda_culturel/models.py:2806 +#: agenda_culturel/models.py:2807 msgid "le fotomat" msgstr "le fotomat" -#: agenda_culturel/models.py:2807 +#: agenda_culturel/models.py:2808 msgid "la puce à l'oreille" msgstr "la puce à loreille" -#: agenda_culturel/models.py:2808 +#: agenda_culturel/models.py:2809 msgid "Plugin wordpress MEC" msgstr "Plugin wordpress MEC" -#: agenda_culturel/models.py:2809 +#: agenda_culturel/models.py:2810 msgid "Événements d'une page FB" msgstr "Événements d'une page FB" -#: agenda_culturel/models.py:2810 +#: agenda_culturel/models.py:2811 msgid "Billetterie Clermont-Ferrand" msgstr "" -#: agenda_culturel/models.py:2811 +#: agenda_culturel/models.py:2812 msgid "Arachnée concert" msgstr "Arachnée concert" -#: agenda_culturel/models.py:2812 +#: agenda_culturel/models.py:2813 msgid "Le Rio" msgstr "Le Rio" -#: agenda_culturel/models.py:2813 +#: agenda_culturel/models.py:2814 msgid "La Raymonde" msgstr "La Raymone" -#: agenda_culturel/models.py:2814 +#: agenda_culturel/models.py:2815 msgid "Agenda apidae tourisme" msgstr "Agenda apidae tourisme" -#: agenda_culturel/models.py:2815 +#: agenda_culturel/models.py:2816 msgid "Agenda iguana (médiathèques)" msgstr "Agenda iguana (médiathèques)" -#: agenda_culturel/models.py:2816 +#: agenda_culturel/models.py:2817 msgid "Mille formes" msgstr "Mille Formes" -#: agenda_culturel/models.py:2817 +#: agenda_culturel/models.py:2818 msgid "Les Amis du Temps des Cerises" msgstr "Les Amis du Temps des Cerises" -#: agenda_culturel/models.py:2818 +#: agenda_culturel/models.py:2819 msgid "Mobilizon" msgstr "Mobilizon" -#: agenda_culturel/models.py:2819 +#: agenda_culturel/models.py:2820 msgid "Le caméléon" msgstr "" -#: agenda_culturel/models.py:2820 +#: agenda_culturel/models.py:2821 msgid "Echosciences" msgstr "" -#: agenda_culturel/models.py:2823 +#: agenda_culturel/models.py:2824 msgid "simple" msgstr "simple" -#: agenda_culturel/models.py:2824 +#: agenda_culturel/models.py:2825 msgid "Headless Chromium" msgstr "chromium sans interface" -#: agenda_culturel/models.py:2827 +#: agenda_culturel/models.py:2828 msgid "Headless Chromium (pause)" msgstr "chromium sans interface (pause)" -#: agenda_culturel/models.py:2833 +#: agenda_culturel/models.py:2834 msgid "daily" msgstr "chaque jour" -#: agenda_culturel/models.py:2835 +#: agenda_culturel/models.py:2836 msgid "weekly" msgstr "chaque semaine" -#: agenda_culturel/models.py:2836 +#: agenda_culturel/models.py:2837 msgid "never" msgstr "jamais" -#: agenda_culturel/models.py:2841 +#: agenda_culturel/models.py:2842 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." @@ -1148,151 +1156,151 @@ 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:2848 +#: agenda_culturel/models.py:2849 msgid "Processor" msgstr "Processeur" -#: agenda_culturel/models.py:2854 +#: agenda_culturel/models.py:2855 msgid "Downloader" msgstr "Téléchargeur" -#: agenda_culturel/models.py:2861 +#: agenda_culturel/models.py:2862 msgid "Import recurrence" msgstr "Récurrence d'import" -#: agenda_culturel/models.py:2868 +#: agenda_culturel/models.py:2869 msgid "Source" msgstr "Source" -#: agenda_culturel/models.py:2869 +#: agenda_culturel/models.py:2870 msgid "URL of the source document" msgstr "URL du document source" -#: agenda_culturel/models.py:2874 +#: agenda_culturel/models.py:2875 msgid "Browsable url" msgstr "URL navigable" -#: agenda_culturel/models.py:2876 +#: agenda_culturel/models.py:2877 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:2885 +#: agenda_culturel/models.py:2886 msgid "Status of each imported event (published or draft)" msgstr "Status de chaque événement importé (publié ou brouillon)" -#: agenda_culturel/models.py:2890 +#: agenda_culturel/models.py:2891 msgid "Address for each imported event" msgstr "Adresse de chaque événement importé" -#: agenda_culturel/models.py:2897 +#: agenda_culturel/models.py:2898 msgid "Force location" msgstr "Focer la localisation" -#: agenda_culturel/models.py:2898 +#: agenda_culturel/models.py:2899 msgid "force location even if another is detected." msgstr "Forcer la localisation même si une autre a été détectée." -#: agenda_culturel/models.py:2904 +#: agenda_culturel/models.py:2905 msgid "Organiser" msgstr "Organisateur" -#: agenda_culturel/models.py:2905 +#: agenda_culturel/models.py:2906 msgid "Organiser of each imported event" msgstr "Organisateur de chaque événement importé" -#: agenda_culturel/models.py:2915 +#: agenda_culturel/models.py:2916 msgid "Category of each imported event" msgstr "Catégorie de chaque événement importé" -#: agenda_culturel/models.py:2923 +#: agenda_culturel/models.py:2924 msgid "Tags for each imported event" msgstr "Étiquettes de chaque événement importé" -#: agenda_culturel/models.py:2924 +#: agenda_culturel/models.py:2925 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:2953 +#: agenda_culturel/models.py:2954 msgid "Running" msgstr "En cours" -#: agenda_culturel/models.py:2954 +#: agenda_culturel/models.py:2955 msgid "Canceled" msgstr "Annulé" -#: agenda_culturel/models.py:2955 +#: agenda_culturel/models.py:2956 msgid "Success" msgstr "Succès" -#: agenda_culturel/models.py:2956 +#: agenda_culturel/models.py:2957 msgid "Failed" msgstr "Erreur" -#: agenda_culturel/models.py:2959 +#: agenda_culturel/models.py:2960 msgid "Batch importation" msgstr "Importation par lot" -#: agenda_culturel/models.py:2960 +#: agenda_culturel/models.py:2961 msgid "Batch importations" msgstr "Importations par lot" -#: agenda_culturel/models.py:2973 +#: agenda_culturel/models.py:2974 msgid "Reference to the recurrent import processing" msgstr "Référence du processus d'import récurrent" -#: agenda_culturel/models.py:2981 +#: agenda_culturel/models.py:2982 msgid "URL (if not recurrent import)" msgstr "URL (si pas d'import récurrent)" -#: agenda_culturel/models.py:2982 +#: agenda_culturel/models.py:2983 msgid "Source URL if no RecurrentImport is associated." msgstr "URL source si aucun import récurrent n'est associé" -#: agenda_culturel/models.py:2997 +#: agenda_culturel/models.py:2998 msgid "Error message" msgstr "Votre message" -#: agenda_culturel/models.py:3001 +#: agenda_culturel/models.py:3002 msgid "Number of collected events" msgstr "Nombre d'événements collectés" -#: agenda_culturel/models.py:3004 +#: agenda_culturel/models.py:3005 msgid "Number of imported events" msgstr "Nombre d'événements importés" -#: agenda_culturel/models.py:3007 +#: agenda_culturel/models.py:3008 msgid "Number of updated events" msgstr "Nombre d'événements mis à jour" -#: agenda_culturel/models.py:3010 +#: agenda_culturel/models.py:3011 msgid "Number of removed events" msgstr "Nombre d'événements supprimés" -#: agenda_culturel/models.py:3018 +#: agenda_culturel/models.py:3019 msgid "Weight" msgstr "Poids" -#: agenda_culturel/models.py:3019 +#: agenda_culturel/models.py:3020 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:3026 +#: agenda_culturel/models.py:3027 msgid "Category applied to the event" msgstr "Catégorie appliquée à l'événement" -#: agenda_culturel/models.py:3031 +#: agenda_culturel/models.py:3032 msgid "Contained in the title" msgstr "Contenu dans le titre" -#: agenda_culturel/models.py:3032 +#: agenda_culturel/models.py:3033 msgid "Text contained in the event title" msgstr "Texte contenu dans le titre de l'événement" -#: agenda_culturel/models.py:3038 +#: agenda_culturel/models.py:3039 msgid "Exact title extract" msgstr "Extrait exact du titre" -#: agenda_culturel/models.py:3040 +#: agenda_culturel/models.py:3041 msgid "" "If checked, the extract will be searched for in the title using the exact " "form (capitals, accents)." @@ -1300,19 +1308,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans le titre en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3046 +#: agenda_culturel/models.py:3047 msgid "Contained in the description" msgstr "Contenu dans la description" -#: agenda_culturel/models.py:3047 +#: agenda_culturel/models.py:3048 msgid "Text contained in the description" msgstr "Texte contenu dans la description" -#: agenda_culturel/models.py:3053 +#: agenda_culturel/models.py:3054 msgid "Exact description extract" msgstr "Extrait exact de description" -#: agenda_culturel/models.py:3055 +#: agenda_culturel/models.py:3056 msgid "" "If checked, the extract will be searched for in the description using the " "exact form (capitals, accents)." @@ -1320,19 +1328,19 @@ msgstr "" "Si coché, l'extrait sera recherché dans la description en utilisant la forme " "exacte (majuscules, accents)" -#: agenda_culturel/models.py:3061 +#: agenda_culturel/models.py:3062 msgid "Contained in the location" msgstr "Contenu dans la localisation" -#: agenda_culturel/models.py:3062 +#: agenda_culturel/models.py:3063 msgid "Text contained in the event location" msgstr "Texte contenu dans la localisation de l'événement" -#: agenda_culturel/models.py:3068 +#: agenda_culturel/models.py:3069 msgid "Exact location extract" msgstr "Extrait exact de localisation" -#: agenda_culturel/models.py:3070 +#: agenda_culturel/models.py:3071 msgid "" "If checked, the extract will be searched for in the location using the exact " "form (capitals, accents)." @@ -1340,55 +1348,51 @@ msgstr "" "Si coché, l'extrait sera recherché dans la localisation en utilisant la " "forme exacte (majuscules, accents)" -#: agenda_culturel/models.py:3078 +#: agenda_culturel/models.py:3079 msgid "Location from place" msgstr "Localisation depuis le lieu" -#: agenda_culturel/models.py:3087 +#: agenda_culturel/models.py:3088 msgid "Categorisation rule" msgstr "Règle de catégorisation" -#: agenda_culturel/models.py:3088 +#: agenda_culturel/models.py:3089 msgid "Categorisation rules" msgstr "Règles de catégorisation" -#: agenda_culturel/models.py:3162 +#: agenda_culturel/models.py:3163 msgid "Period name" msgstr "Nom de la période" -#: agenda_culturel/models.py:3167 +#: agenda_culturel/models.py:3168 msgid "Special period" msgstr "Période remarquable" -#: agenda_culturel/models.py:3168 +#: agenda_culturel/models.py:3169 msgid "Special periods" msgstr "Périodes remarquables" -#: agenda_culturel/models.py:3171 +#: agenda_culturel/models.py:3175 msgid "public holidays" msgstr "Jour férié" -#: agenda_culturel/models.py:3172 +#: agenda_culturel/models.py:3176 msgid "school vacations" msgstr "Vacances scolaires" -#: agenda_culturel/models.py:3175 -msgid "Period type" -msgstr "Type de période" - -#: agenda_culturel/models.py:3188 +#: agenda_culturel/models.py:3194 msgid "The end date must be after or equal to the start date." msgstr "La date de fin doit être après ou identique à la date de début." -#: agenda_culturel/models.py:3194 +#: agenda_culturel/models.py:3202 msgid " on " msgstr " du " -#: agenda_culturel/models.py:3196 +#: agenda_culturel/models.py:3205 msgid " from " msgstr " du " -#: agenda_culturel/models.py:3196 +#: agenda_culturel/models.py:3205 msgid " to " msgstr " au " @@ -1396,43 +1400,43 @@ msgstr " au " msgid "French" msgstr "français" -#: agenda_culturel/views.py:172 +#: agenda_culturel/views.py:173 msgid "Recurrent import name" msgstr "Nome de l'import récurrent" -#: agenda_culturel/views.py:173 +#: agenda_culturel/views.py:174 msgid "Add another" msgstr "Ajouter un autre" -#: agenda_culturel/views.py:174 +#: agenda_culturel/views.py:175 msgid "Browse..." msgstr "Naviguer..." -#: agenda_culturel/views.py:175 +#: agenda_culturel/views.py:176 msgid "No file selected." msgstr "Pas de fichier sélectionné." -#: agenda_culturel/views.py:193 +#: agenda_culturel/views.py:194 msgid ": error 500" msgstr ": erreur 500" -#: agenda_culturel/views.py:194 +#: agenda_culturel/views.py:195 msgid "An internal error has occurred on site {} at address {}." msgstr "Une erreur interne s'est produite sur le site {} à l'adresse {}." -#: agenda_culturel/views.py:233 +#: agenda_culturel/views.py:234 msgid "Moderation rules" msgstr "Règles de modération" -#: agenda_culturel/views.py:242 +#: agenda_culturel/views.py:243 msgid "Import requirements" msgstr "Besoins pour l'import" -#: agenda_culturel/views.py:448 +#: agenda_culturel/views.py:449 msgid "The static content has been successfully updated." msgstr "Le contenu statique a été modifié avec succès." -#: agenda_culturel/views.py:459 +#: agenda_culturel/views.py:460 msgid "" "The event cannot be updated because the import process is not available for " "the referenced sources." @@ -1440,21 +1444,21 @@ 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:472 +#: agenda_culturel/views.py:473 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:501 agenda_culturel/views.py:585 +#: agenda_culturel/views.py:502 agenda_culturel/views.py:586 msgid " A message has been sent to the person who proposed the event." msgstr " Un message a été envoyé à la personne qui a proposé l'événement." -#: agenda_culturel/views.py:505 +#: agenda_culturel/views.py:506 msgid "The event has been successfully modified." msgstr "L'événement a été modifié avec succès." -#: agenda_culturel/views.py:529 +#: agenda_culturel/views.py:530 msgid "" "Changes will be visible on a local copy of the event. The version identical " "to the imported source will be hidden." @@ -1462,19 +1466,19 @@ msgstr "" "Les modifications seront visibles sur une copie locale de l'événement. La " "version fidèle à la source importée sera masquée." -#: agenda_culturel/views.py:590 +#: agenda_culturel/views.py:591 msgid "The event {} has been moderated with success." msgstr "L'événement {} a été modéré avec succès." -#: agenda_culturel/views.py:739 +#: agenda_culturel/views.py:740 msgid "The event has been successfully deleted." msgstr "L'événement a été supprimé avec succès." -#: agenda_culturel/views.py:819 +#: agenda_culturel/views.py:820 msgid "Comment" msgstr "Commentaire" -#: agenda_culturel/views.py:843 +#: agenda_culturel/views.py:844 msgid "" "The status has been successfully modified and a message has been sent to the " "person who proposed the event." @@ -1482,15 +1486,15 @@ msgstr "" "Le status a été modifié avec succès et un message a été envoyé à la personne " "qui a proposé l'événement." -#: agenda_culturel/views.py:847 +#: agenda_culturel/views.py:848 msgid "The status has been successfully modified." msgstr "Le status a été modifié avec succès." -#: agenda_culturel/views.py:887 +#: agenda_culturel/views.py:888 msgid "The event was created: {}." msgstr "L'événement a été créé: {}." -#: agenda_culturel/views.py:893 +#: agenda_culturel/views.py:894 msgid "" "The event has been submitted and will be published as soon as it has been " "validated by the moderation team." @@ -1498,99 +1502,99 @@ 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:907 +#: agenda_culturel/views.py:908 msgid "during the creation process" msgstr "pendant le processus d'import" -#: agenda_culturel/views.py:930 +#: agenda_culturel/views.py:931 msgid "A message has been sent to the person who proposed the initial event." msgstr "" "Un message a été envoyé à la personne qui a proposé l'événement initial." -#: agenda_culturel/views.py:1023 agenda_culturel/views.py:1101 +#: agenda_culturel/views.py:1024 agenda_culturel/views.py:1102 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:1032 agenda_culturel/views.py:1110 +#: agenda_culturel/views.py:1033 agenda_culturel/views.py:1111 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:1044 +#: agenda_culturel/views.py:1045 msgid "Integrating {} url(s) into our import process." msgstr "Intégration de {} url(s) dans notre processus d'import." -#: agenda_culturel/views.py:1119 +#: agenda_culturel/views.py:1120 msgid "Integrating {} into our import process." msgstr "Intégration de {} dans notre processus d'import." -#: agenda_culturel/views.py:1235 +#: agenda_culturel/views.py:1236 msgid "Your message has been sent successfully." msgstr "Votre message a été envoyé avec succès." -#: agenda_culturel/views.py:1268 +#: agenda_culturel/views.py:1269 msgid "Reporting the event {} on {}" msgstr "Signaler l'événement {} du {}" -#: agenda_culturel/views.py:1278 +#: agenda_culturel/views.py:1279 msgid "The contact message has been successfully deleted." msgstr "Le message de contact a été supprimé avec succès." -#: agenda_culturel/views.py:1294 +#: agenda_culturel/views.py:1295 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:1472 +#: agenda_culturel/views.py:1473 msgid "Spam has been successfully deleted." msgstr "Le spam a été supprimé avec succès" -#: agenda_culturel/views.py:1649 +#: agenda_culturel/views.py:1650 msgid "The import has been run successfully." msgstr "L'import a été lancé avec succès" -#: agenda_culturel/views.py:1671 +#: agenda_culturel/views.py:1672 msgid "The import has been canceled." msgstr "L'import a été annulé" -#: agenda_culturel/views.py:1694 +#: agenda_culturel/views.py:1695 msgid "The orphan event update has been launched." msgstr "La mise à jour de l'événement orphelin a été lancée." -#: agenda_culturel/views.py:1790 +#: agenda_culturel/views.py:1791 msgid "The recurrent import has been successfully modified." msgstr "L'import récurrent a été modifié avec succès." -#: agenda_culturel/views.py:1802 +#: agenda_culturel/views.py:1803 msgid "The recurrent import has been successfully deleted." msgstr "L'import récurrent a été supprimé avec succès" -#: agenda_culturel/views.py:1848 +#: agenda_culturel/views.py:1849 msgid "The import has been launched." msgstr "L'import a été lancé" -#: agenda_culturel/views.py:1875 +#: agenda_culturel/views.py:1876 msgid "Imports has been launched." msgstr "Les imports ont été lancés" -#: agenda_culturel/views.py:1897 +#: agenda_culturel/views.py:1898 msgid "Facebook imports has been launched." msgstr "Les imports Facebook ont été lancés" -#: agenda_culturel/views.py:1960 +#: agenda_culturel/views.py:1961 msgid "Update successfully completed." msgstr "Mise à jour réalisée avec succès." -#: agenda_culturel/views.py:2028 +#: agenda_culturel/views.py:2029 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:2065 +#: agenda_culturel/views.py:2066 msgid "Events have been marked as unduplicated." msgstr "Les événements ont été marqués comme non dupliqués." -#: agenda_culturel/views.py:2082 agenda_culturel/views.py:2099 -#: agenda_culturel/views.py:2128 +#: agenda_culturel/views.py:2083 agenda_culturel/views.py:2100 +#: agenda_culturel/views.py:2129 msgid "" "The selected item is no longer included in the list of duplicates. Someone " "else has probably modified the list in the meantime." @@ -1598,23 +1602,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:2089 +#: agenda_culturel/views.py:2090 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:2114 +#: agenda_culturel/views.py:2115 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:2164 +#: agenda_culturel/views.py:2165 msgid "Cleaning up duplicates: {} item(s) fixed." msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)." -#: agenda_culturel/views.py:2213 +#: agenda_culturel/views.py:2214 msgid "The event was successfully duplicated." msgstr "L'événement a été marqué dupliqué avec succès." -#: agenda_culturel/views.py:2221 +#: agenda_culturel/views.py:2222 msgid "" "The event has been successfully flagged as a duplicate. The moderation team " "will deal with your suggestion shortly." @@ -1622,32 +1626,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:2283 +#: agenda_culturel/views.py:2284 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:2295 +#: agenda_culturel/views.py:2296 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:2317 +#: agenda_culturel/views.py:2318 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:2324 +#: agenda_culturel/views.py:2325 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:2331 agenda_culturel/views.py:2395 +#: agenda_culturel/views.py:2332 agenda_culturel/views.py:2396 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:2381 +#: agenda_culturel/views.py:2382 msgid "" "The rules were successfully applied and 1 event with default category was " "categorised." @@ -1655,7 +1659,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:2388 +#: agenda_culturel/views.py:2389 msgid "" "The rules were successfully applied and {} events with default category were " "categorised." @@ -1663,58 +1667,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:2494 agenda_culturel/views.py:2556 -#: agenda_culturel/views.py:2596 +#: agenda_culturel/views.py:2495 agenda_culturel/views.py:2557 +#: agenda_culturel/views.py:2597 msgid "{} events have been updated." msgstr "{} événements ont été mis à jour." -#: agenda_culturel/views.py:2497 agenda_culturel/views.py:2558 -#: agenda_culturel/views.py:2599 +#: agenda_culturel/views.py:2498 agenda_culturel/views.py:2559 +#: agenda_culturel/views.py:2600 msgid "1 event has been updated." msgstr "1 événement a été mis à jour" -#: agenda_culturel/views.py:2499 agenda_culturel/views.py:2560 -#: agenda_culturel/views.py:2601 +#: agenda_culturel/views.py:2500 agenda_culturel/views.py:2561 +#: agenda_culturel/views.py:2602 msgid "No events have been modified." msgstr "Aucun événement n'a été modifié." -#: agenda_culturel/views.py:2508 +#: agenda_culturel/views.py:2509 msgid "The place has been successfully updated." msgstr "Le lieu a été modifié avec succès." -#: agenda_culturel/views.py:2517 +#: agenda_culturel/views.py:2518 msgid "The place has been successfully created." msgstr "Le lieu a été créé avec succès." -#: agenda_culturel/views.py:2583 +#: agenda_culturel/views.py:2584 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:2588 +#: agenda_culturel/views.py:2589 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:2715 +#: agenda_culturel/views.py:2716 msgid "The organisation has been successfully updated." msgstr "L'organisme a été modifié avec succès." -#: agenda_culturel/views.py:2722 +#: agenda_culturel/views.py:2723 msgid "The organisation has been successfully created." msgstr "L'organisme a été créé avec succès." -#: agenda_culturel/views.py:2741 +#: agenda_culturel/views.py:2742 msgid "The tag has been successfully updated." msgstr "L'étiquette a été modifiée avec succès." -#: agenda_culturel/views.py:2748 +#: agenda_culturel/views.py:2749 msgid "The tag has been successfully created." msgstr "L'étiquette a été créée avec succès." -#: agenda_culturel/views.py:2848 +#: agenda_culturel/views.py:2849 msgid "You have not modified the tag name." msgstr "Vous n'avez pas modifié le nom de l'étiquette." -#: agenda_culturel/views.py:2863 +#: agenda_culturel/views.py:2864 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 " @@ -1727,7 +1731,7 @@ msgstr "" "sera supprimée, et tous les événements associés à l'étiquette {} seront " "associés à l'étiquette {}." -#: agenda_culturel/views.py:2877 +#: agenda_culturel/views.py:2878 msgid "" "This tag {} is already in use. You can force renaming by checking the " "corresponding option." @@ -1735,30 +1739,55 @@ msgstr "" "Cette étiquette {} est déjà utilisée. Vous pouvez forcer le renommage en " "cochant l'option correspondante." -#: agenda_culturel/views.py:2910 +#: agenda_culturel/views.py:2911 msgid "The tag {} has been successfully renamed to {}." msgstr "L'étiquette {} a été renommée avec succès en {}." -#: agenda_culturel/views.py:2952 +#: agenda_culturel/views.py:2953 msgid "The tag {} has been successfully deleted." msgstr "L'événement {} a été supprimé avec succès." -#: agenda_culturel/views.py:3099 +#: agenda_culturel/views.py:3100 msgid "Cache successfully cleared." msgstr "Le cache a été vidé avec succès." -#: agenda_culturel/views.py:3119 +#: agenda_culturel/views.py:3120 msgid "Your user profile has been successfully modified." msgstr "Votre profil utilisateur a été modifié avec succès." -#: agenda_culturel/views.py:3134 +#: agenda_culturel/views.py:3138 msgid "The special period has been successfully created." msgstr "La période remarquable a été créée avec succès." -#: agenda_culturel/views.py:3153 +#: agenda_culturel/views.py:3159 msgid "The special period has been successfully deleted." msgstr "La période remarquable a été supprimée avec succès." -#: agenda_culturel/views.py:3163 +#: agenda_culturel/views.py:3170 msgid "The special period has been successfully updated." msgstr "La période remarquable a été modifiée avec succès." + +#: agenda_culturel/views.py:3187 +#, python-format +msgid "%(nb_created)d interval inserted." +msgid_plural "%(nb_created)d intervals inserted." +msgstr[0] "%(nb_created)d intervalle inséré." +msgstr[1] "%(nb_created)d intervalles insérés." + +#: agenda_culturel/views.py:3198 +#, python-format +msgid "%(nb_overlap)d insersion was not possible due to overlap." +msgid_plural "%(nb_overlap)d insersion were not possible due to overlap." +msgstr[0] "%(nb_overlap)d insersion impossible à cause d'une intersection." +msgstr[1] "%(nb_overlap)d insersions impossibles à cause d'une intersection." + +#: agenda_culturel/views.py:3209 +#, python-format +msgid "%(nb_error)d error while reading ical file." +msgid_plural "%(nb_error)d error while reading ical file." +msgstr[0] "%(nb_error)d erreur pendant la lecture du fichier ical." +msgstr[1] "%(nb_error)d erreurs pendant la lecture du fichier ical." + +#: agenda_culturel/views.py:3217 +msgid "Error during file reading: {}" +msgstr "Erreur pendant la lecture du fichier: {}" diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 42b008e..9a9338b 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -8,6 +8,7 @@ import uuid from collections import defaultdict from datetime import date, time, timedelta from urllib.parse import urlparse +import icalendar import emoji import recurrence @@ -3166,6 +3167,9 @@ class SpecialPeriod(models.Model): class Meta: verbose_name = _("Special period") verbose_name_plural = _("Special periods") + indexes = [ + models.Index(fields=["start_date", "end_date"]), + ] class PERIODTYPE(models.TextChoices): PUBLICHOLIDAYS = "public holidays", _("public holidays") @@ -3193,10 +3197,63 @@ class SpecialPeriod(models.Model): ) def __str__(self): - n = self.periodtype + ' "' + self.name + '" ' + n = self.periodtype + ' "' + self.name + '"' if self.start_date == self.end_date: return n + _(" on ") + str(self.start_date) else: return ( - n + _(" from ") + str(self.start_date) + _(" to ") + str(self.end_day) + n + _(" from ") + str(self.start_date) + _(" to ") + str(self.end_date) ) + + def load_from_ical(uploaded_file, periodtype): + # load file + try: + file_content = uploaded_file.read() + calendar = icalendar.Calendar.from_ical(file_content) + + nb_error = 0 + nb_overlap = 0 + periods = [] + periods_to_create = [] + + # extract events + for event in calendar.walk("VEVENT"): + try: + name = event.decoded("SUMMARY").decode() + r = event.decoded("DTSTART") + if isinstance(r, datetime): + start_date = r.date() + elif isinstance(r, date): + start_date = r + r = event.decoded("DTEND") + if isinstance(r, datetime): + end_date = r.date() + elif isinstance(r, date): + end_date = r + periods.append( + SpecialPeriod( + name=name, + periodtype=periodtype, + start_date=start_date, + end_date=end_date, + ) + ) + except Exception: + nb_error += 1 + + for p in periods: + overlap_exists = SpecialPeriod.objects.filter( + Q(periodtype=p.periodtype) + & Q(start_date__lte=p.end_date) + & Q(end_date__gte=p.start_date) + ).exists() + + if overlap_exists: + nb_overlap += 1 + else: + periods_to_create.append(p) + + SpecialPeriod.objects.bulk_create(periods_to_create) + return len(periods_to_create), nb_overlap, nb_error, None + except Exception as e: + return 0, 0, 0, str(e) diff --git a/src/agenda_culturel/static/style.scss b/src/agenda_culturel/static/style.scss index 5884382..043c79e 100644 --- a/src/agenda_culturel/static/style.scss +++ b/src/agenda_culturel/static/style.scss @@ -2193,3 +2193,15 @@ dialog { @extend article; font-size: 110%; } +.special_period { + font-size: 75%; + margin: 0; + text-align: center; + height: 1.5em; + border-radius: var(--border-radius); +} +.special_period.holiday, +.special_period.vacation { + background: var(--primary); + color: var(--primary-inverse); +} diff --git a/src/agenda_culturel/templates/agenda_culturel/load_specialperiods_from_ical.html b/src/agenda_culturel/templates/agenda_culturel/load_specialperiods_from_ical.html new file mode 100644 index 0000000..a549cc6 --- /dev/null +++ b/src/agenda_culturel/templates/agenda_culturel/load_specialperiods_from_ical.html @@ -0,0 +1,19 @@ +{% extends "agenda_culturel/page.html" %} +{% block title %} + {% block og_title %}Importer des périodes remarquables depuis un fichier ical{% endblock %} +{% endblock %} +{% block fluid %}{% endblock %} +{% block content %} +

Importer des périodes remarquables depuis un fichier ical

+
+ {% csrf_token %} + {{ form.as_p }} +
+ Annuler + +
+
+ {{ form.media }} +{% endblock %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-month.html b/src/agenda_culturel/templates/agenda_culturel/page-month.html index 90d94b8..7e3feea 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-month.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-month.html @@ -126,6 +126,13 @@ {% endif %}
+ {% if day.is_school_vacation or day.has_special_period_same_week %} +
+ {% for p in day.periods %} + {% if p.periodtype == "school vacations" %}{{ p.name }}{% endif %} + {% endfor %} +
+ {% endif %}

@@ -136,6 +143,13 @@ {% endif %}

+ {% if day.is_public_holiday %} +
+ {% for p in day.periods %} + {% if p.periodtype == "public holidays" %}{{ p.name }}{% endif %} + {% endfor %} +
+ {% endif %}
{% if day.events %}