demarches-normaliennes/app/views/new_gestionnaire/recherche/index.html.haml
2018-03-29 16:23:10 +02:00

34 lines
1.4 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- 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 Procédure
%th Demandeur
%th.status-col Statut
%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', locals: { dossier: dossier }
- else
%h2 Aucun dossier correspondant à votre recherche n'a été trouvé