- Fix bug prévisualisation header

- Fix bug header section visualization
This commit is contained in:
Xavier J 2016-12-22 10:36:18 +01:00
parent b952b0239c
commit 727c263f72
2 changed files with 7 additions and 0 deletions

View file

@ -9,5 +9,10 @@ class Admin::PrevisualisationsController < AdminController
@dossier.build_default_champs
@champs = @dossier.ordered_champs
@headers = @champs.inject([]) do |acc, champ|
acc.push(champ) if champ.type_champ == 'header_section'
acc
end
end
end

View file

@ -1,5 +1,7 @@
- render_partial_url = private ? 'users/description/champs/header_private_section' : 'users/description/champs/header_section'
- unless @headers.blank?
- if @champs.first.type_champ != 'header_section'
=render partial: render_partial_url, locals: {libelle: 'Dossier', order_place: -1, champs: @champs}
- @headers.each do |header|
.row
%div{class: "type_champ-#{header.type_champ}"}