21 lines
1.8 KiB
Text
21 lines
1.8 KiB
Text
- if procedure.dossiers.state_not_brouillon.any?
|
|
%span.dropdown
|
|
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'download-menu' }
|
|
Télécharger tous les dossiers
|
|
#download-menu.dropdown-content.fade-in-down{ style: 'width: 330px' }
|
|
%ul.dropdown-items
|
|
- [[xlsx_export, :xlsx], [ods_export, :ods], [csv_export, :csv]].each do |(export, format)|
|
|
%li
|
|
- if export.nil?
|
|
= link_to t("#{format}_html", scope: [:instructeurs, :procedure, :export_stale]), download_export_instructeur_procedure_path(procedure, export_format: format), remote: true
|
|
- elsif export.ready?
|
|
= link_to t(:export_ready_html, export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}", scope: [:instructeurs, :procedure]), export.file.service_url, target: "_blank", rel: "noopener"
|
|
- if export.old?
|
|
= button_to download_export_instructeur_procedure_path(procedure, export_format: format, force_export: true), class: "button small", style: "padding-right: 2px", title: t(:short, export_format: ".#{format}", scope: [:instructeurs, :procedure, :export_stale]), remote: true, method: :get, params: { export_format: format, force_export: true } do
|
|
.icon.retry
|
|
- else
|
|
%span{ 'data-export-poll-url': download_export_instructeur_procedure_path(procedure, export_format: format, no_progress_notification: true) }
|
|
= t(:export_pending_html, export_time: time_ago_in_words(export.created_at), export_format: ".#{format}", scope: [:instructeurs, :procedure])
|
|
- if procedure.feature_enabled?(:archive_zip_globale)
|
|
%li
|
|
= link_to t(:download_archive, scope: [:instructeurs, :procedure]), instructeur_archives_path(procedure)
|