remove hidden dossier partial for hidden usager tab
This commit is contained in:
parent
77240f40c8
commit
1edfaae354
5 changed files with 36 additions and 63 deletions
|
@ -7,36 +7,44 @@
|
|||
.flex.justify-between
|
||||
%div
|
||||
%h2.card-title
|
||||
- if @statut == "dossiers-transferes"
|
||||
= dossier.procedure.libelle
|
||||
- else
|
||||
- if ["dossiers-transferes", "dossiers-supprimes-recemment"].exclude?(@statut)
|
||||
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
||||
= dossier.procedure.libelle
|
||||
- else
|
||||
= dossier.procedure.libelle
|
||||
|
||||
%p.fr-icon--sm.fr-icon-user-line
|
||||
= demandeur_dossier(dossier)
|
||||
|
||||
%p.fr-icon--sm.fr-icon-edit-box-line
|
||||
- if dossier.depose_at.present?
|
||||
%span
|
||||
= t('views.users.dossiers.dossiers_list.depose_at', date: dossier.depose_at.strftime('%d/%m/%Y'))
|
||||
- else
|
||||
%span
|
||||
= t('views.users.dossiers.dossiers_list.created_at', date: dossier.created_at.strftime('%d/%m/%Y'))
|
||||
- if dossier.created_at != dossier.updated_at
|
||||
= t('views.users.dossiers.dossiers_list.updated_at', date: dossier.updated_at.strftime('%d/%m/%Y %H:%M'))
|
||||
- if dossier.invites.present?
|
||||
%p.fr-icon--sm.fr-icon-shield-line
|
||||
= t('views.users.dossiers.dossiers_list.shared_with')
|
||||
= dossier.invites.map(&:email).join(', ')
|
||||
- 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'))
|
||||
- else
|
||||
%p.fr-icon--sm.fr-icon-edit-box-line
|
||||
- if dossier.depose_at.present?
|
||||
%span
|
||||
= t('views.users.dossiers.dossiers_list.depose_at', date: dossier.depose_at.strftime('%d/%m/%Y'))
|
||||
- else
|
||||
%span
|
||||
= t('views.users.dossiers.dossiers_list.created_at', date: dossier.created_at.strftime('%d/%m/%Y'))
|
||||
- if dossier.created_at != dossier.updated_at
|
||||
= t('views.users.dossiers.dossiers_list.updated_at', date: dossier.updated_at.strftime('%d/%m/%Y %H:%M'))
|
||||
|
||||
- if dossier.invites.present?
|
||||
%p.fr-icon--sm.fr-icon-shield-line
|
||||
= t('views.users.dossiers.dossiers_list.shared_with')
|
||||
= dossier.invites.map(&:email).join(', ')
|
||||
|
||||
.text-right
|
||||
%p.fr-mb-0
|
||||
= t('views.users.dossiers.dossiers_list.n_dossier')
|
||||
= dossier.id
|
||||
|
||||
= status_badge(dossier.state, 'fr-mb-1w')
|
||||
- if @statut == "dossiers-supprimes-recemment"
|
||||
%span.fr-badge.fr-badge--warning
|
||||
= t('views.users.dossiers.dossiers_list.hidden_by_user_badge')
|
||||
- else
|
||||
= status_badge(dossier.state, 'fr-mb-1w')
|
||||
|
||||
- if dossier.pending_correction?
|
||||
%br
|
||||
|
@ -72,10 +80,15 @@
|
|||
= link_to t('views.users.dossiers.transfers.revoke'), transfer_path(dossier.transfer), class: 'fr-link', method: :delete
|
||||
|
||||
|
||||
- if @statut != "dossiers-transferes"
|
||||
- if ["dossiers-transferes", "dossiers-supprimes-recemment"].exclude?(@statut)
|
||||
.flex.justify-end
|
||||
= render partial: 'dossier_actions', locals: { dossier: dossier }
|
||||
|
||||
- if @statut == "dossiers-supprimes-recemment"
|
||||
.flex.justify-end
|
||||
= link_to restore_dossier_path(dossier.id), method: :patch, class: "fr-btn fr-btn--sm" do
|
||||
Restaurer
|
||||
|
||||
= paginate dossiers, views_prefix: 'shared'
|
||||
|
||||
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
- if hidden_dossiers.present?
|
||||
%span.fr-h6.fr-mr-2w
|
||||
= page_entries_info hidden_dossiers
|
||||
|
||||
.fr-table.fr-table--bordered.fr-table--no-caption.fr-mt-2w
|
||||
%table.table.dossiers-table.hoverable
|
||||
%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
|
||||
%th.action-col.follow-col Actions
|
||||
%tbody
|
||||
- hidden_dossiers.each do |dossier|
|
||||
- libelle_demarche = dossier.procedure.libelle
|
||||
|
||||
%tr{ data: { 'dossier-id': dossier.id } }
|
||||
%td.number-col
|
||||
%span.icon.folder
|
||||
= dossier.id
|
||||
%td
|
||||
= libelle_demarche
|
||||
|
||||
%td.cell-link
|
||||
= deletion_reason_badge("user_request")
|
||||
%td
|
||||
= dossier.updated_at.strftime('%d/%m/%Y')
|
||||
%td.action-col.follow-col
|
||||
= link_to restore_dossier_path(dossier.id), method: :patch, class: "fr-btn" do
|
||||
Restaurer
|
||||
|
||||
= paginate hidden_dossiers, views_prefix: 'shared'
|
||||
|
||||
- else
|
||||
.blank-tab
|
||||
%h2.empty-text
|
||||
= t("views.users.dossiers.account_creation.empty")
|
||||
%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.
|
|
@ -88,7 +88,7 @@
|
|||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
||||
|
||||
- if @statut == "dossiers-supprimes-recemment"
|
||||
= render partial: "hidden_dossiers_list", locals: { hidden_dossiers: @dossiers }
|
||||
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
||||
|
||||
- if @statut == "dossiers-supprimes-definitivement"
|
||||
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
|
||||
|
|
|
@ -472,6 +472,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
|
||||
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}"
|
||||
|
|
|
@ -474,6 +474,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é
|
||||
dossier_action:
|
||||
edit_dossier: "Modifier le dossier"
|
||||
start_other_dossier: "Commencer un autre dossier vide"
|
||||
|
|
Loading…
Reference in a new issue