diff options
author | vichak <vichak@hakoun.fr> | 2015-03-23 18:48:50 +0300 |
---|---|---|
committer | vichak <vichak@hakoun.fr> | 2015-03-23 18:48:50 +0300 |
commit | e5b8cf0a8faad52c3c08a42a7a628318e11a3f60 (patch) | |
tree | fe4a1bc12d0647c748da74d9eba1decf57e484bc /app | |
parent | a793c06532240c1f82b13fd45203c232904deb7d (diff) |
Fix #8966 Remove Milestones/Labels from project navbar when Isses disabled
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/nav/_project.html.haml | 4 |
2 files changed, 6 insertions, 2 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 ce1971c7bb4..52681865d64 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -44,7 +44,7 @@ %span Graphs - - if project_nav_tab? :issues + - 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 @@ -68,7 +68,7 @@ Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - - if project_nav_tab? :issues + - 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 |