Add download dossiers button on procedure#show

This commit is contained in:
Mathieu Magnin 2017-09-15 14:46:17 +02:00
parent 1f2beb7cc9
commit e33259a464
2 changed files with 20 additions and 0 deletions

View file

@ -23,4 +23,12 @@
text-align: center; text-align: center;
margin: 60px 0; margin: 60px 0;
} }
.procedure-actions {
margin-left: auto;
.dropdown-items li {
min-width: 150px;
}
}
} }

View file

@ -38,6 +38,18 @@
= t('pluralize.archived', count: @archived_dossiers.count) = t('pluralize.archived', count: @archived_dossiers.count)
%span.badge= @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 .container
- if @dossiers.present? - if @dossiers.present?
%table.table.dossiers-table.hoverable %table.table.dossiers-table.hoverable