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

42 lines
1.6 KiB
Text
Raw Normal View History

2017-11-17 23:40:51 +01:00
- avis_statut = (@statut == NewGestionnaire::AvisController::A_DONNER_STATUS) ? 'à donner' : 'rendus'
- content_for(:title, "Avis #{avis_statut}")
2017-09-06 11:21:29 +02:00
#avis-index
.accompagnateur-header
2017-09-06 11:21:29 +02:00
.container.flex
.width-100
2017-12-12 16:53:19 +01:00
%h1.tab-title Avis
2017-09-06 11:21:29 +02:00
%ul.tabs
%li{ class: (@statut == NewGestionnaire::AvisController::A_DONNER_STATUS) ? 'active' : nil }>
= link_to(avis_index_path(statut: NewGestionnaire::AvisController::A_DONNER_STATUS)) do
avis à donner
%span.badge= @avis_a_donner.count
2017-09-20 15:49:49 +02:00
- if @avis_a_donner.any?
%span.notifications
2017-09-06 11:21:29 +02:00
%li{ class: (@statut == NewGestionnaire::AvisController::DONNES_STATUS) ? 'active' : nil }>
= link_to(avis_index_path(statut: NewGestionnaire::AvisController::DONNES_STATUS)) do
avis #{'donné'.pluralize(@avis_donnes.count)}
%span.badge= @avis_donnes.count
.container
- if @avis.present?
%table.table.dossiers-table.hoverable
%thead
%tr
%th.number-col Nº dossier
%th Demandeur
%th Procédure
%tbody
- @avis.each do |avis|
%tr
%td.number-col
= link_to(avis_path(avis), class: 'cell-link') do
%span.icon.folder
2017-09-06 11:21:29 +02:00
#{avis.dossier.id}
%td= link_to(avis.dossier.user.email, avis_path(avis), class: 'cell-link')
%td= link_to(avis.dossier.procedure.libelle, avis_path(avis), class: 'cell-link')
2017-09-21 17:19:15 +02:00
= paginate(@avis)
2017-09-06 11:21:29 +02:00
- else
%h2.empty-text Aucun avis