diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 6e20ff6..be59f39 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -552,6 +552,21 @@ class Event(models.Model): else: return recurrences[0] + def get_image_url(self): + if self.local_image and hasattr(self.local_image, "url"): + try: + return self.local_image.url + except: + pass + if self.image: + return self.image + else: + return None + + def has_image_url(self): + return self.get_image_url() is not None + + # return a copy of the current object for each recurrence between first an last date (included) def get_recurrences_between(self, firstdate, lastdate): if not self.has_recurrences(): diff --git a/src/agenda_culturel/templates/agenda_culturel/batchimportation_form.html b/src/agenda_culturel/templates/agenda_culturel/batchimportation_form.html index d243ab1..4db2a29 100644 --- a/src/agenda_culturel/templates/agenda_culturel/batchimportation_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/batchimportation_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}Importation manuelle{% endblock %} +{% block title %}{% block og_title %}Importation manuelle{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/cancel_import_confirm.html b/src/agenda_culturel/templates/agenda_culturel/cancel_import_confirm.html index 99fea5d..c6c728e 100644 --- a/src/agenda_culturel/templates/agenda_culturel/cancel_import_confirm.html +++ b/src/agenda_culturel/templates/agenda_culturel/cancel_import_confirm.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer {{ object.title }}{% endblock %} +{% block title %}{% block og_title %}Supprimer {{ object.title }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/categorisation_rules.html b/src/agenda_culturel/templates/agenda_culturel/categorisation_rules.html index aa7436f..e0d564f 100644 --- a/src/agenda_culturel/templates/agenda_culturel/categorisation_rules.html +++ b/src/agenda_culturel/templates/agenda_culturel/categorisation_rules.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Règles de catégorisation{% endblock %} +{% block title %}{% block og_title %}Règles de catégorisation{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/categorisationrule_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/categorisationrule_confirm_delete.html index 2eeab7b..894eb3c 100644 --- a/src/agenda_culturel/templates/agenda_culturel/categorisationrule_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/categorisationrule_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer la règle de catégorisation {{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Supprimer la règle de catégorisation {{ object.pk }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/categorisationrule_form.html b/src/agenda_culturel/templates/agenda_culturel/categorisationrule_form.html index b5bb4a4..3fa14b8 100644 --- a/src/agenda_culturel/templates/agenda_culturel/categorisationrule_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/categorisationrule_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}Règle de catéorisation{% endblock %} +{% block title %}{% block og_title %}Règle de catéorisation{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/categorise_events_form.html b/src/agenda_culturel/templates/agenda_culturel/categorise_events_form.html index bc2e653..c0787ce 100644 --- a/src/agenda_culturel/templates/agenda_culturel/categorise_events_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/categorise_events_form.html @@ -6,7 +6,7 @@ {% load tag_extra %} -{% block title %}Appliquer les catégorisations{% endblock %} +{% block title %}{% block og_title %}Appliquer les catégorisations{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/contactmessage_create_form.html b/src/agenda_culturel/templates/agenda_culturel/contactmessage_create_form.html index 20da2a3..d784860 100644 --- a/src/agenda_culturel/templates/agenda_culturel/contactmessage_create_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/contactmessage_create_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}Contact{% endblock %} +{% block title %}{% block og_title %}Contact{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/contactmessage_moderation_form.html b/src/agenda_culturel/templates/agenda_culturel/contactmessage_moderation_form.html index 833c894..72ee47e 100644 --- a/src/agenda_culturel/templates/agenda_culturel/contactmessage_moderation_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/contactmessage_moderation_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}Message de contact : {{ obj.subject }}{% endblock %} +{% block title %}{% block og_title %}Message de contact : {{ obj.subject }}{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/contactmessages.html b/src/agenda_culturel/templates/agenda_culturel/contactmessages.html index 1d02183..5e1ae2c 100644 --- a/src/agenda_culturel/templates/agenda_culturel/contactmessages.html +++ b/src/agenda_culturel/templates/agenda_culturel/contactmessages.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Derniers messages de contact reçus{% endblock %} +{% block title %}{% block og_title %}Derniers messages de contact reçus{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/duplicates.html b/src/agenda_culturel/templates/agenda_culturel/duplicates.html index 8e90834..e6bb87d 100644 --- a/src/agenda_culturel/templates/agenda_culturel/duplicates.html +++ b/src/agenda_culturel/templates/agenda_culturel/duplicates.html @@ -3,7 +3,7 @@ {% load utils_extra %} {% load event_extra %} -{% block title %}Événements possiblement dupliqués{% endblock %} +{% block title %}{% block og_title %}Événements possiblement dupliqués{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_confirm_change_status.html b/src/agenda_culturel/templates/agenda_culturel/event_confirm_change_status.html index b75509a..2f701dc 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_confirm_change_status.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_confirm_change_status.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %} +{% block title %}{% block og_title %} {% if status == "published" %} Publier l'événement {{ event.title }} {% elif status == "draft" %} @@ -8,7 +8,7 @@ Déplacer l'événement {{ event.title }} dans les brouillons {% elif status == "trash" %} Mettre l'événement {{ event.title }} à la corbeille {% endif %} -{% endblock %} +{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/event_confirm_delete.html index e783d4b..4c5e16b 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer {{ object.title }}{% endblock %} +{% block title %}{% block og_title %}Supprimer {{ object.title }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_form.html b/src/agenda_culturel/templates/agenda_culturel/event_form.html index adfecf3..f1a3284 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_form.html @@ -2,7 +2,7 @@ {% load static %} -{% block title %} +{% block title %}{% block og_title %} {% if object %} Édition de l'événement {{ object.title }} ({{ object.start_day }}) {% else %} @@ -12,7 +12,7 @@ Ajouter un événement {% endif %} {% endif %} -{% endblock %} +{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_import.html b/src/agenda_culturel/templates/agenda_culturel/event_import.html index b09b733..f000dda 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_import.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_import.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Ajouter un événement{% endblock %} +{% block title %}{% block og_title %}Ajouter un événement{% endblock %}{% endblock %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/event_moderation_form.html b/src/agenda_culturel/templates/agenda_culturel/event_moderation_form.html index 9a5575c..63cb406 100644 --- a/src/agenda_culturel/templates/agenda_culturel/event_moderation_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/event_moderation_form.html @@ -7,7 +7,7 @@ {% endblock %} -{% block title %}Modérer {{ object.title }}{% endblock %} +{% block title %}{% block og_title %}Modérer {{ object.title }}{% endblock %}{% endblock %} diff --git a/src/agenda_culturel/templates/agenda_culturel/fix_duplicate.html b/src/agenda_culturel/templates/agenda_culturel/fix_duplicate.html index 303f618..72b6126 100644 --- a/src/agenda_culturel/templates/agenda_culturel/fix_duplicate.html +++ b/src/agenda_culturel/templates/agenda_culturel/fix_duplicate.html @@ -3,7 +3,7 @@ {% load utils_extra %} {% load event_extra %} -{% block title %}Événements possiblement dupliqués{% endblock %} +{% block title %}{% block og_title %}Événements possiblement dupliqués{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/import.html b/src/agenda_culturel/templates/agenda_culturel/import.html index d093b7d..d5ae706 100644 --- a/src/agenda_culturel/templates/agenda_culturel/import.html +++ b/src/agenda_culturel/templates/agenda_culturel/import.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Importer un événement{% endblock %} +{% block title %}{% block og_title %}Importer un événement{% endblock %}{% endblock %} {% load static %} diff --git a/src/agenda_culturel/templates/agenda_culturel/import_set.html b/src/agenda_culturel/templates/agenda_culturel/import_set.html index 04052a9..ba168a8 100644 --- a/src/agenda_culturel/templates/agenda_culturel/import_set.html +++ b/src/agenda_culturel/templates/agenda_culturel/import_set.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Importer un ensemble d'événements{% endblock %} +{% block title %}{% block og_title %}Importer un ensemble d'événements{% endblock %}{% endblock %} {% load static %} diff --git a/src/agenda_culturel/templates/agenda_culturel/imports.html b/src/agenda_culturel/templates/agenda_culturel/imports.html index 24d3ef0..406686d 100644 --- a/src/agenda_culturel/templates/agenda_culturel/imports.html +++ b/src/agenda_culturel/templates/agenda_culturel/imports.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Importations par lot{% endblock %} +{% block title %}{% block og_title %}Importations par lot{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/merge_duplicate.html b/src/agenda_culturel/templates/agenda_culturel/merge_duplicate.html index 1c948b5..7d6e997 100644 --- a/src/agenda_culturel/templates/agenda_culturel/merge_duplicate.html +++ b/src/agenda_culturel/templates/agenda_culturel/merge_duplicate.html @@ -3,7 +3,7 @@ {% load utils_extra %} {% load event_extra %} -{% block title %}Fusionner les événements dupliqués{% endblock %} +{% block title %}{% block og_title %}Fusionner les événements dupliqués{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderation.html b/src/agenda_culturel/templates/agenda_culturel/moderation.html index 2909cf1..a1bd7a8 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderation.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderation.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Derniers événements soumis{% endblock %} +{% block title %}{% block og_title %}Derniers événements soumis{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationanswer_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/moderationanswer_confirm_delete.html index f94e8b9..6b6d30f 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationanswer_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationanswer_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer la réponse #{{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Supprimer la réponse #{{ object.pk }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationanswer_form.html b/src/agenda_culturel/templates/agenda_culturel/moderationanswer_form.html index 6482b0c..be67bfd 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationanswer_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationanswer_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}{% if form.instance.pk %}Modification{% else %}Création{% endif %} d'une réponse de modération{% endblock %} +{% block title %}{% block og_title %}{% if form.instance.pk %}Modification{% else %}Création{% endif %} d'une réponse de modération{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_confirm_delete.html index 1f88a12..12780c2 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer la question #{{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Supprimer la question #{{ object.pk }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_detail.html b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_detail.html index cf8eee5..ce4baf7 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_detail.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_detail.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Question de modération #{{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Question de modération #{{ object.pk }}{% endblock %}{% endblock %} {% load tag_extra %} {% load utils_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_form.html b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_form.html index 46280af..185db48 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_form.html @@ -2,9 +2,9 @@ {% load static %} -{% block title %} +{% block title %}{% block og_title %} {% if form.instance.pk %}Modification{% else %}Création{% endif %} d'une question de modération -{% endblock %} +{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_list.html b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_list.html index 608a9a5..939ef79 100644 --- a/src/agenda_culturel/templates/agenda_culturel/moderationquestion_list.html +++ b/src/agenda_culturel/templates/agenda_culturel/moderationquestion_list.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Questions de modération{% endblock %} +{% block title %}{% block og_title %}Questions de modération{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-day.html b/src/agenda_culturel/templates/agenda_culturel/page-day.html index 0348b3f..f72c36d 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-day.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-day.html @@ -15,9 +15,9 @@ {% endblock %} -{% block title %} +{% block title %}{% block og_title %} {{ day | date:"l j F Y"|frdate }} -{% endblock %} +{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-event.html b/src/agenda_culturel/templates/agenda_culturel/page-event.html index a4d9242..a75e348 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-event.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-event.html @@ -1,10 +1,13 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}{{ object.title }}{% endblock %} - {% load cat_extra %} {% load utils_extra %} + +{% block title %}{% block og_title %}{{ event.title }}{% endblock %}{% endblock %} +{% block og_image %}{% if event.has_image_url %}{{ event.get_image_url }}{% else %}{{ block.super }}{% endif %}{% endblock %} +{% block og_description %}{% if event.description %}{{ event.description |truncatewords:20|linebreaks }}{% else %}{{ block.super }}{% endif %}{% endblock %} + {% block entete_header %} {% css_categories %} {% endblock %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-month.html b/src/agenda_culturel/templates/agenda_culturel/page-month.html index 35ce48a..617287d 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-month.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-month.html @@ -16,9 +16,9 @@ {% endblock %} -{% block title %} +{% block title %}{% block og_title %} {{ calendar.firstdate | date:"F o" }} -{% endblock %} +{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-rimport.html b/src/agenda_culturel/templates/agenda_culturel/page-rimport.html index 07033d6..7e0c2b5 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-rimport.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-rimport.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Import récurrent #{{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Import récurrent #{{ object.pk }}{% endblock %}{% endblock %} {% load cat_extra %} {% load utils_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-single.html b/src/agenda_culturel/templates/agenda_culturel/page-single.html index 59ef243..deb21cf 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-single.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-single.html @@ -9,9 +9,9 @@ {% load static_content_extra %} -{% block title %} +{% block title %}{% block og_title %} {{ title }} -{% endblock %} +{% endblock %}{% endblock %} {% block fluid %}{% endblock %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-week.html b/src/agenda_culturel/templates/agenda_culturel/page-week.html index b8b4c32..2cce238 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-week.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-week.html @@ -1,7 +1,6 @@ {% extends "agenda_culturel/page.html" %} - {% load i18n %} {% load cat_extra %} @@ -16,9 +15,7 @@ {% endblock %} -{% block title %} -Semaine du {{ calendar.calendar_days_list.0.date|date|frdate }} -{% endblock %} +{% block title %}{% block og_title %}Semaine du {{ calendar.calendar_days_list.0.date|date|frdate }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page.html b/src/agenda_culturel/templates/agenda_culturel/page.html index 6ae90f2..221e9df 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page.html +++ b/src/agenda_culturel/templates/agenda_culturel/page.html @@ -5,8 +5,12 @@ Pommes de lune — {% block title %}{% endblock %} - {% load static %} + + + + + {% if debug %} {% else %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/place_confirm_delete.html index 53a14e1..cb52f21 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer {{ object.name }}{% endblock %} +{% block title %}{% block og_title %}Supprimer {{ object.name }}{% endblock %}{% endblock %} {% block fluid %}{% endblock %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_detail.html b/src/agenda_culturel/templates/agenda_culturel/place_detail.html index c15d42e..87e332c 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_detail.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_detail.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}#{{ object.name }}{% endblock %} +{% block title %}{% block og_title %}#{{ object.name }}{% endblock %}% endblock %} {% load tag_extra %} {% load utils_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_form.html b/src/agenda_culturel/templates/agenda_culturel/place_form.html index e8a3f61..41145da 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_form.html @@ -1,9 +1,9 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %} +{% block title %}{% block og_title %} {% if form.instance.pk %}Modification{% else %}Création{% endif %} d'un lieu -{% endblock %} +{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_list.html b/src/agenda_culturel/templates/agenda_culturel/place_list.html index 9fce8e7..c28d1f1 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_list.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_list.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Lieux{% endblock %} +{% block title %}{% block og_title %}Lieux{% endblock %}{% endblock %} {% load utils_extra %} {% load static %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_list_admin.html b/src/agenda_culturel/templates/agenda_culturel/place_list_admin.html index 98dee32..a9bec62 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_list_admin.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_list_admin.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Administration des lieux{% endblock %} +{% block title %}{% block og_title %}Administration des lieux{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_unknown_form.html b/src/agenda_culturel/templates/agenda_culturel/place_unknown_form.html index abc0cb6..21d6bd6 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_unknown_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_unknown_form.html @@ -2,7 +2,7 @@ {% load static %} -{% block title %}Ajouter un lieu à {{ object.title }}{% endblock %} +{% block title %}{% block og_title %}Ajouter un lieu à {{ object.title }}{% endblock %}{% endblock %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/place_unknown_list.html b/src/agenda_culturel/templates/agenda_culturel/place_unknown_list.html index d1be020..328e355 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_unknown_list.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_unknown_list.html @@ -2,7 +2,7 @@ {% load utils_extra %} -{% block title %}Événements sans lieu{% endblock %} +{% block title %}{% block og_title %}Événements sans lieu{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/recurrentimport_confirm_delete.html b/src/agenda_culturel/templates/agenda_culturel/recurrentimport_confirm_delete.html index 447f925..5656063 100644 --- a/src/agenda_culturel/templates/agenda_culturel/recurrentimport_confirm_delete.html +++ b/src/agenda_culturel/templates/agenda_culturel/recurrentimport_confirm_delete.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Supprimer {{ object.title }}{% endblock %} +{% block title %}{% block og_title %}Supprimer {{ object.title }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/recurrentimport_form.html b/src/agenda_culturel/templates/agenda_culturel/recurrentimport_form.html index 90c9af5..cdf6037 100644 --- a/src/agenda_culturel/templates/agenda_culturel/recurrentimport_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/recurrentimport_form.html @@ -1,7 +1,7 @@ {% extends "agenda_culturel/page.html" %} {% load static %} -{% block title %}Importation récurrente{% endblock %} +{% block title %}{% block og_title %}Importation récurrente{% endblock %}{% endblock %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/rimports.html b/src/agenda_culturel/templates/agenda_culturel/rimports.html index fbf0311..b6fc83b 100644 --- a/src/agenda_culturel/templates/agenda_culturel/rimports.html +++ b/src/agenda_culturel/templates/agenda_culturel/rimports.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Importations récurrentes{% endblock %} +{% block title %}{% block og_title %}Importations récurrentes{% endblock %}{% endblock %} {% load utils_extra %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/run_all_rimports_confirm.html b/src/agenda_culturel/templates/agenda_culturel/run_all_rimports_confirm.html index e2035ae..47494f5 100644 --- a/src/agenda_culturel/templates/agenda_culturel/run_all_rimports_confirm.html +++ b/src/agenda_culturel/templates/agenda_culturel/run_all_rimports_confirm.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Lancer tous les imports{% endblock %} +{% block title %}{% block og_title %}Lancer tous les imports{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/run_rimport_confirm.html b/src/agenda_culturel/templates/agenda_culturel/run_rimport_confirm.html index 074418f..18f9afd 100644 --- a/src/agenda_culturel/templates/agenda_culturel/run_rimport_confirm.html +++ b/src/agenda_culturel/templates/agenda_culturel/run_rimport_confirm.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Lancer l'import #{{ object.pk }}{% endblock %} +{% block title %}{% block og_title %}Lancer l'import #{{ object.pk }}{% endblock %}{% endblock %} {% block content %} diff --git a/src/agenda_culturel/templates/agenda_culturel/search.html b/src/agenda_culturel/templates/agenda_culturel/search.html index ff3d0e3..1be0d96 100644 --- a/src/agenda_culturel/templates/agenda_culturel/search.html +++ b/src/agenda_culturel/templates/agenda_culturel/search.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Rechercher un événement{% endblock %} +{% block title %}{% block og_title %}Rechercher un événement{% endblock %}{% endblock %} {% load utils_extra %} {% load tag_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/set_duplicate.html b/src/agenda_culturel/templates/agenda_culturel/set_duplicate.html index 67b13c8..c8c5635 100644 --- a/src/agenda_culturel/templates/agenda_culturel/set_duplicate.html +++ b/src/agenda_culturel/templates/agenda_culturel/set_duplicate.html @@ -3,7 +3,7 @@ {% load utils_extra %} {% load event_extra %} -{% block title %}{% if user.is_authenticated %}Marquer comme doublon{% else %}Signaler comme doublon{% endif %}{% endblock %} +{% block title %}{% block og_title %}{% if user.is_authenticated %}Marquer comme doublon{% else %}Signaler comme doublon{% endif %}{% endblock %}{% endblock %} {% load cat_extra %} {% block entete_header %} diff --git a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html index d29e73a..f9fd92b 100644 --- a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html +++ b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html @@ -20,9 +20,9 @@

- {% if event.image or event.local_image %} + {% if event.has_image_url %}
- {{ event.image_alt }} + {{ event.image_alt }}
{% endif %} diff --git a/src/agenda_culturel/templates/agenda_culturel/staticcontent_form.html b/src/agenda_culturel/templates/agenda_culturel/staticcontent_form.html index 8bae3ce..4fcc327 100644 --- a/src/agenda_culturel/templates/agenda_culturel/staticcontent_form.html +++ b/src/agenda_culturel/templates/agenda_culturel/staticcontent_form.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Modifier {{ object.name }}{% endblock %} +{% block title %}{% block og_title %}Modifier {{ object.name }}{% endblock %}{% endblock %} {% block entete_header %} {% load static %} diff --git a/src/agenda_culturel/templates/agenda_culturel/tag.html b/src/agenda_culturel/templates/agenda_culturel/tag.html index 6670407..bafb2d2 100644 --- a/src/agenda_culturel/templates/agenda_culturel/tag.html +++ b/src/agenda_culturel/templates/agenda_culturel/tag.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Les événements {{ tag }}{% endblock %} +{% block title %}{% block og_title %}Les événements {{ tag }}{% endblock %}{% endblock %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/tags.html b/src/agenda_culturel/templates/agenda_culturel/tags.html index 03f1aad..4040bcc 100644 --- a/src/agenda_culturel/templates/agenda_culturel/tags.html +++ b/src/agenda_culturel/templates/agenda_culturel/tags.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Toutes les étiquettes{% endblock %} +{% block title %}{% block og_title %}Toutes les étiquettes{% endblock %}{% endblock %} {% load cat_extra %} diff --git a/src/agenda_culturel/templates/agenda_culturel/thank_you.html b/src/agenda_culturel/templates/agenda_culturel/thank_you.html index bff853b..a41ca78 100644 --- a/src/agenda_culturel/templates/agenda_culturel/thank_you.html +++ b/src/agenda_culturel/templates/agenda_culturel/thank_you.html @@ -1,6 +1,7 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Merci !{% endblock %} +{% block title %}{% block og_title %}Merci !{% endblock %}{% endblock %} +{% block og_image %}{% static 'images/merci.svg' %}{% endblock %} {% load utils_extra %} {% load static %} diff --git a/src/agenda_culturel/templates/page-erreur.html b/src/agenda_culturel/templates/page-erreur.html index 4aa014e..d8228e5 100644 --- a/src/agenda_culturel/templates/page-erreur.html +++ b/src/agenda_culturel/templates/page-erreur.html @@ -9,10 +9,9 @@ {% load static_content_extra %} -{% block title %} -Y'a un pépin ({{ error }}) -{% endblock %} - +{% block title %}{% block og_title %}Y'a un pépin ({{ error }}){% endblock %}{% endblock %} +{% block og_description %}On a rencontré un pépin en cherchant la page que tu as demandée !{% endblock %} +{% block og_image %}{% static 'images/pommes.svg' %}{% endblock %} {% block content %} @@ -21,7 +20,7 @@ Y'a un pépin ({{ error }})

Y'a un pépin (erreur {{ error }})

-

On a rencontré un pépin en cherchant la page que tu as demandé ! N'hésites pas à nous signaler +

On a rencontré un pépin en cherchant la page que tu as demandée ! N'hésites pas à nous signaler tout ça si tu penses qu'il y a un bug dans la compote.

quelques pommes et leur pépins
diff --git a/src/agenda_culturel/templates/registration/login.html b/src/agenda_culturel/templates/registration/login.html index d8771ab..6ec29ec 100644 --- a/src/agenda_culturel/templates/registration/login.html +++ b/src/agenda_culturel/templates/registration/login.html @@ -1,6 +1,6 @@ {% extends "agenda_culturel/page.html" %} -{% block title %}Connexion{% endblock %} +{% block title %}{% block og_title %}Connexion{% endblock %}{% endblock %} {% block content %}

Connexion