From 9eb6ed3a7c97cb9289411488083c7587827e69bc Mon Sep 17 00:00:00 2001 From: Xavier J Date: Thu, 22 Dec 2016 11:50:03 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Add=20champs=20private=20in=20proc=C3=A9dur?= =?UTF-8?q?e=20information=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/procedures/show.html.haml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/admin/procedures/show.html.haml b/app/views/admin/procedures/show.html.haml index dabd39cac..b6c34d2e7 100644 --- a/app/views/admin/procedures/show.html.haml +++ b/app/views/admin/procedures/show.html.haml @@ -59,12 +59,12 @@ %h3 Détails .row{style:'margin-right:3%; margin-left:3%;'} - .description.col-md-4.col-lg-4 + .description.col-md-3.col-lg-3 %h4.text-info = @facade.procedure.libelle = h @facade.procedure.description.html_safe - .champs.col-md-4.col-lg-4 + .champs.col-md-3.col-lg-3 %h4.text-info Champs .badge.progress-bar-info @@ -73,7 +73,16 @@ = champ.libelle %br - .pieces_justificatives.col-md-4.col-lg-4 + .champs_private.col-md-3.col-lg-3 + %h4.text-info + Champs privés + .badge.progress-bar-info + = @facade.procedure.types_de_champ_private.size + - @facade.procedure.types_de_champ_private.order(:order_place).each do |champ| + = champ.libelle + %br + + .pieces_justificatives.col-md-3.col-lg-3 %h4.text-info Pièces justificatives .badge.progress-bar-info From 02fd5a29396db507d2ebe572daad432eca3c32db Mon Sep 17 00:00:00 2001 From: Xavier J Date: Thu, 22 Dec 2016 11:55:24 +0100 Subject: [PATCH 2/2] Fix tests --- app/controllers/backoffice/dossiers_controller.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/backoffice/dossiers_controller.rb b/app/controllers/backoffice/dossiers_controller.rb index 78644ccdb..3537d6c5e 100644 --- a/app/controllers/backoffice/dossiers_controller.rb +++ b/app/controllers/backoffice/dossiers_controller.rb @@ -19,11 +19,13 @@ class Backoffice::DossiersController < Backoffice::DossiersListController def show create_dossier_facade params[:id] - @champs_private = @facade.champs_private unless @facade.nil? + unless @facade.nil? + @champs_private = @facade.champs_private - @headers_private = @champs_private.inject([]) do |acc, champ| - acc.push(champ) if champ.type_champ == 'header_section' - acc + @headers_private = @champs_private.inject([]) do |acc, champ| + acc.push(champ) if champ.type_champ == 'header_section' + acc + end end end