demarches-normaliennes/app/views/new_gestionnaire/recherche/index.html.haml

32 lines
1.2 KiB
Text
Raw Normal View History

- content_for(:title, "Recherche : #{@search_terms}")
2017-07-31 11:58:52 +02:00
.container
.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
%th Nº
%th Procédure
%th Demandeur
%th Statut
%tbody
- @dossiers.each do |dossier|
/ # FIXME: here we have a n+1, we fire a request
/ (due to dossier_linked_path) per result
2017-07-31 11:58:52 +02:00
%tr
%td.number-col
= link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do
%span.icon.folder>
2017-07-31 11:58:52 +02:00
= 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')
2017-07-31 11:58:52 +02:00
%td.status-col
= link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do
2017-07-31 11:58:52 +02:00
= render partial: 'new_gestionnaire/procedures/status', locals: { dossier: dossier }
- else
%h2 Aucun dossier correspondant à votre recherche n'a été trouvé