diff --git a/app/views/instructeurs/archives/index.html.haml b/app/views/instructeurs/archives/index.html.haml index 057385e69..3faf237dc 100644 --- a/app/views/instructeurs/archives/index.html.haml +++ b/app/views/instructeurs/archives/index.html.haml @@ -47,10 +47,10 @@ - if matching_archive.try(&:available?) = link_to url_for(matching_archive.file), class: 'button primary' do %span.icon.download-white - Télécharger + = t(:archive_ready_html, generated_period: time_ago_in_words(matching_archive.updated_at), scope: [:instructeurs, :procedure]) - elsif matching_archive.try(&:pending?) %span.icon.retry - Archive en cours de création + = t(:archive_pending_html, created_period: time_ago_in_words(matching_archive.created_at), scope: [:instructeurs, :procedure]) - elsif @dossiers_termines.count > 0 = link_to instructeur_archives_path(@procedure, type: 'everything'), method: :post, class: "button", remote: true do %span.icon.new-folder @@ -78,12 +78,12 @@ - if matching_archive.status == 'generated' && matching_archive.file.attached? = link_to url_for(matching_archive.file), class: 'button primary' do %span.icon.download-white - Télécharger + = t(:archive_ready_html, generated_period: time_ago_in_words(matching_archive.updated_at), scope: [:instructeurs, :procedure]) - else %span.icon.retry - Archive en cours de création + = t(:archive_pending_html, created_period: time_ago_in_words(matching_archive.created_at), scope: [:instructeurs, :procedure]) - else - = link_to instructeur_archives_path(@procedure, type:'monthly', month: month.strftime('%Y-%m')), method: :post, class: "button", remote: true do + = link_to instructeur_archives_path(@procedure, type:'monthly', month: month.strftime('%Y-%m')), method: :post, class: "button" do %span.icon.new-folder Démander la création - else diff --git a/config/locales/views/instructeurs/fr.yml b/config/locales/views/instructeurs/fr.yml index 17c7ef429..ef2b1987b 100644 --- a/config/locales/views/instructeurs/fr.yml +++ b/config/locales/views/instructeurs/fr.yml @@ -9,3 +9,5 @@ fr: export_ready_html: Télécharger l’export au format %{export_format}
(généré il y a %{export_time}) export_pending_html: Un export au format %{export_format} est en train d’être généré
(demandé il y a %{export_time}) download_archive: Télécharger une archive au format .zip de tous les dossiers et leurs pièces jointes + archive_pending_html: Archive en cours de création
(demandée il y a %{created_period}) + archive_ready_html: Télécharger l'archive
(demandée il y a %{generated_period})