19 lines
1.5 KiB
Text
19 lines
1.5 KiB
Text
%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?
|
|
= 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}")
|