diff --git a/app/assets/javascripts/devise.js b/app/assets/javascripts/devise.js new file mode 100644 index 000000000..cfe9f50cf --- /dev/null +++ b/app/assets/javascripts/devise.js @@ -0,0 +1,7 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +//= require back_end \ No newline at end of file diff --git a/app/assets/stylesheets/devise.css b/app/assets/stylesheets/devise.css new file mode 100644 index 000000000..7b9210786 --- /dev/null +++ b/app/assets/stylesheets/devise.css @@ -0,0 +1,6 @@ +/* + *This is a manifest file that'll automatically include all the stylesheets available in this directory + *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + *the top of the compiled file, but it's generally better to create a new file per style scope. + *= require back_end +*/ \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index afdf89757..db7d88a31 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,7 +13,7 @@ class ApplicationController < ActionController::Base layout :layout_by_resource helper :admin, :orbit_form - before_filter :set_locale, :set_site, :prepare_for_mobile + before_filter :set_site, :set_locale, :prepare_for_mobile helper_attr :site_valid_locales @@ -135,10 +135,10 @@ class ApplicationController < ActionController::Base if LIST[:forbidden_item_names].include?(env['PATH_INFO'].split('/')[1].to_s) condition = VALID_LOCALES.include?(session[:locale]) elsif session[:locale] - condition = @site_in_use_locales.include?(session[:locale]) + condition = @site.in_use_locales.include?(session[:locale]) else browser_locale = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first rescue nil - condition = @site_in_use_locales.include?(browser_locale) + condition = @site.in_use_locales.include?(browser_locale) end session[:locale] = condition ? (browser_locale || session[:locale]) : I18n.default_locale.to_s I18n.locale = session[:locale].to_sym diff --git a/app/views/layouts/_right_menu.html.erb b/app/views/layouts/_right_menu.html.erb index baa12e500..dc0167fc7 100644 --- a/app/views/layouts/_right_menu.html.erb +++ b/app/views/layouts/_right_menu.html.erb @@ -57,13 +57,13 @@ - + <%= f.text_field :email, class: "input-xlarge" , placeholder: t(:email) %>