- Fix bug prévisualisation header
- Fix bug header section visualization
This commit is contained in:
parent
b952b0239c
commit
727c263f72
2 changed files with 7 additions and 0 deletions
|
@ -9,5 +9,10 @@ class Admin::PrevisualisationsController < AdminController
|
||||||
@dossier.build_default_champs
|
@dossier.build_default_champs
|
||||||
|
|
||||||
@champs = @dossier.ordered_champs
|
@champs = @dossier.ordered_champs
|
||||||
|
|
||||||
|
@headers = @champs.inject([]) do |acc, champ|
|
||||||
|
acc.push(champ) if champ.type_champ == 'header_section'
|
||||||
|
acc
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,7 @@
|
||||||
- render_partial_url = private ? 'users/description/champs/header_private_section' : 'users/description/champs/header_section'
|
- render_partial_url = private ? 'users/description/champs/header_private_section' : 'users/description/champs/header_section'
|
||||||
- unless @headers.blank?
|
- 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|
|
- @headers.each do |header|
|
||||||
.row
|
.row
|
||||||
%div{class: "type_champ-#{header.type_champ}"}
|
%div{class: "type_champ-#{header.type_champ}"}
|
||||||
|
|
Loading…
Add table
Reference in a new issue