{% import 'common/thumbnail.html.twig' as thumbnail %} {% macro print_ftp_form(datas) %}
{% endmacro %} {% macro choose_title(id, choose_export_title, default_export_title)%}

{{ 'Nom des fichiers a l\'export' | trans }}

{% endmacro %} {% if app['conf'].get(['registry', 'actions', 'auth-required-for-export']) and app.getAuthenticatedUser().isGuest() %} {% else %} {% if download.get_total_download() <= 0 and download.get_total_order() <= 0 and download.get_total_ftp() <= 0%}

{{ 'Les documents ne peuvent pas etre exportes' | trans }}

{% endif %}
{% if download.get_total_download() > 0 %} {# ########################################## direct / async download ############################################# #}

{{ 'export:: telechargement' | trans }}

{% if app['conf'].get(['download_async', 'enabled'], false) %} {# \Alchemy\Phrasea\Controller\Prod\DownloadController::listDownloadAsync #} {% set download_path = 'list_download_async' %} {% else %} {# \Alchemy\Phrasea\Controller\Prod\DownloadController::checkDownload #} {% set download_path = 'check_download' %} {% endif %}
{% for name, values in download.get_display_download() %} {% if values.available > 0 %}
{% if values.refused|length > 0 %} {% endif %}
{% endif %} {% endfor %} {% if app['conf'].get(['download_async', 'enabled'], false) %}
{% endif %} {% if download.has_business_fields_access() %} {% endif %} {{ _self.choose_title('download', choose_export_title, default_export_title) }} {% if app['conf'].get(['registry', 'actions', 'tou-validation-required-for-export']) == true %}
{% endif %} {% if removeable_stamp and download.has_stamp_option() == true %}
{% endif %}
{# ########################################## email ############################################# #}

{{ 'export:: envoi par mail' | trans }}

{# \Alchemy\Phrasea\Controller\Prod\ExportController::exportMail #}
{{ 'export:email:info:: email addresses separated by commas' | trans }}
{{ 'export::mail: destinataire' | trans }} {% set my_email = app.getAuthenticatedUser().getEmail() %}
{% if my_email != '' %} {% else %} {% endif %} {{ 'export:email:: acknowledgement info' | trans }}

{{ 'export::mail: contenu du mail' | trans }}

{{ 'export::mail: fichiers joint' | trans }}

{% for name, values in download.get_display_download() %} {% if values.available > 0 %}
{% if values.refused|length > 0 %} {% endif %}
{% endif %} {% endfor %}
{% if removeable_stamp and download.has_stamp_option() == true %}
{% endif %} {% if download.has_business_fields_access() %} {% endif %} {{ _self.choose_title('sendmail', choose_export_title, default_export_title) }} {% if app['conf'].get(['registry', 'actions', 'tou-validation-required-for-export']) == true %}
{% endif %}
{% endif %} {% if download.get_total_order() > 0 %} {# ########################################## order ############################################# #}
{% for name, values in download.get_display_orderable() %} {% if values.available > 0 %}
{% set docs_orderable = values.available %} {% if docs_orderable <= 1 %} {{ "Un document commande" | trans() }} {% else %} {{ "%docs_orderable% documents commandes" | trans({'%docs_orderable%' : docs_orderable}) }} {% endif %} {% set docs_not_orderable = values.total - values.available %} {% if docs_not_orderable > 0%} {% if docs_not_orderable == 1 %} {{ "Un document ne peut etre commande" | trans() }} {% else %} {{ "%docs_not_orderable% documents ne peuvent pas etre commandes" | trans({'%docs_not_orderable%' : docs_not_orderable}) }} {% endif %} {% endif %} {% if values.refused|length > 0 %} {% set title%} {{ 'Documents indisponibles' | trans }} {% endset %} + {% endif %}
{% endif %} {% endfor %}
{% if app['conf'].get(['registry', 'actions', 'tou-validation-required-for-export']) == true %}
{% endif %}
{% endif %} {# ########################################## ftp ############################################# #} {% if download.get_total_ftp() > 0 %}

{{ 'export:: FTP' | trans }}

{% for datas in download.get_ftp_datas() %} {{ _self.print_ftp_form(datas) }} {% endfor %}

{{ 'export::mail: fichiers joint' | trans }}

{% for name, values in download.get_display_ftp() %} {% if values.available > 0 %}
{% if values.refused|length > 0 %} {% endif %}
{% endif %} {% endfor %} {% if removeable_stamp and download.has_stamp_option() == true %}
{% endif %}
{% if download.has_business_fields_access() %} {% endif %} {% if app['conf'].get(['registry', 'actions', 'tou-validation-required-for-export']) == true %}
{% endif %}
{% endif %}
{% endif %}