diff --git a/app/controllers/recherche_controller.rb b/app/controllers/recherche_controller.rb index f2d96ffb6..00626af60 100644 --- a/app/controllers/recherche_controller.rb +++ b/app/controllers/recherche_controller.rb @@ -4,7 +4,8 @@ class RechercheController < ApplicationController PROJECTIONS = [ { "table" => 'procedure', "column" => 'libelle' }, { "table" => 'user', "column" => 'email' }, - { "table" => 'procedure', "column" => 'procedure_id' } + { "table" => 'procedure', "column" => 'procedure_id' }, + { "table" => 'dossier', "column" => 'hidden_by_administration_at' } ] def index diff --git a/app/views/instructeurs/dossiers/_header_actions.html.haml b/app/views/instructeurs/dossiers/_header_actions.html.haml index a680b9f8d..9bfb488fa 100644 --- a/app/views/instructeurs/dossiers/_header_actions.html.haml +++ b/app/views/instructeurs/dossiers/_header_actions.html.haml @@ -29,7 +29,7 @@ archived: dossier.archived, dossier_is_followed: current_instructeur&.follow?(dossier), close_to_expiration: dossier.close_to_expiration?, - supprimes_recemment: dossier.hidden_by_administration? } + recently_deleted: dossier.hidden_by_administration? } .state-button diff --git a/app/views/instructeurs/procedures/_dossier_actions.html.haml b/app/views/instructeurs/procedures/_dossier_actions.html.haml index ad122588b..49a142173 100644 --- a/app/views/instructeurs/procedures/_dossier_actions.html.haml +++ b/app/views/instructeurs/procedures/_dossier_actions.html.haml @@ -21,7 +21,7 @@ %span.icon.archive .dropdown-description Archiver le dossier - - if supprimes_recemment + - if recently_deleted %li.danger = link_to restore_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, data: { confirm: "Voulez vous vraiment restaurer le dossier #{dossier_id}" } do %span.icon.reply diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index dfeb65b78..edfda99b3 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -139,7 +139,7 @@ archived: p.archived, dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id), close_to_expiration: @statut == 'expirant', - supprimes_recemment: @statut == 'supprimes_recemment' } + recently_deleted: @statut == 'supprimes_recemment' } = pagination - else diff --git a/app/views/recherche/index.html.haml b/app/views/recherche/index.html.haml index 90ebb65cc..d84be0712 100644 --- a/app/views/recherche/index.html.haml +++ b/app/views/recherche/index.html.haml @@ -20,7 +20,7 @@ %th.action-col.follow-col %tbody - @projected_dossiers.each do |p| - - procedure_libelle, user_email, procedure_id = p.columns + - procedure_libelle, user_email, procedure_id, hidden_by_administration = p.columns - instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id) - expert_dossier = @dossier_avis_ids_h[p.dossier_id].present? - instructeur_and_expert_dossier = instructeur_dossier && expert_dossier @@ -82,7 +82,8 @@ state: p.state, archived: p.archived, dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id), - close_to_expiration: nil } + close_to_expiration: nil, + recently_deleted: hidden_by_administration.blank? } - else %td