36 lines
1.7 KiB
Text
36 lines
1.7 KiB
Text
- content_for(:title, "Recherche : #{@search_terms}")
|
||
|
||
.container
|
||
.page-title
|
||
Résultat de la recherche :
|
||
= pluralize(@dossiers.count, "dossier trouvé", "dossiers trouvés")
|
||
|
||
- if @dossiers.present?
|
||
%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.follow-col
|
||
%tbody
|
||
- @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
|
||
= render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier }
|
||
%td.follow-col= render partial: 'new_gestionnaire/procedures/dossier_actions', locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) }
|
||
- else
|
||
%h2 Aucun dossier correspondant à votre recherche n'a été trouvé
|