mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
62 lines
2.5 KiB
Twig
62 lines
2.5 KiB
Twig
{#
|
|
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
|
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#}
|
|
|
|
{% extends "@ChillMain/layout.html.twig" %}
|
|
|
|
{% block title "Download export"|trans ~ export.title|trans %}
|
|
|
|
{% block js %}
|
|
<script type="text/javascript">
|
|
window.addEventListener("DOMContentLoaded", function(e) {
|
|
var url = "{{ path('chill_main_export_generate', { 'alias' : alias } ) }}",
|
|
query = window.location.search,
|
|
container = document.querySelector("#download_container")
|
|
;
|
|
|
|
chill.download_report(url+query, container);
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="col-md-10">
|
|
|
|
{{ include('@ChillMain/Export/_breadcrumb.html.twig') }}
|
|
|
|
<h1>{{ export.title|trans }}</h1>
|
|
<h2>{{ "Download export"|trans }}</h2>
|
|
|
|
<div id="download_container"
|
|
data-alias="{{ alias|escape('html_attr') }}"
|
|
{%- if mime_type is defined %}
|
|
data-mime-type="{{- mime_type|escape('html_attr') -}}"
|
|
{% endif -%}
|
|
data-download-text="{{ "Download your report"|trans|escape('html_attr') }}"
|
|
><span id="waiting_text">{{ "Waiting for your report"|trans ~ '...' }}</span></div>
|
|
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel"><a href="{{ chill_return_path_or('chill_main_export_index') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a></li>
|
|
|
|
{% if not app.request.query.has('prevent_save') %}
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_main_export_save_from_key', { alias: alias, key: app.request.query.get('key')}) }}" class="btn btn-save">{{ 'Save'|trans }}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endblock content %} |