From e33259a464042fb75a282061271e276d16149dea Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Fri, 15 Sep 2017 14:46:17 +0200 Subject: [PATCH] Add download dossiers button on procedure#show --- .../stylesheets/new_design/procedures_show.scss | 8 ++++++++ app/views/new_gestionnaire/procedures/show.html.haml | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/assets/stylesheets/new_design/procedures_show.scss b/app/assets/stylesheets/new_design/procedures_show.scss index c69942023..84ea39756 100644 --- a/app/assets/stylesheets/new_design/procedures_show.scss +++ b/app/assets/stylesheets/new_design/procedures_show.scss @@ -23,4 +23,12 @@ text-align: center; margin: 60px 0; } + + .procedure-actions { + margin-left: auto; + + .dropdown-items li { + min-width: 150px; + } + } } diff --git a/app/views/new_gestionnaire/procedures/show.html.haml b/app/views/new_gestionnaire/procedures/show.html.haml index 69df7ab10..28538c565 100644 --- a/app/views/new_gestionnaire/procedures/show.html.haml +++ b/app/views/new_gestionnaire/procedures/show.html.haml @@ -38,6 +38,18 @@ = t('pluralize.archived', count: @archived_dossiers.count) %span.badge= @archived_dossiers.count + .procedure-actions + %span.button.dropdown + Télécharger tous les dossiers + .dropdown-content.fade-in-down + %ul.dropdown-items + %li + = link_to "Au format .csv", backoffice_download_dossiers_tps_path(format: :csv, procedure_id: @procedure.id), target: "_blank" + %li + = link_to "Au format .xls", backoffice_download_dossiers_tps_path(format: :xls, procedure_id: @procedure.id), target: "_blank" + %li + = link_to "Au format .ods", backoffice_download_dossiers_tps_path(format: :ods, procedure_id: @procedure.id), target: "_blank" + .container - if @dossiers.present? %table.table.dossiers-table.hoverable