chill_document_edit_button: create new twig extension

This commit is contained in:
2022-02-02 12:44:04 +01:00
parent 53e03395f2
commit 2af3de4f61
7 changed files with 105 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
{% set button = {
'changeIcon': 'fa-unlock',
} %}{#
'changeClass': 'btn-update'
'noText': false
data-doc-title="{{ document.title|e('html_attr') }}"
{{ dump() }}
#}
<span data-module="wopi-link"
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
data-doc-title="coucou"
data-doc-type="{{ document.type|e('html_attr') }}"
data-button="{{ button|json_encode }}"
></span>