chill-bundles/Resources/views/Export/download.html.twig

43 lines
1.7 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/layoutWithVerticalMenu.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 layout_wvm_content %}
<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>
{% endblock %}