From 9584e41e3b1eeb5e5468a0e84b5873e7c4c90189 Mon Sep 17 00:00:00 2001 From: Saidi Date: Thu, 20 Jul 2023 13:36:59 +0200 Subject: [PATCH] load document from file table in modale suivi #1485 --- templates/base.html.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/base.html.twig b/templates/base.html.twig index c4ff0b43c..0888a54e1 100755 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -138,13 +138,13 @@ editor.ui.registry.addMenuButton('mybutton', { text: 'Partager un document', fetch: function (callback) { - var items = [ - {% for doc in signalement.documents %} + let items = [ + {% for doc in signalement.files|filter(doc => doc.fileType == 'document') %} { type: 'menuitem', - text: '{{ doc.titre }}', + text: '{{ doc.title }}', onAction: function () { - editor.insertContent(' Consulter "{{ doc.titre }}"'); + editor.insertContent(' Consulter "{{ doc.title }}"'); } }, {% endfor %} @@ -173,4 +173,4 @@ {% block javascripts %}{% endblock %} - \ No newline at end of file +