diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index b7d5a9647..f29c0653b 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -1080,6 +1080,19 @@ form { } } +.translatable-fields { + + &.highlight { + display: inline-block; + padding-top: $line-height; + width: 100%; + } +} + +.translation-locale { + padding-top: $line-height; +} + // 07. Callout // ----------- diff --git a/app/helpers/translatable_form_helper.rb b/app/helpers/translatable_form_helper.rb index 934ab19b0..b4c80757f 100644 --- a/app/helpers/translatable_form_helper.rb +++ b/app/helpers/translatable_form_helper.rb @@ -14,6 +14,10 @@ module TranslatableFormHelper (controller.class.parents & [Admin, Management, Valuation]).any? end + def highlight_translation_html_class + "highlight" if translations_interface_enabled? + end + class TranslatableFormBuilder < FoundationRailsHelper::FormBuilder attr_accessor :translations @@ -66,9 +70,13 @@ module TranslatableFormHelper end end + def highlight_translation_html_class + @template.highlight_translation_html_class + end + def translations_options(resource, locale) { - class: "translatable-fields js-globalize-attribute", + class: "translatable-fields js-globalize-attribute #{highlight_translation_html_class}", style: @template.display_translation_style(resource.globalized_model, locale), data: { locale: locale } }