use main navigation to display deleted dossier for user
This commit is contained in:
parent
95a8f1458b
commit
066a2bea85
4 changed files with 6 additions and 10 deletions
|
@ -26,7 +26,6 @@ module Users
|
|||
|
||||
def index
|
||||
ordered_dossiers = Dossier.includes(:procedure).order_by_updated_at
|
||||
@dossiers_supprimes_historique = current_user.deleted_dossiers.includes(:procedure).order_by_updated_at
|
||||
|
||||
user_revisions = ProcedureRevision.where(dossiers: current_user.dossiers.visible_by_user)
|
||||
invite_revisions = ProcedureRevision.where(dossiers: current_user.dossiers_invites.visible_by_user)
|
||||
|
@ -56,7 +55,6 @@ module Users
|
|||
@dossiers_supprimes = (current_user.dossiers.hidden_by_user.or(current_user.dossiers.hidden_by_expired)).merge(ordered_dossiers)
|
||||
@dossier_transferes = @dossiers_visibles.where(dossier_transfer_id: DossierTransfer.for_email(current_user.email))
|
||||
@dossiers_close_to_expiration = current_user.dossiers.close_to_expiration.merge(@dossiers_visibles)
|
||||
@dossiers_supprimes_historique = deleted_dossiers
|
||||
|
||||
@statut = statut(@user_dossiers, @dossiers_traites, @dossiers_invites, @dossiers_supprimes, @dossier_transferes, @dossiers_close_to_expiration, params[:statut])
|
||||
|
||||
|
|
|
@ -5,4 +5,8 @@
|
|||
= link_to t('back', scope: [:layouts, :header]), url_for(:back), title: t('back_title', scope: [:layouts, :header]), class: 'fr-nav__link', "aria-controls" => "modal-header__menu"
|
||||
|
||||
%li.fr-nav__item
|
||||
= link_to t('files', scope: [:layouts, :header]), dossiers_path, class: 'fr-nav__link', aria: { current: controller_name == 'dossiers' ? 'true' : nil, controls: "modal-header__menu" }
|
||||
= link_to t('files', scope: [:layouts, :header]), dossiers_path, class: 'fr-nav__link', aria: { current: (controller_name == 'dossiers' && action_name != 'deleted_dossiers') ? 'true' : nil, controls: "modal-header__menu" }
|
||||
|
||||
- if current_user.deleted_dossiers.present?
|
||||
%li.fr-nav__item
|
||||
= link_to 'Historique des dossiers supprimés', deleted_dossiers_path(), class: 'fr-nav__link', aria: { current: action_name == 'deleted_dossiers' ? 'true' : nil, controls: "modal-header__menu" }
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
|
||||
.fr-container
|
||||
.fr-mb-3w
|
||||
= link_to "Retour à la liste des dossiers", dossiers_path(), class: "fr-link fr-icon-arrow-left-line fr-link--icon-left"
|
||||
%h1.fr-h2
|
||||
Historique des dossiers supprimés
|
||||
|
||||
|
|
|
@ -5,11 +5,7 @@
|
|||
|
||||
.dossiers-headers.sub-header
|
||||
.fr-container
|
||||
.flex.align-center
|
||||
%h1.page-title.fr-h2= t('views.users.dossiers.index.dossiers')
|
||||
- if @dossiers_supprimes_historique.present?
|
||||
%p.ml-auto
|
||||
= link_to('Historique des dossiers supprimés', deleted_dossiers_path(), class: 'fr-link')
|
||||
|
||||
.fr-grid-row.fr-grid-row--gutters
|
||||
- if current_user.dossiers.count > 2 || current_user.dossiers_invites.count > 2
|
||||
|
|
Loading…
Reference in a new issue