Merge pull request #1406 from betagouv/fix-1403

[Fix #1403] Apply dossier index style to recherche
This commit is contained in:
gregoirenovel 2018-02-13 11:13:04 +01:00 committed by GitHub
commit 1f7a853af4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 18 deletions

View file

@ -94,6 +94,7 @@
- @dossiers.each do |dossier|
%tr
%td.folder-col
= link_to(dossier_path(@procedure, dossier), class: 'cell-link') do
%span.icon.folder
- if current_gestionnaire.notifications_for_procedure(@procedure).include?(dossier.id)
%span.notifications{ 'aria-label': 'notifications' }

View file

@ -9,18 +9,21 @@
%table.table.dossiers-table.hoverable
%thead
%tr
%th Nº
%th.notification-col
%th.number-col Nº dossier
%th Procédure
%th Demandeur
%th Statut
%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
%span.icon.folder>
= 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')