56 lines
2.3 KiB
Text
56 lines
2.3 KiB
Text
- avis_statut = (@statut == Experts::AvisController::A_DONNER_STATUS) ? 'à donner' : 'rendus'
|
||
- content_for(:title, "Avis #{avis_statut}")
|
||
|
||
#procedure-show
|
||
.sub-header
|
||
.fr-container.flex
|
||
|
||
.procedure-logo{ style: "background-image: url(#{@procedure.logo_url})",
|
||
role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" }
|
||
|
||
.procedure-header
|
||
%h1.fr-h3= procedure_libelle @procedure
|
||
= link_to t('.management', procedure_id: @procedure.id), notification_settings_expert_procedure_path(@procedure), class: 'header-link'
|
||
|
||
|
||
|
||
%nav.fr-tabs
|
||
%ul.fr-tabs__list{ role: 'tablist' }
|
||
= tab_item('avis à donner',
|
||
procedure_expert_avis_index_path(statut: Instructeurs::AvisController::A_DONNER_STATUS),
|
||
active: @statut == Instructeurs::AvisController::A_DONNER_STATUS,
|
||
badge: @avis_a_donner.count,
|
||
notification: @avis_a_donner.any?)
|
||
|
||
= tab_item("avis #{'donné'.pluralize(@avis_donnes.count)}",
|
||
procedure_expert_avis_index_path(statut: Instructeurs::AvisController::DONNES_STATUS),
|
||
active: @statut == Instructeurs::AvisController::DONNES_STATUS,
|
||
badge: @avis_donnes.count)
|
||
|
||
.fr-container
|
||
- if @avis.present?
|
||
.fr-table.fr-table--no-scroll.fr-table--bordered
|
||
.fr-table__wrapper
|
||
.fr-table__container
|
||
.fr-table__content
|
||
%table.dossiers-table
|
||
%thead
|
||
%tr
|
||
%th Nº dossier
|
||
%th Demandeur
|
||
%th Démarche
|
||
%tbody
|
||
- @avis.each do |avis|
|
||
%tr
|
||
%td.fr-cell--numeric
|
||
= link_to(expert_avis_path(avis.procedure, avis), class: "fr-link") do
|
||
= avis.dossier.id
|
||
%td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis))
|
||
%td.fr-cell--multiline= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis))
|
||
.fr-table__footer
|
||
.fr-table__footer--start
|
||
.fr-table__footer--middle
|
||
= paginate @avis, views_prefix: 'shared'
|
||
.fr-table__footer--end.flex-no-grow
|
||
- else
|
||
%h2.empty-text Aucun avis
|