Merge pull request #2599 from betagouv/improve-demarches
Affichage du service dans la liste des démarches
This commit is contained in:
commit
8aab263a1e
3 changed files with 15 additions and 2 deletions
|
@ -30,3 +30,7 @@
|
|||
background-color: $lighter-blue;
|
||||
}
|
||||
}
|
||||
|
||||
.service-name {
|
||||
color: $grey;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ module NewUser
|
|||
.select { |p| p.publiee? }
|
||||
|
||||
@popular_demarches = Procedure
|
||||
.includes(:service)
|
||||
.select("procedures.*, COUNT(*) AS procedures_count")
|
||||
.joins(:dossiers)
|
||||
.publiees
|
||||
|
|
|
@ -12,14 +12,22 @@
|
|||
%ul.demarche-links
|
||||
- @previous_demarches_still_active.each do |demarche|
|
||||
%li
|
||||
= link_to(demarche.libelle, commencer_url(procedure_path: demarche.path), class: "demarche-link")
|
||||
= link_to(commencer_url(procedure_path: demarche.path), class: "demarche-link") do
|
||||
= demarche.libelle
|
||||
%br
|
||||
.service-name
|
||||
= demarche&.service&.nom
|
||||
|
||||
- if @popular_demarches.present?
|
||||
%h2.list-header LES PLUS POPULAIRES
|
||||
%ul.demarche-links
|
||||
- @popular_demarches.each do |demarche|
|
||||
%li
|
||||
= link_to(demarche.libelle, commencer_url(procedure_path: demarche.path), class: "demarche-link")
|
||||
= link_to(commencer_url(procedure_path: demarche.path), class: "demarche-link") do
|
||||
= demarche.libelle
|
||||
%br
|
||||
.service-name
|
||||
= demarche&.service&.nom
|
||||
|
||||
%h2.list-header TOUTES LES DÉMARCHES
|
||||
= link_to("Voir l'intégralité des démarches disponibles", LISTE_DES_DEMARCHES_URL, class: "button")
|
||||
|
|
Loading…
Reference in a new issue