style(procedures): dsfr compat instructeurs/expert procedures list

This commit is contained in:
Colin Darie 2022-10-06 18:08:00 +02:00
parent 0480a0336d
commit df1d7ae2bd
4 changed files with 124 additions and 135 deletions

View file

@ -5,39 +5,40 @@
%ul.procedure-list
- @avis_by_procedure.each do |p, procedure_avis|
%li.procedure-item.flex.align-start
= link_to(procedure_instructeur_avis_index_path(p)) do
.flex
%li.procedure-item.flex.align-start.fr-my-3w.fr-p-2w
.flex
= link_to instructeur_procedure_path(p), class: 'procedure-logo-link' do
.procedure-logo{ style: "background-image: url(#{p.logo_url})" }
.procedure-details
%p.procedure-title
= procedure_libelle p
%ul.procedure-stats.flex
%li
%object
= link_to(procedure_instructeur_avis_index_path(p, statut: Instructeurs::AvisController::A_DONNER_STATUS)) do
- without_answer_count = procedure_avis.select { |a| a.answer.nil? }.size
- if without_answer_count > 0
%span.notifications{ 'aria-label': "notifications" }
.stats-number
= without_answer_count
.stats-legend
avis à donner
%li
%object
= link_to(procedure_instructeur_avis_index_path(p, statut: Instructeurs::AvisController::DONNES_STATUS)) do
- with_answer_count = procedure_avis.select { |a| a.answer.present? }.size
.stats-number= with_answer_count
.stats-legend
= pluralize(with_answer_count, "avis donné")
.procedure-details
%p.fr-mb-2w
= procedure_badge(p)
= link_to(p.libelle, procedure_instructeur_avis_index_path(p), class: "fr-link fr-ml-1w")
- if p.close?
.procedure-status
%span.label
= t('helpers.procedure.close')
- elsif p.depubliee?
.procedure-status
%span.label
= t('helpers.procedure.unpublished')
%ul.procedure-stats.flex
%li
%object
= link_to(procedure_instructeur_avis_index_path(p, statut: Instructeurs::AvisController::A_DONNER_STATUS)) do
- without_answer_count = procedure_avis.select { |a| a.answer.nil? }.size
- if without_answer_count > 0
%span.notifications{ 'aria-label': "notifications" }
.stats-number
= without_answer_count
.stats-legend
avis à donner
%li
%object
= link_to(procedure_instructeur_avis_index_path(p, statut: Instructeurs::AvisController::DONNES_STATUS)) do
- with_answer_count = procedure_avis.select { |a| a.answer.present? }.size
.stats-number= with_answer_count
.stats-legend
= pluralize(with_answer_count, "avis donné")
- if p.close?
.procedure-status
%span.label
= t('helpers.procedure.close')
- elsif p.depubliee?
.procedure-status
%span.label
= t('helpers.procedure.unpublished')