From 9a34064b2347bf880619c4b736271a6fed62bdd9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 25 Jun 2024 17:21:08 +0200 Subject: [PATCH] Implement chill_document_button_group to allow download of document At first another download button was used, but not working.\ Elsewhere in Chill the chill_document_button_group seems to\ be used so more coherent to use it here too. --- .../views/CSPerson/personal_situation_view.html.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig index 22b37ce54..a1f5413bf 100644 --- a/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig +++ b/src/Bundle/ChillJobBundle/src/Resources/views/CSPerson/personal_situation_view.html.twig @@ -254,11 +254,11 @@ ] %}
{{ r[1] }}
- {% set document = attribute(entity, r[0]) %} - {% if document is null %} + {% set d = attribute(entity, r[0]) %} + {% if d is null %}
{{ null|chill_print_or_message("Aucun document") }}
{% else %} -
{{ doc.download_button(document, r[1] ~ " de " ~ person.firstName ~ " " ~ person.lastName) }}
+
{{ d.title }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_PERSON_UPDATE', person), {small: true}) }}
{% endif %} {% endfor %} @@ -273,10 +273,12 @@ {% block css %} {{ parent() }} - + {{ encore_entry_link_tags('mod_async_upload') }} + {{ encore_entry_script_tags('mod_document_action_buttons_group') }} {% endblock css %} {% block js %} {{ parent() }} - + {{ encore_entry_script_tags('mod_async_upload') }} + {{ encore_entry_link_tags('mod_document_action_buttons_group') }} {% endblock js %}