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 %}