OpenWopiLink, option title is maintened (replace button by options)

This commit is contained in:
2022-02-09 18:04:12 +01:00
parent 3ffeaf419a
commit e7a6742964
4 changed files with 15 additions and 35 deletions

View File

@@ -37,20 +37,7 @@
</li>
<li>
{% if not freezed %}
{% set button = {
'changeIcon': 'fa-unlock',
} %}{#
'changeClass' string
'noText' boolean
#}
{# vue component #}
<span
data-module="wopi-link"
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.object.uuid}) }}"
data-doc-title="{{ document.title|e('html_attr') }}"
data-doc-type="{{ document.object.type|e('html_attr') }}"
data-button="{{ button|json_encode }}"
></span>
{{ document.object|chill_document_edit_button({'changeIcon': 'fa-unlock', 'title': document.title|e('html') }) }}
{% else %}
<a class="btn btn-update change-icon disabled" href="#" title="{{ 'workflow.freezed document'|trans }}">
<i class="fa fa-lock me-2"></i>{{ 'Update document'|trans }}

View File

@@ -2,13 +2,11 @@
<span data-module="wopi-link"
data-wopi-url="{{ path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"
data-doc-type="{{ document.type|e('html_attr') }}"
data-button="{{ options|json_encode }}"
data-options="{{ options|json_encode }}"
></span>
{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.uuid}) }}
#}
{# Twig way,
{# Twig way
TODO: une route, un template avec un header CHILL et un iframe
#}
<a href="{{ chill_path_add_return_path('chill_wopi_file_edit', {'fileId': document.uuid}) }}"