opciones de select2 para categories y tags

This commit is contained in:
f 2018-06-21 14:35:41 -03:00
parent baf995ab82
commit e1961c5cad
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -44,12 +44,18 @@
= label_tag 'post_categories', t('posts.categories')
= select_tag 'post[categories][]',
options_for_select(@site.categories(lang: @lang), @post.categories),
{ class: 'form-control select2', multiple: 'multiple' }
{ class: 'form-control select2', multiple: 'multiple',
data: { tags: true,
placeholder: t('posts.select.placeholder'),
'allow-clear': true } }
.form-group
= label_tag 'post_tags', t('posts.tags')
= select_tag 'post[tags][]',
options_for_select(@site.tags(lang: @lang), @post.tags),
{ class: 'form-control select2', multiple: 'multiple' }
{ class: 'form-control select2', multiple: 'multiple',
data: { tags: true,
placeholder: t('posts.select.placeholder'),
'allow-clear': true } }
.form-group
= label_tag 'post_slug', t('posts.slug')
= text_field 'post', 'slug', value: @post.slug,