summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-05-01 10:39:11 +0200
committerDouwe Maan <douwe@gitlab.com>2015-05-01 10:39:16 +0200
commit92fd3ccee05acdfd5e498734ed287458a8dd21a3 (patch)
treea794a8017636ce7f50a7f4ef4201395894a5451e /app/controllers/groups_controller.rb
parentae09c2a6db0d15caedc080c319add147c79fd02a (diff)
downloadgitlab-ce-92fd3ccee05acdfd5e498734ed287458a8dd21a3.tar.gz
Add helpers for header title and sidebar, and move setting those from controllers to layouts.
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 66e92abff8d..34f0b257db3 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -12,6 +12,8 @@ class GroupsController < Groups::ApplicationController
before_action :load_projects, except: [:new, :create, :projects, :edit, :update]
before_action :event_filter, only: :show
+ layout :determine_layout
+
def new
@group = Group.new
end
@@ -116,11 +118,11 @@ class GroupsController < Groups::ApplicationController
end
end
- def set_title
+ def determine_layout
if [:new, :create].include?(action_name.to_sym)
- @title = 'New Group'
+ 'application'
else
- super
+ 'group'
end
end