demarches-normaliennes/app/views/instructeurs/procedures/exports.html.haml

30 lines
1.4 KiB
Text

- title = "Exports · #{@procedure.libelle}"
- content_for(:title, title)
.sub-header
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.exports_list')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }
.fr-container
%h1.fr-h4= t('.title')
= render Dsfr::CalloutComponent.new(title: nil) do |c|
- c.with_body do
%p= t('.export_description', expiration_time: Export::MAX_DUREE_CONSERVATION_EXPORT.in_hours.to_i)
- if @exports.present?
%div{ data: @exports.any?(&:pending?) ? { controller: "turbo-poll", turbo_poll_url_value: "", turbo_poll_interval_value: 10_000, turbo_poll_max_checks_value: 6 } : {} }
= render Dossiers::ExportLinkComponent.new(procedure: @procedure, exports: @exports, statut: @statut, count: @dossiers_count, class_btn: 'fr-btn--tertiary', export_url: method(:download_export_instructeur_procedure_path))
- if @exports.any?{_1.format == Export.formats.fetch(:zip)}
= render Dsfr::AlertComponent.new(title: t('.title_zip'), state: :info, extra_class_names: 'fr-mb-3w') do |c|
- c.with_body do
%p= t('.export_description_zip_html')
- else
= t('.no_export_html', expiration_time: Export::MAX_DUREE_CONSERVATION_EXPORT.in_hours.to_i )