2022-04-05 15:57:19 +02:00
|
|
|
%span.dropdown
|
|
|
|
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'download-menu' }
|
|
|
|
= t(".download", count: count)
|
|
|
|
#download-menu.dropdown-content.fade-in-down{ style: 'width: 450px' }
|
|
|
|
%ul.dropdown-items
|
|
|
|
- exports_list(exports, statut).each do |item|
|
|
|
|
- format = item[:format]
|
|
|
|
- export = item[:export]
|
|
|
|
%li
|
|
|
|
- if export.nil?
|
2022-04-13 15:44:29 +02:00
|
|
|
// i18n-tasks-use t('.everything_csv_html')
|
|
|
|
// i18n-tasks-use t('.everything_xlsx_html')
|
|
|
|
// i18n-tasks-use t('.everything_ods_html')
|
|
|
|
// i18n-tasks-use t('.everything_zip_html')
|
2022-04-05 15:57:19 +02:00
|
|
|
= link_to t(".everything_#{format}_html"), download_export_instructeur_procedure_path(procedure, statut: statut, export_format: format), remote: true
|
|
|
|
- elsif export.ready?
|
|
|
|
= link_to t(".everything_ready_html", export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}"), export.file.service_url, target: "_blank", rel: "noopener"
|
|
|
|
- if export.old?
|
|
|
|
= button_to download_export_instructeur_procedure_path(procedure, export_format: format, statut: statut, force_export: true), class: "button small", style: "padding-right: 2px", title: t(".everything_short", export_format: ".#{format}"), remote: true, method: :get, params: { export_format: format, statut: statut, force_export: true } do
|
|
|
|
.icon.retry
|
|
|
|
- else
|
|
|
|
%span{ 'data-export-poll-url': download_export_instructeur_procedure_path(procedure, export_format: format, statut: statut, no_progress_notification: true) }
|
|
|
|
= t(".everything_pending_html", export_time: time_ago_in_words(export.created_at), export_format: ".#{format}")
|