5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 00:46:21 +00:00
panel/app/views/posts/attributes/_locales.haml

20 lines
650 B
Text
Raw Normal View History

%fieldset
%legend= post_label_t(attribute, post: post)
2020-05-23 16:52:58 +00:00
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata
2020-05-23 16:52:58 +00:00
- site.locales.each do |locale|
- next if post.lang.value == locale
- locale_t = t("locales.#{locale}.name")
2020-05-23 16:52:58 +00:00
.form-group
= label_tag "#{base}_#{attribute}_#{locale}", locale_t
2020-05-23 16:52:58 +00:00
= select_tag("#{plain_field_name_for(base, attribute)}[]",
options_for_select(metadata.values[locale]),
**field_options(attribute, metadata), include_blank: t('.empty'))
2020-05-23 16:52:58 +00:00
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata