summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-13 14:31:42 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-13 14:31:51 +0100
commit34cc4c598232d2e27dcc99f5534dbe318e89cff9 (patch)
tree4b2d97db3837b57cca8461ae33f735c6dd1417f0
parent529188e4788991961796b1b6131389072ee61efb (diff)
downloadgitlab-ce-34cc4c598232d2e27dcc99f5534dbe318e89cff9.tar.gz
Link head panel titles to relevant root page.
-rw-r--r--CHANGELOG1
-rw-r--r--app/controllers/snippets_controller.rb1
-rw-r--r--app/controllers/users_controller.rb1
-rw-r--r--app/views/layouts/admin.html.haml2
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/layouts/explore.html.haml4
-rw-r--r--app/views/layouts/group.html.haml2
-rw-r--r--app/views/layouts/navless.html.haml2
-rw-r--r--app/views/layouts/profile.html.haml2
-rw-r--r--app/views/layouts/public_group.html.haml2
-rw-r--r--app/views/layouts/public_users.html.haml2
-rw-r--r--app/views/layouts/search.html.haml2
12 files changed, 13 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 2e0d86862bf..4fb635ea1e5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -50,6 +50,7 @@ v 7.8.0 (unreleased)
- Prevent losing unsaved comments by automatically restoring them when comment page is loaded again.
- Don't allow page to be scaled on mobile.
- Clean the username acquired from OAuth/LDAP so it doesn't fail username validation and block signing up.
+ - Link head panel titles to relevant root page.
v 7.7.2
- Update GitLab Shell to version 2.4.2 that fixes a bug when developers can push to protected branch
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 1ed3bc388fb..6ac048e4b83 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -106,6 +106,7 @@ class SnippetsController < ApplicationController
def set_title
@title = 'Snippets'
+ @title_url = snippets_path
end
def snippet_params
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 57d8ef09faf..84a04c5ebe6 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -19,6 +19,7 @@ class UsersController < ApplicationController
where(project_id: authorized_projects_ids).limit(30)
@title = @user.name
+ @title_url = user_path(@user)
respond_to do |format|
format.html
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index dc8652cb145..e8751a6987e 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: "Admin area"
%body{class: "#{app_theme} #{theme_type} admin", :'data-page' => body_data_page}
- = render "layouts/head_panel", title: "Admin area"
+ = render "layouts/head_panel", title: link_to("Admin area", admin_root_path)
= render 'layouts/page', sidebar: 'layouts/nav/admin'
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index e5420a13605..49123744ffa 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: "Dashboard"
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page }
- = render "layouts/head_panel", title: "Dashboard"
+ = render "layouts/head_panel", title: link_to("Dashboard", root_path)
= render 'layouts/page', sidebar: 'layouts/nav/dashboard'
diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml
index 9813d846542..09855b222dc 100644
--- a/app/views/layouts/explore.html.haml
+++ b/app/views/layouts/explore.html.haml
@@ -5,9 +5,9 @@
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
- if current_user
- = render "layouts/head_panel", title: page_title
+ = render "layouts/head_panel", title: link_to(page_title, explore_root_path)
- else
- = render "layouts/public_head_panel", title: page_title
+ = render "layouts/public_head_panel", title: link_to(page_title, explore_root_path)
.container.navless-container
.content
.explore-title
diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml
index 98edcf3a140..fa0ed317ce1 100644
--- a/app/views/layouts/group.html.haml
+++ b/app/views/layouts/group.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: group_head_title
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
- = render "layouts/head_panel", title: @group.name
+ = render "layouts/head_panel", title: link_to(@group.name, group_path(@group))
= render 'layouts/page', sidebar: 'layouts/nav/group'
diff --git a/app/views/layouts/navless.html.haml b/app/views/layouts/navless.html.haml
index 730f3d09277..a3b55542bf7 100644
--- a/app/views/layouts/navless.html.haml
+++ b/app/views/layouts/navless.html.haml
@@ -3,7 +3,7 @@
= render "layouts/head", title: @title
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
- = render "layouts/head_panel", title: @title
+ = render "layouts/head_panel", title: defined?(@title_url) ? link_to(@title, @title_url) : @title
.container.navless-container
.content
= render "layouts/flash"
diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml
index 89d816061e2..19d6efed78e 100644
--- a/app/views/layouts/profile.html.haml
+++ b/app/views/layouts/profile.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: "Profile"
%body{class: "#{app_theme} #{theme_type} profile", :'data-page' => body_data_page}
- = render "layouts/head_panel", title: "Profile"
+ = render "layouts/head_panel", title: link_to("Profile", profile_path)
= render 'layouts/page', sidebar: 'layouts/nav/profile'
diff --git a/app/views/layouts/public_group.html.haml b/app/views/layouts/public_group.html.haml
index ae3d2bd8a89..4b69329b8fe 100644
--- a/app/views/layouts/public_group.html.haml
+++ b/app/views/layouts/public_group.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: group_head_title
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
- = render "layouts/public_head_panel", title: "group: #{@group.name}"
+ = render "layouts/public_head_panel", title: link_to(@group.name, group_path(@group))
= render 'layouts/page', sidebar: 'layouts/nav/group'
diff --git a/app/views/layouts/public_users.html.haml b/app/views/layouts/public_users.html.haml
index 37767df33d2..3538a8b1699 100644
--- a/app/views/layouts/public_users.html.haml
+++ b/app/views/layouts/public_users.html.haml
@@ -2,5 +2,5 @@
%html{ lang: "en"}
= render "layouts/head", title: @title
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
- = render "layouts/public_head_panel", title: @title
+ = render "layouts/public_head_panel", title: defined?(@title_url) ? link_to(@title, @title_url) : @title
= render 'layouts/page'
diff --git a/app/views/layouts/search.html.haml b/app/views/layouts/search.html.haml
index 6d001e7ee1c..177e2073a0d 100644
--- a/app/views/layouts/search.html.haml
+++ b/app/views/layouts/search.html.haml
@@ -3,7 +3,7 @@
= render "layouts/head", title: "Search"
%body{class: "#{app_theme} #{theme_type} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
- = render "layouts/head_panel", title: "Search"
+ = render "layouts/head_panel", title: link_to("Search", search_path)
.container.navless-container
.content
= render "layouts/flash"