From 349020182acb0655a353f501c29f1c1d3099c7fa Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 20 Nov 2013 10:44:54 +0800 Subject: [PATCH] . --- app/controllers/users_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 78e329857..865987767 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class UsersController < ApplicationController - layout 'base_users' + layout :setting_layout #Added by young menu_item :activity menu_item :user_information, :only => :info @@ -694,5 +694,9 @@ class UsersController < ApplicationController end rescue ActiveRecord::RecordNotFound render_404 - end + end + + def setting_layout(default_base='base_users') + User.current.admin? ? 'base_admin' : default_base + end end