display last export alert in view
This commit is contained in:
parent
968b2cfb0a
commit
f34090f8fd
6 changed files with 36 additions and 4 deletions
|
@ -26,3 +26,14 @@
|
|||
= link_to t('instructeurs.dossiers.header.banner.exports_list'), exports_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
- if @has_export_notification
|
||||
%span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') }
|
||||
|
||||
|
||||
#last-export-alert
|
||||
- if @has_last_export.present?
|
||||
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
||||
- c.body do
|
||||
%p
|
||||
- if @has_last_export.pending?
|
||||
= t('instructeurs.procedures.last_export_pending')
|
||||
- else
|
||||
= t('instructeurs.procedures.last_export_available_html', file_format: @has_last_export.format, file_url: @has_last_export.file.url)
|
||||
|
|
|
@ -6,3 +6,13 @@
|
|||
- else
|
||||
= turbo_stream.update_all '.dossiers-export' do
|
||||
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, statut: @statut, count: @dossiers_count, export_url: method(:download_export_instructeur_procedure_path))
|
||||
|
||||
= turbo_stream.replace "last-export-alert" do
|
||||
- if @has_last_export.present?
|
||||
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-my-2w') do |c|
|
||||
- c.body do
|
||||
%p
|
||||
- if @has_last_export.pending?
|
||||
= t('instructeurs.procedures.last_export_pending')
|
||||
- else
|
||||
= t('instructeurs.procedures.last_export_available_html', file_format: @has_last_export.format, file_url: @has_last_export.file.url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue