5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 07:01:42 +00:00

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,