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,15 +7,19 @@
|
||||||
.flex.justify-between
|
.flex.justify-between
|
||||||
%div
|
%div
|
||||||
%h2.card-title
|
%h2.card-title
|
||||||
- if @statut == "dossiers-transferes"
|
- if ["dossiers-transferes", "dossiers-supprimes-recemment"].exclude?(@statut)
|
||||||
|
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
||||||
= dossier.procedure.libelle
|
= dossier.procedure.libelle
|
||||||
- else
|
- else
|
||||||
= link_to(url_for_dossier(dossier), class: 'cell-link') do
|
|
||||||
= dossier.procedure.libelle
|
= dossier.procedure.libelle
|
||||||
|
|
||||||
%p.fr-icon--sm.fr-icon-user-line
|
%p.fr-icon--sm.fr-icon-user-line
|
||||||
= demandeur_dossier(dossier)
|
= demandeur_dossier(dossier)
|
||||||
|
|
||||||
|
- 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
|
%p.fr-icon--sm.fr-icon-edit-box-line
|
||||||
- if dossier.depose_at.present?
|
- if dossier.depose_at.present?
|
||||||
%span
|
%span
|
||||||
|
@ -25,17 +29,21 @@
|
||||||
= t('views.users.dossiers.dossiers_list.created_at', date: dossier.created_at.strftime('%d/%m/%Y'))
|
= t('views.users.dossiers.dossiers_list.created_at', date: dossier.created_at.strftime('%d/%m/%Y'))
|
||||||
- if dossier.created_at != dossier.updated_at
|
- 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'))
|
= t('views.users.dossiers.dossiers_list.updated_at', date: dossier.updated_at.strftime('%d/%m/%Y %H:%M'))
|
||||||
|
|
||||||
- if dossier.invites.present?
|
- if dossier.invites.present?
|
||||||
%p.fr-icon--sm.fr-icon-shield-line
|
%p.fr-icon--sm.fr-icon-shield-line
|
||||||
= t('views.users.dossiers.dossiers_list.shared_with')
|
= t('views.users.dossiers.dossiers_list.shared_with')
|
||||||
= dossier.invites.map(&:email).join(', ')
|
= dossier.invites.map(&:email).join(', ')
|
||||||
|
|
||||||
|
|
||||||
.text-right
|
.text-right
|
||||||
%p.fr-mb-0
|
%p.fr-mb-0
|
||||||
= t('views.users.dossiers.dossiers_list.n_dossier')
|
= t('views.users.dossiers.dossiers_list.n_dossier')
|
||||||
= dossier.id
|
= dossier.id
|
||||||
|
|
||||||
|
- 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')
|
= status_badge(dossier.state, 'fr-mb-1w')
|
||||||
|
|
||||||
- if dossier.pending_correction?
|
- if dossier.pending_correction?
|
||||||
|
@ -72,10 +80,15 @@
|
||||||
= link_to t('views.users.dossiers.transfers.revoke'), transfer_path(dossier.transfer), class: 'fr-link', method: :delete
|
= 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
|
.flex.justify-end
|
||||||
= render partial: 'dossier_actions', locals: { dossier: dossier }
|
= 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'
|
= 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 }
|
= render partial: "dossiers_list", locals: { dossiers: @dossiers, filter: @filter, statut: @statut }
|
||||||
|
|
||||||
- if @statut == "dossiers-supprimes-recemment"
|
- 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"
|
- if @statut == "dossiers-supprimes-definitivement"
|
||||||
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
|
= render partial: "deleted_dossiers_list", locals: { deleted_dossiers: @dossiers }
|
||||||
|
|
|
@ -472,6 +472,8 @@ en:
|
||||||
created_at: Created at %{date}
|
created_at: Created at %{date}
|
||||||
updated_at: updated at %{date}
|
updated_at: updated at %{date}
|
||||||
shared_with: File shared with
|
shared_with: File shared with
|
||||||
|
hidden_by_user: Deleted at %{date}
|
||||||
|
hidden_by_user_badge: Deleted
|
||||||
transfers:
|
transfers:
|
||||||
sender_demande_en_cours: "A transfer request is pending on file Nº %{id} to %{email}"
|
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}"
|
receiver_demande_en_cours: "Transfer request on file Nº %{id} sent by %{email}"
|
||||||
|
|
|
@ -474,6 +474,8 @@ fr:
|
||||||
created_at: Créé le %{date}
|
created_at: Créé le %{date}
|
||||||
updated_at: modifié le %{date}
|
updated_at: modifié le %{date}
|
||||||
shared_with: Dossier partagé avec
|
shared_with: Dossier partagé avec
|
||||||
|
hidden_by_user: Supprimé le %{date}
|
||||||
|
hidden_by_user_badge: Supprimé
|
||||||
dossier_action:
|
dossier_action:
|
||||||
edit_dossier: "Modifier le dossier"
|
edit_dossier: "Modifier le dossier"
|
||||||
start_other_dossier: "Commencer un autre dossier vide"
|
start_other_dossier: "Commencer un autre dossier vide"
|
||||||
|
|
Loading…
Reference in a new issue