diff --git a/app/views/users/dossiers/_deleted_dossiers_list.html.haml b/app/views/users/dossiers/_deleted_dossiers_list.html.haml
index 1bedcba59..e4dc08cd5 100644
--- a/app/views/users/dossiers/_deleted_dossiers_list.html.haml
+++ b/app/views/users/dossiers/_deleted_dossiers_list.html.haml
@@ -1,38 +1,31 @@
- if deleted_dossiers.present?
- %span.fr-h6.fr-mr-2w
+ .fr-h6.fr-mb-2w
= page_entries_info deleted_dossiers
- .fr-table.fr-table--bordered.fr-table--no-caption.fr-mt-2w
- %table.table.dossiers-table.hoverable.display-table
- %caption= t('views.users.dossiers.dossiers_list.caption')
- %thead
- %tr
- %th.number-col Nº dossier
- %th Démarche
- %th Raison de suppression
- %th Date de suppression
- %tbody
- - deleted_dossiers.each do |dossier|
- %tr{ data: { 'dossier-id': dossier.dossier_id } }
- %td.number-col
- %span.icon.folder
- = dossier.dossier_id
- %td
- = dossier.procedure.libelle
+ - deleted_dossiers.each do |dossier|
+ .card
+ .flex.justify-between
+ %div
+ %h2.card-title
+ = dossier.procedure.libelle
- %td.cell-link
- = deletion_reason_badge(dossier.reason)
- %td
- = dossier.updated_at.strftime('%d/%m/%Y')
+ %p.fr-icon--sm.fr-icon-delete-line.fr-mb-0
+ = t('views.users.dossiers.dossiers_list.deleted', date: dossier.updated_at.strftime('%d/%m/%Y'))
+ = "-"
+ = t("activerecord.attributes.deleted_dossier.reason.#{dossier.reason}")
- = paginate deleted_dossiers, views_prefix: 'shared'
+ .text-right
+ %p.fr-mb-0
+ = t('views.users.dossiers.dossiers_list.n_dossier')
+ = dossier.dossier_id
+
+ %span.fr-badge.fr-badge--warning
+ = t('views.users.dossiers.dossiers_list.deleted_badge')
+
+ = paginate deleted_dossiers, views_prefix: 'shared'
- else
.blank-tab
- %h2.empty-text
- = t("views.users.dossiers.account_creation.empty")
+ %h2.empty-text= t('views.users.dossiers.dossiers_list.no_result_title')
%p.empty-text-details
- = t("views.users.dossiers.account_creation.detail_one")
- %p.empty-text-details
- = t("views.users.dossiers.account_creation.detail_two")
- #{APPLICATION_BASE_URL}/commencer/xxx.
+ = t('views.users.dossiers.dossiers_list.no_result_text_html', app_base: APPLICATION_BASE_URL)
diff --git a/app/views/users/dossiers/_dossiers_list.html.haml b/app/views/users/dossiers/_dossiers_list.html.haml
index d2937be34..5ba072fb9 100644
--- a/app/views/users/dossiers/_dossiers_list.html.haml
+++ b/app/views/users/dossiers/_dossiers_list.html.haml
@@ -18,7 +18,7 @@
- if dossier.hidden_by_user?
%p.fr-icon--sm.fr-icon-delete-line
- = t('views.users.dossiers.dossiers_list.hidden_by_user', date: dossier.hidden_by_user_at.strftime('%d/%m/%Y'))
+ = t('views.users.dossiers.dossiers_list.deleted', date: dossier.hidden_by_user_at.strftime('%d/%m/%Y'))
- else
%p.fr-icon--sm.fr-icon-edit-box-line
- if dossier.depose_at.present?
@@ -42,7 +42,7 @@
- if @statut == "dossiers-supprimes-recemment"
%span.fr-badge.fr-badge--warning
- = t('views.users.dossiers.dossiers_list.hidden_by_user_badge')
+ = t('views.users.dossiers.dossiers_list.deleted_badge')
- else
= status_badge(dossier.state, 'fr-mb-1w')
diff --git a/app/views/users/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml
index 156caba53..363bdd5d4 100644
--- a/app/views/users/dossiers/index.html.haml
+++ b/app/views/users/dossiers/index.html.haml
@@ -78,23 +78,8 @@
- else
= render Dossiers::UserFilterComponent.new(statut: @statut, filter: @filter)
- - if @statut == "en-cours"
- = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
-
- - if @statut == "traites"
- = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
-
- - if @statut == "dossiers-invites"
- = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
-
- - if @statut == "dossiers-supprimes-recemment"
- = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
-
- if @statut == "dossiers-supprimes-definitivement"
+ -# /!\ in this context, @dossiers is a collection of DeletedDossier not Dossier
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
-
- - if @statut == "dossiers-transferes"
- = render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
-
- - if @statut == "dossiers-expirant"
+ - else
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5e7d71130..d41dec480 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -393,10 +393,6 @@ en:
dossier_not_in_instructor_group: "File no. %{dossier_id} of the “%{procedure_libelle}” procedure corresponds to your search, but it is attached to the “%{groupe_instructeur_label}” instructor group."
users:
dossiers:
- account_creation:
- empty: "No file"
- detail_one: "To complete a procedure, contact your administration and ask for the link to the procedure."
- detail_two: "This one should look like"
fix_champ: "fill in this field"
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
identite:
@@ -460,7 +456,6 @@ en:
index:
dossiers: "My files"
dossiers_list:
- caption: My files
n_dossier: "File n."
no_result_title: No files
no_result_text_html: "To fill a procedure, contact your administration asking for the procedure link.
It should look like %{app_base}/commencer/xxx."
@@ -472,8 +467,8 @@ en:
created_at: Created at %{date}
updated_at: updated at %{date}
shared_with: File shared with
- hidden_by_user: Deleted at %{date}
- hidden_by_user_badge: Deleted
+ deleted: Deleted at %{date}
+ deleted_badge: Deleted
transfers:
sender_demande_en_cours: "A transfer request is pending on file Nº %{id} to %{email}"
receiver_demande_en_cours: "Transfer request on file Nº %{id} sent by %{email}"
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 15e31d50a..c10753a63 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -395,10 +395,6 @@ fr:
dossier_not_in_instructor_group: "Le dossier n° %{dossier_id} de la procédure « %{procedure_libelle} » correspond à votre recherche mais il est rattaché au groupe d’instructeurs « %{groupe_instructeur_label} »."
users:
dossiers:
- account_creation:
- empty: "Aucun dossier"
- detail_one: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche."
- detail_two: "Celui ci doit ressembler à"
fix_champ: "corriger l’erreur"
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
identite:
@@ -462,7 +458,6 @@ fr:
index:
dossiers: "Mes dossiers"
dossiers_list:
- caption: Mes dossiers
n_dossier: "Nº dossier"
no_result_title: Aucun dossier
no_result_text_html: "Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche.
Celui ci doit ressembler à %{app_base}/commencer/xxx."
@@ -474,8 +469,8 @@ fr:
created_at: Créé le %{date}
updated_at: modifié le %{date}
shared_with: Dossier partagé avec
- hidden_by_user: Supprimé le %{date}
- hidden_by_user_badge: Supprimé
+ deleted: Supprimé le %{date}
+ deleted_badge: Supprimé
dossier_action:
edit_dossier: "Modifier le dossier"
start_other_dossier: "Commencer un autre dossier vide"
diff --git a/config/locales/models/deleted_dossier/en.yml b/config/locales/models/deleted_dossier/en.yml
new file mode 100644
index 000000000..c2ab41533
--- /dev/null
+++ b/config/locales/models/deleted_dossier/en.yml
@@ -0,0 +1,16 @@
+en:
+ activerecord:
+ models:
+ deleted_dossier:
+ one: "Deleted file"
+ other: "Deleted files"
+ attributes:
+ deleted_dossier:
+ reason:
+ user_request: User request
+ manager_request: Manager request
+ user_removed: User removed
+ procedure_removed: Procedure removed
+ expired: Expired
+ unknown: Unknow
+ instructeur_request: Deleted by instructor
diff --git a/config/locales/models/deleted_dossier/fr.yml b/config/locales/models/deleted_dossier/fr.yml
index 87dd5a670..4f9664df7 100644
--- a/config/locales/models/deleted_dossier/fr.yml
+++ b/config/locales/models/deleted_dossier/fr.yml
@@ -1,5 +1,9 @@
fr:
activerecord:
+ models:
+ deleted_dossier:
+ one: "Dossier supprimé"
+ other: "Dossiers supprimés"
attributes:
deleted_dossier:
reason:
diff --git a/spec/system/users/transfer_dossier_spec.rb b/spec/system/users/transfer_dossier_spec.rb
index 8ef070427..2e2622dcd 100644
--- a/spec/system/users/transfer_dossier_spec.rb
+++ b/spec/system/users/transfer_dossier_spec.rb
@@ -11,8 +11,8 @@ describe 'Transfer dossier:' do
end
scenario 'the user can transfer dossier to another user' do
- within(:css, "tr[data-dossier-id=\"#{dossier.id}\"]") do
- click_on 'Actions'
+ within(:css, ".card", match: :first) do
+ click_on 'Autres actions'
click_on 'Transférer le dossier'
end