Sha256: 9c0bfa2bf544d93a9ed2ad54603980c34cddc78185b4bd05de176f93644c73d3
Contents?: true
Size: 717 Bytes
Versions: 89
Compression:
Stored size: 717 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 do locales.each do |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 locale.to_s end end end end end end
Version data entries
89 entries across 89 versions & 1 rubygems