From f6c0edc5a3c16f97c2f154c525c675a385b11ffa Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 18 Jan 2018 09:54:18 +0100 Subject: [PATCH] [Fix #1292] Link to avis, not dossier for expert search results --- app/views/new_gestionnaire/recherche/index.html.haml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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é