poder colocar el titulo en cualquier parte de la plantilla

This commit is contained in:
f 2019-04-22 16:47:30 -03:00
parent 3cfdc25de7
commit 3fbffd5e7a
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -49,6 +49,7 @@
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')
- if @post.has_field? :title
.form-group .form-group
= label_tag 'post_title', t('posts.title') = label_tag 'post_title', t('posts.title')
= text_field 'post', 'title', value: @post.title, class: field_class, required: true = text_field 'post', 'title', value: @post.title, class: field_class, required: true