poder colocar el titulo en cualquier parte de la plantilla
This commit is contained in:
parent
3cfdc25de7
commit
3fbffd5e7a
2 changed files with 5 additions and 4 deletions
|
@ -23,7 +23,7 @@ class Post
|
||||||
# datos que no tienen que terminar en el front matter
|
# datos que no tienen que terminar en el front matter
|
||||||
REJECT_FROM_FRONT_MATTER = %w[date slug ext].freeze
|
REJECT_FROM_FRONT_MATTER = %w[date slug ext].freeze
|
||||||
# datos que no traemos del template
|
# datos que no traemos del template
|
||||||
REJECT_FROM_TEMPLATE = %w[draft categories layout title ext tags date slug post pre].freeze
|
REJECT_FROM_TEMPLATE = %w[draft categories layout ext tags date slug post pre].freeze
|
||||||
DEFAULT_PARAMS = [:title, :date, :content, :slug, :cover,
|
DEFAULT_PARAMS = [:title, :date, :content, :slug, :cover,
|
||||||
:layout, :permalink, :dir,
|
:layout, :permalink, :dir,
|
||||||
{ lang: {} }, { tags: [] }, { categories: [] }].freeze
|
{ lang: {} }, { tags: [] }, { categories: [] }].freeze
|
||||||
|
|
|
@ -49,9 +49,10 @@
|
||||||
options_for_select([[t('posts.ltr'), 'ltr'], [t('posts.rtl'), 'rtl']], direction),
|
options_for_select([[t('posts.ltr'), 'ltr'], [t('posts.rtl'), 'rtl']], direction),
|
||||||
{ class: 'form-control' }
|
{ class: 'form-control' }
|
||||||
%small.text-muted.form-text= t('posts.dir_help')
|
%small.text-muted.form-text= t('posts.dir_help')
|
||||||
.form-group
|
- if @post.has_field? :title
|
||||||
= label_tag 'post_title', t('posts.title')
|
.form-group
|
||||||
= text_field 'post', 'title', value: @post.title, class: field_class, required: true
|
= label_tag 'post_title', t('posts.title')
|
||||||
|
= text_field 'post', 'title', value: @post.title, class: field_class, required: true
|
||||||
- if @post.content?
|
- if @post.content?
|
||||||
.form-group{class: direction}
|
.form-group{class: direction}
|
||||||
= label_tag 'post_content', t('posts.content')
|
= label_tag 'post_content', t('posts.content')
|
||||||
|
|
Loading…
Reference in a new issue