Sha256: 8444216b213e034b4d66a2d814f38c469c3fb0e5dc0ba47354f8b9ca7aaab39f
Contents?: true
Size: 879 Bytes
Versions: 72
Compression:
Stored size: 879 Bytes
Contents
class Lalala::Views::TitleBar < ActiveAdmin::Views::TitleBar def build_titlebar_right div :id => "titlebar_right" do build_locale_dropdown build_action_items end end def build_locale_dropdown return unless I18n.available_locales.size > 1 locales = I18n.available_locales.dup locales.sort! div :class => "locale_chooser" do select(class: "bypass-chosen") do locales.each do |locale| next if Rails.application.config.lalala.i18n.excluded_locales.try(:include?, locale) opts = { :value => locale.to_s } opts[:'data-default'] = "true" if I18n.default_locale == locale opts[:'data-current'] = "true" if I18n.locale == locale option opts do text_node Lalala::ExtI18n::NameForLocale.name_for_locale(locale) end end end end end end
Version data entries
72 entries across 72 versions & 1 rubygems