summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-11-11 14:38:13 +0000
committerFatih Acet <acetfatih@gmail.com>2016-11-11 14:38:13 +0000
commitda844cb53857cfe6d12e3d9bf651e57ad8ce8782 (patch)
tree2cb587bc3409a5e0108a03ba1124bd4833e7f17c
parent41899c2a00ba67b1aa8f72006b48b2652e206e99 (diff)
parent7730f5f7ec363e1f38f3b1afc88a844d8fae533d (diff)
downloadgitlab-ce-da844cb53857cfe6d12e3d9bf651e57ad8ce8782.tar.gz
Merge branch '21764-build-page-title' into 'master'
Remove project_title additions from builds and environments ## What does this MR do? Removed soon-to-be un-needed project title additions from builds and environments. **This MR depends on !5998, which introduces subnav to these pages. Without it we're just removing a useful link.** ## Are there points in the code the reviewer needs to double check? @iamphill Is this right of me? One of these still exists in `projects/artifacts/browse`, I'm not sure whether to fix the issue with `project_title`, which already has some issues with its chevron, or just remove it as it will soon be redundant. ## Why was this MR needed? ## Screenshots (if relevant) **BEFORE:** ![Screen_Shot_2016-10-27_at_14.58.22](/uploads/2915289fb06603c33d1abbcdab70c962/Screen_Shot_2016-10-27_at_14.58.22.png) **AFTER:** ![Screen_Shot_2016-10-27_at_14.58.29](/uploads/ad8574aeaa6771737bb9002d749b5559/Screen_Shot_2016-10-27_at_14.58.29.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21764 See merge request !6160
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/helpers/projects_helper.rb7
-rw-r--r--app/views/projects/artifacts/browse.html.haml1
-rw-r--r--app/views/projects/builds/show.html.haml2
-rw-r--r--app/views/projects/environments/_header_title.html.haml1
5 files changed, 4 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20907eef17b..86a37d5bdb1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,6 +51,7 @@ entry.
- Fail gracefully when creating merge request with non-existing branch (alexsanford)
- Fix mobile layout issues in admin user overview page !7087
- Fix HipChat notifications rendering (airatshigapov, eisnerd)
+- Removed unneeded "Builds" and "Environments" link from project titles
- Remove 'Edit' button from wiki edit view !7143 (Hiroyuki Sato)
- Cleaned up global namespace JS !19661 (Jose Ivan Vargas)
- Refactor Jira service to use jira-ruby gem
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 42c00ec3cd5..17123b1eaee 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -49,7 +49,7 @@ module ProjectsHelper
end
end
- def project_title(project, name = nil, url = nil)
+ def project_title(project)
namespace_link =
if project.group
link_to(simple_sanitize(project.group.name), group_path(project.group))
@@ -66,10 +66,7 @@ module ProjectsHelper
end
end
- full_title = "#{namespace_link} / #{project_link}".html_safe
- full_title << ' &middot; '.html_safe << link_to(simple_sanitize(name), url) if name
-
- full_title
+ "#{namespace_link} / #{project_link}".html_safe
end
def remove_project_message(project)
diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml
index 539d07d634a..ede01dcc1aa 100644
--- a/app/views/projects/artifacts/browse.html.haml
+++ b/app/views/projects/artifacts/browse.html.haml
@@ -1,5 +1,4 @@
- page_title 'Artifacts', "#{@build.name} (##{@build.id})", 'Builds'
-- header_title project_title(@project, "Builds", project_builds_path(@project))
.top-block.row-content-block.clearfix
.pull-right
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index ae7a7ecb392..f533eec642e 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -1,6 +1,6 @@
- @no_container = true
- page_title "#{@build.name} (##{@build.id})", "Builds"
-- header_title project_title(@project, "Builds", project_builds_path(@project))
+- trace_with_state = @build.trace_with_state
= render "projects/pipelines/head", build_subnav: true
%div{ class: container_class }
diff --git a/app/views/projects/environments/_header_title.html.haml b/app/views/projects/environments/_header_title.html.haml
deleted file mode 100644
index e056fccad5d..00000000000
--- a/app/views/projects/environments/_header_title.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-- header_title project_title(@project, "Environments", project_environments_path(@project))