diff options
author | Douwe Maan <me@douwe.me> | 2015-03-23 17:37:17 +0100 |
---|---|---|
committer | Douwe Maan <me@douwe.me> | 2015-03-23 17:37:17 +0100 |
commit | ceaa2f5c26ecab973922bf70ebdaadc5c2806d32 (patch) | |
tree | fe4a1bc12d0647c748da74d9eba1decf57e484bc /app | |
parent | d4d0852d2d9cfa43b77bb795fff2a3a022be7024 (diff) | |
parent | e5b8cf0a8faad52c3c08a42a7a628318e11a3f60 (diff) | |
download | gitlab-ce-ceaa2f5c26ecab973922bf70ebdaadc5c2806d32.tar.gz |
Merge pull request #9001 from vichak/master
Fix #8966 Remove Milestones/Labels from project navbar when Issues disabled
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 22 |
2 files changed, 16 insertions, 10 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index a14277180c7..77ad7a40fab 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -146,6 +146,10 @@ module ProjectsHelper nav_tabs << feature if project.send :"#{feature}_enabled" end + if project.issues_enabled + nav_tabs << [:milestones, :labels] + end + nav_tabs.flatten end diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index 91cae2b572c..52681865d64 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -44,11 +44,12 @@ %span Graphs - = nav_link(controller: :milestones) do - = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do - %i.fa.fa-clock-o - %span - Milestones + - if project_nav_tab? :milestones + = nav_link(controller: :milestones) do + = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do + %i.fa.fa-clock-o + %span + Milestones - if project_nav_tab? :issues = nav_link(controller: :issues) do @@ -67,11 +68,12 @@ Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - = nav_link(controller: :labels) do - = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do - %i.fa.fa-tags - %span - Labels + - if project_nav_tab? :labels + = nav_link(controller: :labels) do + = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do + %i.fa.fa-tags + %span + Labels - if project_nav_tab? :wiki = nav_link(controller: :wikis) do |