Adds an admin layout that displays the admin menu in the sidebar.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3176 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-12-17 18:21:02 +00:00
parent 39b44b1cb9
commit dfabadf4f7
24 changed files with 72 additions and 79 deletions
+4 -1
View File
@@ -16,6 +16,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class UsersController < ApplicationController
layout 'admin'
before_filter :require_admin, :except => :show
helper :sort
@@ -62,7 +64,8 @@ class UsersController < ApplicationController
if @user != User.current && !User.current.admin? && @memberships.empty? && events.empty?
render_404 and return
end
render :layout => 'base'
rescue ActiveRecord::RecordNotFound
render_404
end