improve doc storing

This commit is contained in:
2018-09-10 10:49:37 +02:00
parent 32402d8c7a
commit 0eccda06d6
7 changed files with 45 additions and 33 deletions

View File

@@ -9,5 +9,5 @@ Editing document for %name%: Modification d'un document pour %name%
Edit Document: Modification d'un document
Existing document: Document existant
The document is successfully updated: Le document est mis à jour
No document to download: Aucun document à télécharger
'Choose a document category': Choisissez une catégorie de document

View File

@@ -1 +1,2 @@
The file is not stored properly: Le fichier n'est pas téléchargé correctement
Upload a document: Téléversez un document

View File

@@ -1,3 +1,7 @@
{% macro download_button(storedObject, filename = null) %}
<a class="sc-button bt-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>
{% if storedObject is null %}
<!-- No document to download -->
{% else %}
<a class="sc-button bt-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 %}
{% endmacro %}