2023-03-22 16:43:13 +00:00
|
|
|
%fieldset
|
|
|
|
%legend= post_label_t(attribute, post: post)
|
2020-05-23 16:52:58 +00:00
|
|
|
|
2023-03-22 16:43:13 +00:00
|
|
|
= render 'posts/attribute_feedback',
|
|
|
|
post: post, attribute: attribute, metadata: metadata
|
2020-05-23 16:52:58 +00:00
|
|
|
|
2023-03-22 16:43:13 +00:00
|
|
|
- site.locales.each do |locale|
|
|
|
|
- next if post.lang.value == locale
|
2023-03-22 17:14:55 +00:00
|
|
|
- locale_t = t("locales.#{locale}.name", default: locale.to_s.humanize)
|
2023-03-22 16:55:51 +00:00
|
|
|
- value = metadata.value.find do |v|
|
|
|
|
- metadata.values[locale].values.include? v
|
2020-05-23 16:52:58 +00:00
|
|
|
|
2023-03-22 16:43:13 +00:00
|
|
|
.form-group
|
|
|
|
= label_tag "#{base}_#{attribute}_#{locale}", locale_t
|
2020-05-23 16:52:58 +00:00
|
|
|
|
2023-03-22 16:43:13 +00:00
|
|
|
= select_tag("#{plain_field_name_for(base, attribute)}[]",
|
2023-03-22 16:55:51 +00:00
|
|
|
options_for_select(metadata.values[locale], value),
|
2023-03-22 16:43:13 +00:00
|
|
|
**field_options(attribute, metadata), include_blank: t('.empty'))
|