Removes the choose_layout and set_layout methods in ApplicationController.
All pages default to new UI, including error/exception pages.
---
src/app/controllers/application_controller.rb | 24 ++----------------------
src/config/routes.rb | 2 --
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/src/app/controllers/application_controller.rb
b/src/app/controllers/application_controller.rb
index b77fe9c..cad0015 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base
filter_parameter_logging :password, :password_confirmation
helper_method :current_user_session, :current_user
- layout :choose_layout
+ layout 'newui'
# General error handlers, must be in order from least specific
# to most specific
@@ -36,26 +36,6 @@ class ApplicationController < ActionController::Base
rescue_from ActionError, :with => :handle_action_error
rescue_from PartialSuccessError, :with => :handle_partial_success_error
- def choose_layout
- return nil if params[:ajax]
- if params[:component_layout]
- return (ENV["RAILS_ENV"] != "production")?'components/'
<< params[:component_layout]:'aggregator'
- end
- if cookies[:layout]
- @layout = cookies[:layout]
- else
- @layout = 'aggregator'
- end
- return @layout
- end
-
- def set_layout
- if not params[:layout].blank?
- cookies[:layout] = params[:layout]
- end
- render :text => "Current layout is: '#{cookies[:layout]}'"
- end
-
def section_id
'generic'
end
@@ -120,7 +100,7 @@ class ApplicationController < ActionController::Base
render :template => 'layouts/popup-error', :layout =>
'popup',
:locals => {:title => title, :errmsg => msg}
else
- render :template => 'layouts/error', :layout =>
'aggregator',
+ render :template => 'layouts/error', :layout => 'newui',
:locals => {:title => title, :errmsg => msg}
end
end
diff --git a/src/config/routes.rb b/src/config/routes.rb
index ad9fb67..0f8ca80 100644
--- a/src/config/routes.rb
+++ b/src/config/routes.rb
@@ -45,8 +45,6 @@ ActionController::Routing::Routes.draw do |map|
r.resources :builds
end
- map.connect '/set_layout', :controller => 'application', :action
=> 'set_layout'
-
map.namespace 'admin' do |r|
r.resources :hardware_profiles, :realms
r.resources :providers, :collection => { :multi_destroy => :delete }
--
1.7.3.4