diff --git a/app/views/new_gestionnaire/recherche/index.html.haml b/app/views/new_gestionnaire/recherche/index.html.haml index 614258db0..87a54eb34 100644 --- a/app/views/new_gestionnaire/recherche/index.html.haml +++ b/app/views/new_gestionnaire/recherche/index.html.haml @@ -15,15 +15,17 @@ %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 %tr %td.number-col - = link_to(dossier_path(dossier.procedure, dossier), class: 'cell-link') do + = link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do %span.icon.folder> = dossier.id - %td= link_to(dossier.procedure.libelle, dossier_path(dossier.procedure, dossier), class: 'cell-link') - %td= link_to(dossier.user.email, dossier_path(dossier.procedure, dossier), class: 'cell-link') + %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_path(dossier.procedure, dossier), class: 'cell-link') do + = link_to(dossier_linked_path(current_gestionnaire, dossier), class: 'cell-link') do = render partial: 'new_gestionnaire/procedures/status', locals: { dossier: dossier } - else %h2 Aucun dossier correspondant à votre recherche n'a été trouvé