mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-03 11:59:49 +00:00
Feature: allow to convert to PDF from Chill and group action button on document
BREAKING CHANGE: avoid using the macro for download button. To keep the UI clean, use always the new "group of action buttons".
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
{% if storedObject is null %}
|
||||
<!-- No document to download -->
|
||||
{% else %}
|
||||
<a class="btn btn-download"
|
||||
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
|
||||
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
|
||||
data-download-button
|
||||
data-key="{{ storedObject.keyInfos|json_encode|escape('html_attr') }}"
|
||||
data-iv="{{ storedObject.iv|json_encode|escape('html_attr') }}"
|
||||
data-temp-url-get-generator="{{ storedObject|generate_url|escape('html_attr') }}"
|
||||
<a class="btn btn-download"
|
||||
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
|
||||
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
|
||||
data-download-button
|
||||
data-key="{{ storedObject.keyInfos|json_encode|escape('html_attr') }}"
|
||||
data-iv="{{ storedObject.iv|json_encode|escape('html_attr') }}"
|
||||
data-temp-url-get-generator="{{ storedObject|generate_url|escape('html_attr') }}"
|
||||
data-mime-type="{{ storedObject.type|escape('html_attr') }}" {% if filename is not null %}data-filename="{{ filename|escape('html_attr') }}"{% endif %}>
|
||||
{{ 'Download'|trans }}</a>
|
||||
{% endif %}
|
||||
@@ -28,4 +28,21 @@
|
||||
data-mime-type="{{ storedObject.type|escape('html_attr') }}" {% if filename is not null %}data-filename="{{ filename|escape('html_attr') }}"{% endif %}>
|
||||
{{ 'Download'|trans }}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro download_button_group(storedObject, canEdit = true, filename = null, options = {}) %}
|
||||
{% if storedObject is null %}
|
||||
<!-- No document to download -->
|
||||
{% else %}
|
||||
<div
|
||||
data-download-buttons
|
||||
data-uuid="{{ storedObject.uuid|escape('html_attr') }}"
|
||||
data-key="{{ storedObject.keyInfos|json_encode|escape('html_attr') }}"
|
||||
data-iv="{{ storedObject.iv|json_encode|escape('html_attr') }}"
|
||||
data-temp-url-generator="{{ storedObject|generate_url|escape('html_attr') }}"
|
||||
data-mime-type="{{ storedObject.type|escape('html_attr') }}"
|
||||
data-can-edit="{{ canEdit ? '1' : '0' }}"
|
||||
{% if options['small'] is defined %}data-button-small="{{ options['small'] ? '1' : '0' }}"{% endif %}
|
||||
{% if filename|default(storedObject.title)|default(null) is not null %}data-filename="{{ filename|default(storedObject.title)|escape('html_attr') }}"{% endif %}></div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
Reference in New Issue
Block a user