From b19e70ccfe53e276eec8c1cb64435a50f8e9d48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 3 Apr 2019 15:11:45 +0200 Subject: [PATCH 1/2] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 392acaf7a..1d9b15fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,7 @@ Version 1.5.5 - add api for grouping centers ; - select centers as grouped on step "pick centers" in exports ; -Master branch +Version 1.5.6 ============= - fix long url in report download. The exports parameters are now stored in redis. From 8bfa3c50284e184ffa0721e46c26f21dd67950a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 3 Apr 2019 15:32:22 +0200 Subject: [PATCH 2/2] add title of the export at the download page --- CHANGELOG.md | 4 ++++ Controller/ExportController.php | 7 ++++--- Resources/views/Export/download.html.twig | 5 +++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d9b15fb4..84ccc73b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,3 +40,7 @@ Version 1.5.6 - fix long url in report download. The exports parameters are now stored in redis. +Branche de développement +======================== + +- insert the title of the export inside the "download" page ; diff --git a/Controller/ExportController.php b/Controller/ExportController.php index 06600d14a..22f3a0fe2 100644 --- a/Controller/ExportController.php +++ b/Controller/ExportController.php @@ -483,12 +483,12 @@ class ExportController extends Controller protected function rebuildData($key) { if ($key === NULL) { - throw $this->createHttpNotFoundException("key does not exists"); + throw $this->createNotFoundException("key does not exists"); } if ($this->redis->exists($key) !== 1) { $this->addFlash('error', $this->translator->trans("This report is not available any more")); - throw $this->createHttpNotFoundException("key does not exists"); + throw $this->createNotFoundException("key does not exists"); } $serialized = $this->redis->get($key); @@ -534,7 +534,8 @@ class ExportController extends Controller } $viewVariables = [ - 'alias' => $alias + 'alias' => $alias, + 'export' => $exportManager->getExport($alias) ]; if ($formater instanceof \Chill\MainBundle\Export\Formatter\CSVListFormatter) { diff --git a/Resources/views/Export/download.html.twig b/Resources/views/Export/download.html.twig index 87c8b7989..a12b9f3e7 100644 --- a/Resources/views/Export/download.html.twig +++ b/Resources/views/Export/download.html.twig @@ -18,7 +18,7 @@ {% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %} -{% block title "Download export"|trans %} +{% block title "Download export"|trans ~ export.title|trans %} {% block js %}