diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-30 19:06:18 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-30 19:12:15 +0200 |
commit | 26ad250989d82b496b131811f8a0ddd7e662b650 (patch) | |
tree | a61059ff97f7d5bb1db163fa2dcb041065b092f2 /app/controllers/admin/application_controller.rb | |
parent | f2cf6d75ecc6082897543f976e8e4bee7ac24e90 (diff) | |
download | gitlab-ce-26ad250989d82b496b131811f8a0ddd7e662b650.tar.gz |
Add a page title to every page.
Diffstat (limited to 'app/controllers/admin/application_controller.rb')
-rw-r--r-- | app/controllers/admin/application_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index fe5456f820c..cfbeb035c0e 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -2,10 +2,16 @@ # # Automatically sets the layout and ensures an administrator is logged in class Admin::ApplicationController < ApplicationController - layout 'admin' before_action :authenticate_admin! + before_action :set_title def authenticate_admin! return render_404 unless current_user.is_admin? end + + def set_title + @title = "Admin area" + @title_url = admin_root_path + @sidebar = "admin" + end end |