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;
|
background-color: $lighter-blue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.service-name {
|
||||||
|
color: $grey;
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ module NewUser
|
||||||
.select { |p| p.publiee? }
|
.select { |p| p.publiee? }
|
||||||
|
|
||||||
@popular_demarches = Procedure
|
@popular_demarches = Procedure
|
||||||
|
.includes(:service)
|
||||||
.select("procedures.*, COUNT(*) AS procedures_count")
|
.select("procedures.*, COUNT(*) AS procedures_count")
|
||||||
.joins(:dossiers)
|
.joins(:dossiers)
|
||||||
.publiees
|
.publiees
|
||||||
|
|
|
@ -12,14 +12,22 @@
|
||||||
%ul.demarche-links
|
%ul.demarche-links
|
||||||
- @previous_demarches_still_active.each do |demarche|
|
- @previous_demarches_still_active.each do |demarche|
|
||||||
%li
|
%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?
|
- if @popular_demarches.present?
|
||||||
%h2.list-header LES PLUS POPULAIRES
|
%h2.list-header LES PLUS POPULAIRES
|
||||||
%ul.demarche-links
|
%ul.demarche-links
|
||||||
- @popular_demarches.each do |demarche|
|
- @popular_demarches.each do |demarche|
|
||||||
%li
|
%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
|
%h2.list-header TOUTES LES DÉMARCHES
|
||||||
= link_to("Voir l'intégralité des démarches disponibles", LISTE_DES_DEMARCHES_URL, class: "button")
|
= link_to("Voir l'intégralité des démarches disponibles", LISTE_DES_DEMARCHES_URL, class: "button")
|
||||||
|
|
Loading…
Reference in a new issue