2021-04-29 09:33:23 +02:00
|
|
|
|
- content_for(:title, "Recherche : #{@search_terms}")
|
|
|
|
|
|
|
|
|
|
.container
|
2022-11-03 17:39:12 +01:00
|
|
|
|
|
2022-11-07 17:00:31 +01:00
|
|
|
|
- if @dossier_not_in_instructor_group.present?
|
2022-11-03 17:39:12 +01:00
|
|
|
|
.fr-alert.fr-alert--info.fr-alert--sm.fr-mt-3w
|
2022-11-07 17:00:31 +01:00
|
|
|
|
= p t('views.instructeurs.search.dossier_not_in_instructor_group', dossier_id: @dossier_not_in_instructor_group.id, procedure_libelle: @dossier_not_in_instructor_group.procedure.libelle, groupe_instructeur_label: @dossier_not_in_instructor_group.groupe_instructeur.label)
|
2022-11-03 17:39:12 +01:00
|
|
|
|
|
2021-04-29 09:33:23 +02:00
|
|
|
|
.page-title
|
|
|
|
|
Résultat de la recherche :
|
|
|
|
|
= t('pluralize.dossier_trouve', count: @dossiers_count)
|
|
|
|
|
|
|
|
|
|
- if @projected_dossiers.present?
|
2022-05-16 15:26:54 +02:00
|
|
|
|
= paginate @paginated_ids
|
2021-04-29 09:33:23 +02:00
|
|
|
|
%table.table.dossiers-table.hoverable
|
|
|
|
|
%thead
|
|
|
|
|
%tr
|
|
|
|
|
%th.notification-col
|
|
|
|
|
%th.number-col Nº dossier
|
|
|
|
|
%th Démarche
|
|
|
|
|
%th Demandeur
|
|
|
|
|
%th.status-col Statut
|
|
|
|
|
%th.action-col.follow-col
|
|
|
|
|
%tbody
|
|
|
|
|
- @projected_dossiers.each do |p|
|
2022-02-02 19:34:00 +01:00
|
|
|
|
- procedure_libelle, user_email, procedure_id = p.columns
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- instructeur_dossier = @instructeur_dossiers_ids.include?(p.dossier_id)
|
|
|
|
|
- expert_dossier = @dossier_avis_ids_h[p.dossier_id].present?
|
2022-02-02 19:34:00 +01:00
|
|
|
|
- hidden_by_administration = p.hidden_by_administration_at.present?
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- instructeur_and_expert_dossier = instructeur_dossier && expert_dossier
|
|
|
|
|
- path = instructeur_dossier ? instructeur_dossier_path(procedure_id, p.dossier_id) : expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id])
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
2022-02-02 19:34:00 +01:00
|
|
|
|
%tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] }
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- if instructeur_and_expert_dossier
|
2022-12-05 10:38:34 +01:00
|
|
|
|
%td.text-center.cell-link
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%span.icon.folder
|
|
|
|
|
%td.number-col
|
|
|
|
|
.cell-link= p.dossier_id
|
|
|
|
|
%td
|
|
|
|
|
.cell-link= procedure_libelle
|
|
|
|
|
%td
|
|
|
|
|
.cell-link= user_email
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%td.status-col
|
2021-05-17 15:42:21 +02:00
|
|
|
|
.cell-link= status_badge(p.state)
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
2022-02-02 19:34:00 +01:00
|
|
|
|
- elsif hidden_by_administration
|
|
|
|
|
= render partial: "recherche/hidden_dossier", locals: {p: p, procedure_libelle: procedure_libelle, user_email: user_email}
|
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- else
|
2022-02-02 19:34:00 +01:00
|
|
|
|
|
2022-12-05 10:38:34 +01:00
|
|
|
|
%td.text-center
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%a.cell-link{ href: path }
|
2021-04-29 09:33:23 +02:00
|
|
|
|
%span.icon.folder
|
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%td.number-col
|
|
|
|
|
%a.cell-link{ href: path }= p.dossier_id
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%td
|
|
|
|
|
%a.cell-link{ href: path }= procedure_libelle
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%td
|
|
|
|
|
%a.cell-link{ href: path }= user_email
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
%td.status-col
|
|
|
|
|
%a.cell-link{ href: path }= status_badge(p.state)
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- if instructeur_dossier && expert_dossier
|
2021-04-29 09:33:23 +02:00
|
|
|
|
%td.action-col.follow-col
|
2023-01-06 15:45:18 +01:00
|
|
|
|
= render Dropdown::MenuComponent.new(wrapper: :div, button_options: {class: ['fr-btn--sm']}) do |menu|
|
|
|
|
|
- menu.with_button_inner_html do
|
2021-04-29 09:33:23 +02:00
|
|
|
|
Actions
|
2023-01-06 15:45:18 +01:00
|
|
|
|
|
|
|
|
|
- menu.with_item do
|
|
|
|
|
= link_to(instructeur_dossier_path(procedure_id, p.dossier_id), role: 'menuitem') do
|
|
|
|
|
%span.icon.in-progress>
|
|
|
|
|
.dropdown-description
|
|
|
|
|
Voir le dossier
|
|
|
|
|
|
|
|
|
|
- menu.with_item do
|
|
|
|
|
= link_to(expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id]), role: 'menuitem') do
|
|
|
|
|
%span.icon.in-progress>
|
|
|
|
|
.dropdown-description
|
|
|
|
|
Donner mon avis
|
2021-05-17 15:42:21 +02:00
|
|
|
|
|
|
|
|
|
- elsif instructeur_dossier
|
2022-02-02 19:34:00 +01:00
|
|
|
|
- if hidden_by_administration
|
|
|
|
|
%td.action-col.follow-col
|
|
|
|
|
= link_to restore_instructeur_dossier_path(procedure_id, p.dossier_id), method: :patch, class: "button primary" do
|
|
|
|
|
= t('views.instructeurs.dossiers.restore')
|
|
|
|
|
|
|
|
|
|
- else
|
|
|
|
|
%td.action-col.follow-col= render partial: "instructeurs/procedures/dossier_actions",
|
2021-05-17 15:42:21 +02:00
|
|
|
|
locals: { procedure_id: procedure_id,
|
|
|
|
|
dossier_id: p.dossier_id,
|
|
|
|
|
state: p.state,
|
|
|
|
|
archived: p.archived,
|
2021-12-03 16:09:51 +01:00
|
|
|
|
dossier_is_followed: @followed_dossiers_id.include?(p.dossier_id),
|
2022-03-11 13:57:53 +01:00
|
|
|
|
close_to_expiration: nil,
|
|
|
|
|
hidden_by_administration: nil }
|
2021-05-17 15:42:21 +02:00
|
|
|
|
|
2021-05-17 15:42:21 +02:00
|
|
|
|
- else
|
|
|
|
|
%td
|
2022-05-16 15:26:54 +02:00
|
|
|
|
= paginate @paginated_ids
|
2021-04-29 09:33:23 +02:00
|
|
|
|
|
|
|
|
|
- else
|
2021-05-26 15:16:30 +02:00
|
|
|
|
%h2 Aucun dossier correspondant à votre recherche n’a été trouvé
|