From 2bbf97f53bc3a691bb229ac3a1fec3a27305545c Mon Sep 17 00:00:00 2001
From: Julie Lenaerts
Date: Tue, 29 Apr 2025 10:03:57 +0200
Subject: [PATCH] Adjust templates and translations
---
.../Menu/AdminMenuBuilder.php | 5 +-
.../Resources/views/Event/edit.html.twig | 1 +
.../Resources/views/Event/new.html.twig | 4 +-
.../Resources/views/Event/page_list.html.twig | 5 +
.../Resources/views/Event/show.html.twig | 191 +++++++++---------
.../translations/messages.fr.yml | 3 +
6 files changed, 112 insertions(+), 97 deletions(-)
diff --git a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
index 8a6dec1ad..07fd81734 100644
--- a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
@@ -17,9 +17,6 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
class AdminMenuBuilder implements LocalMenuBuilderInterface
{
- /**
- * @var AuthorizationCheckerInterface
- */
protected AuthorizationCheckerInterface $authorizationChecker;
public function __construct(AuthorizationCheckerInterface $authorizationChecker)
@@ -53,7 +50,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
'route' => 'chill_event_admin_role',
])->setExtras(['order' => 6530]);
- $menu->addChild('Theme', [
+ $menu->addChild('event.theme.label', [
'route' => 'chill_crud_event_theme_index',
])->setExtras(['order' => 6540]);
}
diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig
index b6b11878b..052a13e26 100644
--- a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig
+++ b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig
@@ -17,6 +17,7 @@
{{ form_row(edit_form.date) }}
{{ form_row(edit_form.type, { label: "Event type" }) }}
+ {{ form_row(edit_form.themes) }}
{{ form_row(edit_form.moderator) }}
{{ form_row(edit_form.location) }}
{{ form_row(edit_form.organizationCost) }}
diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig
index 0fb69a4ea..898af74c1 100644
--- a/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig
+++ b/src/Bundle/ChillEventBundle/Resources/views/Event/new.html.twig
@@ -13,10 +13,12 @@
{{ form_start(form) }}
{{ form_errors(form) }}
- {{ form_row(form.circle) }}
+{# {{ form_row(form.circle) }}#}
{{ form_row(form.name) }}
+ {{ form_row(form.circle) }}
{{ form_row(form.date) }}
{{ form_row(form.type, { label: "Event type" }) }}
+ {{ form_row(form.themes) }}
{{ form_row(form.moderator) }}
{{ form_row(form.location) }}
{{ form_row(form.organizationCost) }}
diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig
index bb1ffa24e..701634a8a 100644
--- a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig
+++ b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig
@@ -41,6 +41,11 @@ block js %}
{{ e.moderator | chill_entity_render_box }}
{% endif %}
+
+ {% for t in e.themes %}
+ {{ t|chill_entity_render_box }}
+ {% endfor %}
+
diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig
index 7d8bf1fc0..b124c528b 100644
--- a/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig
+++ b/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig
@@ -38,6 +38,14 @@
{{ 'Event type'|trans }}
{{ event.type.name|localize_translatable_string }}
+
+ {{ 'event.theme.label'|trans }}
+
+ {% for t in event.themes %}
+ {{ t|chill_entity_render_box }}
+ {% endfor %}
+
+
{{ 'Moderator'|trans }}
{{ event.moderator|trans|default('-') }}
@@ -80,6 +88,97 @@
{% endif %}
+
+
{{ 'Participations'|trans }}
+ {% set count = event.participations|length %}
+
{{ 'count participations to this event'|trans({'count': count}) }}
+
+ {% if count > 0 %}
+
+
+
+ {{ 'Person'|trans }}
+ {{ 'Role'|trans }}
+ {{ 'Status'|trans }}
+ {{ 'Last update'|trans }}
+
+
+
+
+ {% for participation in event.participations %}
+
+
+ {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
+ targetEntity: { name: 'person', id: participation.person.id },
+ action: 'show',
+ displayBadge: true,
+ buttonText: participation.person|chill_entity_render_string,
+ isDead: participation.person.deathdate is not null
+ } %}
+
+ {{ participation.role.name|localize_translatable_string }}
+ {{ participation.status.name|localize_translatable_string }}
+ {{ participation.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned,
+ alternative: knplabs/knp-time-bundle provide filter 'ago' #}
+
+
+
+
+ {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
+
+
+
+
+
+
+ {% endif %}
+
+
+
+ {% endfor %}
+
+
+
+
+ {% endif %}
+
+
+
+ {{ form_start(form_add_participation_by_person) }}
+
+ {{ form_widget(form_add_participation_by_person.person_id, { 'attr' : {
+ 'class' : 'custom-select',
+ 'style': 'min-width: 15em; max-width: 18em; display: inline-block;'
+ }} ) }}
+
+
+ {{ form_end(form_add_participation_by_person) }}
+
+
+
+
+ {% if count > 0 %}
+
+ {{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }}
+
+ {{ form_rest(form_export) }}
+ {{ form_end(form_export) }}
+
+ {{ 'Edit all the participations'|trans }}
+ {% endif %}
+
+
+
+ {{ chill_delegated_block('block_footer_show', { 'event': event }) }}
+
-
- {{ 'Participations'|trans }}
- {% set count = event.participations|length %}
- {{ 'count participations to this event'|trans({'count': count}) }}
-
- {% if count > 0 %}
-
-
-
- {{ 'Person'|trans }}
- {{ 'Role'|trans }}
- {{ 'Status'|trans }}
- {{ 'Last update'|trans }}
-
-
-
-
- {% for participation in event.participations %}
-
-
- {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
- targetEntity: { name: 'person', id: participation.person.id },
- action: 'show',
- displayBadge: true,
- buttonText: participation.person|chill_entity_render_string,
- isDead: participation.person.deathdate is not null
- } %}
-
- {{ participation.role.name|localize_translatable_string }}
- {{ participation.status.name|localize_translatable_string }}
- {{ participation.lastUpdate|ago }} {# sf4 check: filter 'time_diff' is abandoned,
- alternative: knplabs/knp-time-bundle provide filter 'ago' #}
-
-
-
-
- {% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
-
-
-
-
-
-
- {% endif %}
-
-
-
- {% endfor %}
-
-
-
-
- {% endif %}
-
-
-
-
-
- {{ form_start(form_add_participation_by_person) }}
-
- {{ form_widget(form_add_participation_by_person.person_id, { 'attr' : {
- 'class' : 'custom-select',
- 'style': 'min-width: 15em; max-width: 18em; display: inline-block;'
- }} ) }}
-
-
- {{ form_end(form_add_participation_by_person) }}
-
-
-
- {{ form_start(form_export, {'attr': {'id': 'export_tableur'}}) }}
-
- {{ form_rest(form_export) }}
- {{ form_end(form_export) }}
-
-
-
-
- {{ chill_delegated_block('block_footer_show', { 'event': event }) }}
-
{% endblock %}
diff --git a/src/Bundle/ChillEventBundle/translations/messages.fr.yml b/src/Bundle/ChillEventBundle/translations/messages.fr.yml
index 15987c463..73f56f27f 100644
--- a/src/Bundle/ChillEventBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillEventBundle/translations/messages.fr.yml
@@ -128,6 +128,8 @@ Create a new type: Créer un nouveau type
Create a new status: Créer un nouveau statut
event:
+ theme:
+ label: Thématiques
fields:
organizationCost: Coût d'organisation
location: Localisation
@@ -136,6 +138,7 @@ event:
organisationCost_help: Coût d'organisation pour la structure. Utile pour les statistiques.
add_document: Ajouter un document
remove_document: Supprimer le document
+ Select one or more themes: Selectionnez une ou plusieurs thématiques
filter:
event_types: Par types d'événement
event_dates: Par date d'événement