Sha256: 79b1746a0e0f8dffc9a142272f6d761a175d519cbb92105b8a47365ca68b880d

Contents?: true

Size: 468 Bytes

Versions: 21

Compression:

Stored size: 468 Bytes

Contents

module Locomotive
  module SitesHelper

    def ordered_current_site_locales
      current_site.locales + (Locomotive.config.site_locales - current_site.locales)
    end

    def options_for_site_locales
      Locomotive.config.site_locales.map do |locale|
        [I18n.t("locomotive.locales.#{locale}"), locale]
      end
    end
    
    def options_for_site_timezones
      ActiveSupport::TimeZone.all.map do |tz|
        [tz, tz.name]
      end
    end

  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
locomotive_cms-2.5.7 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.6 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.6.rc2 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.6.rc1 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.5 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.4 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.3 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.2 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.1 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.0 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.0.rc3 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.0.rc2 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.5.0.rc1 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.4.1 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.4.0 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.3.1 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.3.0 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.2.3 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.2.2 app/helpers/locomotive/sites_helper.rb
locomotive_cms-2.2.1 app/helpers/locomotive/sites_helper.rb