From f696560a14dd4abe8ba81ed0c25d0fd6028895c9 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 18 Sep 2018 10:39:47 +0200 Subject: [PATCH] =?UTF-8?q?Affichage=20du=20service=20dans=20la=20liste=20?= =?UTF-8?q?des=20d=C3=A9marches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stylesheets/new_design/demarches_index.scss | 4 ++++ app/controllers/new_user/demarches_controller.rb | 1 + app/views/new_user/demarches/index.html.haml | 12 ++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/new_design/demarches_index.scss b/app/assets/stylesheets/new_design/demarches_index.scss index e14441051..808095ee2 100644 --- a/app/assets/stylesheets/new_design/demarches_index.scss +++ b/app/assets/stylesheets/new_design/demarches_index.scss @@ -30,3 +30,7 @@ background-color: $lighter-blue; } } + +.service-name { + color: $grey; +} diff --git a/app/controllers/new_user/demarches_controller.rb b/app/controllers/new_user/demarches_controller.rb index 56c984dd6..9d788ad39 100644 --- a/app/controllers/new_user/demarches_controller.rb +++ b/app/controllers/new_user/demarches_controller.rb @@ -9,6 +9,7 @@ module NewUser .select { |p| p.publiee? } @popular_demarches = Procedure + .includes(:service) .select("procedures.*, COUNT(*) AS procedures_count") .joins(:dossiers) .publiees diff --git a/app/views/new_user/demarches/index.html.haml b/app/views/new_user/demarches/index.html.haml index c7ccaef2c..334471b7b 100644 --- a/app/views/new_user/demarches/index.html.haml +++ b/app/views/new_user/demarches/index.html.haml @@ -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")