usar los valores de la plantilla o los del post
This commit is contained in:
parent
beaf98bbef
commit
07c937682b
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag "post_#{template}", template.humanize
|
= label_tag "post_#{template}", template.humanize
|
||||||
- name = "post[#{template}]"
|
- name = "post[#{template}]"
|
||||||
- value = @post.get_front_matter(template)
|
- value = @post.new? ? @post.template_values_for(template) : @post.get_front_matter(template)
|
||||||
- case type
|
- case type
|
||||||
- when 'text'
|
- when 'text'
|
||||||
= text_field 'post', template,
|
= text_field 'post', template,
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
= hidden_field 'post', template, value: 'false'
|
= hidden_field 'post', template, value: 'false'
|
||||||
= check_box_tag name, 'true', value == 'true', class: 'form-control'
|
= check_box_tag name, 'true', value == 'true', class: 'form-control'
|
||||||
- when 'select'
|
- when 'select'
|
||||||
= select_tag name, options_for_select(@post.template_values_for(template), value),
|
= select_tag name, options_for_select(@post.template_values_for(template), @post.get_front_matter(template)),
|
||||||
{ class: 'form-control select2',
|
{ class: 'form-control select2',
|
||||||
multiple: @post.template_multiple_values?(template) }
|
multiple: @post.template_multiple_values?(template) }
|
||||||
.form-group
|
.form-group
|
||||||
|
|
Loading…
Reference in a new issue