5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 06:51:42 +00:00
panel/app/views/posts/attributes/_array.haml

20 lines
710 B
Text
Raw Normal View History

2019-08-23 18:29:07 +00:00
.form-group
= label_tag "post_#{attribute}", post_label_t(attribute, post: post)
2019-08-16 23:25:07 +00:00
.taggable{ data: { values: metadata.value.join(','),
name: "post[#{attribute}][]", list: id_for_datalist(attribute),
remove: 'false', legend: post_label_t(attribute, post: post),
2020-05-23 16:52:58 +00:00
button: t('posts.attributes.add'),
2019-08-16 23:25:07 +00:00
described: id_for_help(attribute) } }
= text_field(*field_name_for('post', attribute, '[]'),
value: metadata.value.join(', '),
**field_options(attribute, metadata))
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata
2019-08-16 23:25:07 +00:00
%datalist{ id: id_for_datalist(attribute) }
2020-05-23 15:38:03 +00:00
- metadata.values.each do |value|
2019-08-16 23:25:07 +00:00
%option{ value: value }