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.
This commit is contained in:
Julie Lenaerts 2024-06-25 17:21:08 +02:00
parent 1812e84c92
commit 9a34064b23

View File

@ -254,11 +254,11 @@
] %}
<dt>{{ r[1] }}</dt>
{% set document = attribute(entity, r[0]) %}
{% if document is null %}
{% set d = attribute(entity, r[0]) %}
{% if d is null %}
<dd>{{ null|chill_print_or_message("Aucun document") }}</dd>
{% else %}
<dd>{{ doc.download_button(document, r[1] ~ " de " ~ person.firstName ~ " " ~ person.lastName) }}</dd>
<dd>{{ d.title }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_PERSON_UPDATE', person), {small: true}) }}</dd>
{% endif %}
{% endfor %}
@ -273,10 +273,12 @@
{% block css %}
{{ parent() }}
<link rel="stylesheet" type="text/css" href="{{ asset('build/async_upload.css') }}" />
{{ encore_entry_link_tags('mod_async_upload') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock css %}
{% block js %}
{{ parent() }}
<script type="text/javascript" src="{{ asset('build/async_upload.js') }}"></script>
{{ encore_entry_script_tags('mod_async_upload') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock js %}