Commit e5b8cf0a authored by vichak's avatar vichak

Fix #8966 Remove Milestones/Labels from project navbar when Isses disabled

parent a793c065
...@@ -146,6 +146,10 @@ module ProjectsHelper ...@@ -146,6 +146,10 @@ module ProjectsHelper
nav_tabs << feature if project.send :"#{feature}_enabled" nav_tabs << feature if project.send :"#{feature}_enabled"
end end
if project.issues_enabled
nav_tabs << [:milestones, :labels]
end
nav_tabs.flatten nav_tabs.flatten
end end
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
%span %span
Graphs Graphs
- if project_nav_tab? :issues - if project_nav_tab? :milestones
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
%i.fa.fa-clock-o %i.fa.fa-clock-o
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
Merge Requests Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count %span.count.merge_counter= @project.merge_requests.opened.count
- if project_nav_tab? :issues - if project_nav_tab? :labels
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
%i.fa.fa-tags %i.fa.fa-tags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment