diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-30 20:06:18 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-30 20:12:15 +0300 |
commit | 26ad250989d82b496b131811f8a0ddd7e662b650 (patch) | |
tree | a61059ff97f7d5bb1db163fa2dcb041065b092f2 /app/controllers/explore | |
parent | f2cf6d75ecc6082897543f976e8e4bee7ac24e90 (diff) |
Add a page title to every page.
Diffstat (limited to 'app/controllers/explore')
-rw-r--r-- | app/controllers/explore/application_controller.rb | 11 | ||||
-rw-r--r-- | app/controllers/explore/groups_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 4 |
3 files changed, 13 insertions, 6 deletions
diff --git a/app/controllers/explore/application_controller.rb b/app/controllers/explore/application_controller.rb new file mode 100644 index 00000000000..8d94fd238a6 --- /dev/null +++ b/app/controllers/explore/application_controller.rb @@ -0,0 +1,11 @@ +class Explore::ApplicationController < ApplicationController + before_action :set_title + + private + + def set_title + @title = "Explore GitLab" + @title_url = explore_root_path + @sidebar = "explore" + end +end diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb index a7250b799f3..55cda0cff17 100644 --- a/app/controllers/explore/groups_controller.rb +++ b/app/controllers/explore/groups_controller.rb @@ -1,9 +1,7 @@ -class Explore::GroupsController < ApplicationController +class Explore::GroupsController < Explore::ApplicationController skip_before_action :authenticate_user!, :reject_blocked, :set_current_user_for_observers - layout "explore" - def index @groups = GroupsFinder.new.execute(current_user) @groups = @groups.search(params[:search]) if params[:search].present? diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index b1b0a2514dc..e9bcb44f6b3 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -1,9 +1,7 @@ -class Explore::ProjectsController < ApplicationController +class Explore::ProjectsController < Explore::ApplicationController skip_before_action :authenticate_user!, :reject_blocked - layout 'explore' - def index @projects = ProjectsFinder.new.execute(current_user) @tags = @projects.tags_on(:tags) |