diff --git a/Controller/ExportController.php b/Controller/ExportController.php index 7fff3fe9a..fe8565de4 100644 --- a/Controller/ExportController.php +++ b/Controller/ExportController.php @@ -374,7 +374,7 @@ class ExportController extends Controller ); unset($redirectParameters['_token']); - return $this->redirectToRoute('chill_main_export_generate', + return $this->redirectToRoute('chill_main_export_download', $redirectParameters); } @@ -410,4 +410,11 @@ class ExportController extends Controller return $r; } + + public function downloadResultAction(Request $request, $alias) + { + return $this->render("ChillMainBundle:Export:download.html.twig", [ + 'alias' => $alias + ]); + } } diff --git a/Resources/config/routing/exports.yml b/Resources/config/routing/exports.yml index 7c7eb7db0..82eb981c3 100644 --- a/Resources/config/routing/exports.yml +++ b/Resources/config/routing/exports.yml @@ -16,3 +16,8 @@ chill_main_export_generate: path: /generate/{alias} defaults: { _controller: ChillMainBundle:Export:generate } methods: [GET] + +chill_main_export_download: + path: /download/{alias} + defaults: { _controller: ChillMainBundle:Export:downloadResult } + methods: [ GET ] \ No newline at end of file diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index a116501a7..a15ebc277 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -142,6 +142,11 @@ Go to formatter options: Vers les options de mise en forme Generate the report: Générer le rapport No options availables. Your report is fully configured.: Pas d'options disponibles. Votre rapport est déjà configuré. +#export download +Download export: Téléchargement du rapport +Waiting for your report: En attente de votre rapport +Download your report: Télécharger votre rapport +Problem during download: Problème durant le téléchargement # sans valeur without data: sans valeur diff --git a/Resources/views/Export/download.html.twig b/Resources/views/Export/download.html.twig new file mode 100644 index 000000000..c517c37e8 --- /dev/null +++ b/Resources/views/Export/download.html.twig @@ -0,0 +1,85 @@ +{# + * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, + / + * + * 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 . +#} + +{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} + +{% block title "Download export"|trans %} + +{% block js %} + +{% endblock %} + +{% block layout_wvm_content %} + +

{{ "Download export"|trans }}

+ +
{{ "Waiting for your report"|trans }}...
+ +{% endblock %} \ No newline at end of file