2017-11-21 18:21:59 +01:00
|
|
|
|
- content_for(:title, "Recherche : #{@search_terms}")
|
|
|
|
|
|
2017-07-31 11:58:52 +02:00
|
|
|
|
.container
|
2017-12-12 16:15:32 +01:00
|
|
|
|
.page-title
|
2017-07-31 11:58:52 +02:00
|
|
|
|
Résultat de la recherche :
|
2019-10-23 19:19:17 +02:00
|
|
|
|
= t('pluralize.dossier_trouve', count: @dossiers.count)
|
2017-07-31 11:58:52 +02:00
|
|
|
|
|
|
|
|
|
- if @dossiers.present?
|
|
|
|
|
%table.table.dossiers-table.hoverable
|
|
|
|
|
%thead
|
|
|
|
|
%tr
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%th.notification-col
|
|
|
|
|
%th.number-col Nº dossier
|
2018-09-05 14:48:42 +02:00
|
|
|
|
%th Démarche
|
2017-07-31 11:58:52 +02:00
|
|
|
|
%th Demandeur
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%th.status-col Statut
|
2019-01-16 15:34:38 +01:00
|
|
|
|
%th.action-col.follow-col
|
2017-07-31 11:58:52 +02:00
|
|
|
|
%tbody
|
2018-02-07 20:40:15 +01:00
|
|
|
|
- @dossiers.each do |dossier|
|
|
|
|
|
/ # FIXME: here we have a n+1, we fire a request
|
|
|
|
|
/ (due to dossier_linked_path) per result
|
|
|
|
|
%tr
|
|
|
|
|
%td.folder-col
|
2019-08-06 11:02:54 +02:00
|
|
|
|
= link_to(dossier_linked_path(current_instructeur, dossier), class: 'cell-link') do
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%span.icon.folder
|
|
|
|
|
%td.number-col
|
2019-08-06 11:02:54 +02:00
|
|
|
|
= link_to(dossier_linked_path(current_instructeur, dossier), class: 'cell-link') do
|
2018-02-07 20:40:15 +01:00
|
|
|
|
= dossier.id
|
2019-08-06 11:02:54 +02:00
|
|
|
|
%td= link_to(dossier.procedure.libelle, dossier_linked_path(current_instructeur, dossier), class: 'cell-link')
|
|
|
|
|
%td= link_to(dossier.user.email, dossier_linked_path(current_instructeur, dossier), class: 'cell-link')
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%td.status-col
|
2019-08-06 11:02:54 +02:00
|
|
|
|
= link_to(dossier_linked_path(current_instructeur, dossier), class: 'cell-link') do
|
2020-03-24 15:55:03 +01:00
|
|
|
|
= status_badge(dossier.state)
|
2021-04-26 10:35:22 +02:00
|
|
|
|
%td.action-col.follow-col= render partial: "instructeurs/procedures/dossier_actions",
|
|
|
|
|
locals: { procedure_id: dossier.procedure.id,
|
|
|
|
|
dossier_id: dossier.id,
|
|
|
|
|
state: dossier.state,
|
|
|
|
|
archived: dossier.archived,
|
|
|
|
|
dossier_is_followed: @followed_dossiers_id.include?(dossier.id) }
|
|
|
|
|
|
2017-07-31 11:58:52 +02:00
|
|
|
|
- else
|
|
|
|
|
%h2 Aucun dossier correspondant à votre recherche n'a été trouvé
|