5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 22:26:22 +00:00
panel/app/views/posts/attributes/_locales.haml
2024-06-04 12:49:37 -03:00

19 lines
738 B
Text

- if site.locales.count > 1
%fieldset
%legend= post_label_t(attribute, post: post)
= render 'posts/attribute_feedback',
post: post, attribute: attribute, metadata: metadata
- site.locales.each do |locale|
- locale_t = t("locales.#{locale}.name", default: locale.to_s.humanize)
- value = metadata.value.find do |v|
- metadata.values[locale].values.include? v
.form-group
= label_tag "#{base}_#{attribute}_#{locale}", locale_t
= select_tag("#{plain_field_name_for(base, attribute)}[]",
options_for_select(metadata.values[locale], value),
**field_options(attribute, metadata),
include_blank: t('.empty'))