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 :
|
|
|
|
|
= pluralize(@dossiers.count, "dossier trouvé", "dossiers trouvés")
|
|
|
|
|
|
|
|
|
|
- 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
|
2017-07-31 11:58:52 +02:00
|
|
|
|
%th Procédure
|
|
|
|
|
%th Demandeur
|
2018-02-07 20:40:15 +01:00
|
|
|
|
%th.status-col Statut
|
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
|
|
|
|
|
= link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do
|
|
|
|
|
%span.icon.folder
|
|
|
|
|
%td.number-col
|
|
|
|
|
= link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do
|
|
|
|
|
= dossier.id
|
|
|
|
|
%td= link_to(dossier.procedure.libelle, dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link')
|
|
|
|
|
%td= link_to(dossier.user.email, dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link')
|
|
|
|
|
%td.status-col
|
|
|
|
|
= link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do
|
2018-03-29 10:33:57 +02:00
|
|
|
|
= render partial: 'shared/dossiers/status', locals: { dossier: dossier }
|
2017-07-31 11:58:52 +02:00
|
|
|
|
- else
|
|
|
|
|
%h2 Aucun dossier correspondant à votre recherche n'a été trouvé
|