Files
nairobi/app/helpers/site_customization_helper.rb
Marko Lovic cb716e07d7 Extract translation helper from translatable form views
So that individual form partials don't depend on the implementation
of how translations are deleted.
2018-09-10 17:17:47 +02:00

10 lines
333 B
Ruby

module SiteCustomizationHelper
def site_customization_enable_translation?(locale)
I18nContentTranslation.existing_languages.include?(neutral_locale(locale)) || locale == I18n.locale
end
def site_customization_display_translation?(locale)
site_customization_enable_translation?(locale) ? "" : "display: none"
end
end