summaryrefslogtreecommitdiff
path: root/app/views/projects/merge_requests
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2017-04-13 07:55:15 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-04-13 07:55:15 +0000
commit49759fbee1bad812d6112d1f3e7702e06f20a48c (patch)
tree89c9d6f0a2ea865830e33fe25a6ea175e3dbab8b /app/views/projects/merge_requests
parent37ab389139a21a8ab10ddbbddec1b61f720b27ab (diff)
downloadgitlab-ce-49759fbee1bad812d6112d1f3e7702e06f20a48c.tar.gz
Show sub-nav under Merge Requests when issue tracker is non-default
Diffstat (limited to 'app/views/projects/merge_requests')
-rw-r--r--app/views/projects/merge_requests/_head.html.haml21
-rw-r--r--app/views/projects/merge_requests/index.html.haml3
2 files changed, 24 insertions, 0 deletions
diff --git a/app/views/projects/merge_requests/_head.html.haml b/app/views/projects/merge_requests/_head.html.haml
new file mode 100644
index 00000000000..b7f73fe5339
--- /dev/null
+++ b/app/views/projects/merge_requests/_head.html.haml
@@ -0,0 +1,21 @@
+= content_for :sub_nav do
+ .scrolling-tabs-container.sub-nav-scroll
+ = render 'shared/nav_scroll'
+ .nav-links.sub-nav.scrolling-tabs
+ %ul{ class: (container_class) }
+ = nav_link(controller: :merge_requests) do
+ = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests' do
+ %span
+ List
+
+ - if project_nav_tab? :labels
+ = nav_link(controller: :labels) do
+ = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
+ %span
+ Labels
+
+ - if project_nav_tab? :milestones
+ = nav_link(controller: :milestones) do
+ = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
+ %span
+ Milestones
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index 64f17ab34b1..6bf0035e051 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -2,6 +2,9 @@
- @bulk_edit = can?(current_user, :admin_merge_request, @project)
- page_title "Merge Requests"
+- unless @project.default_issues_tracker?
+ = content_for :sub_nav do
+ = render "projects/merge_requests/head"
= render 'projects/last_push'
- content_for :page_specific_javascripts do