Commit 7f87421c authored by jplang's avatar jplang

Hide the issue tracking tab if module is disabled (#26488).

git-svn-id: https://svn.redmine.org/redmine/trunk@16899 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3c63e766
......@@ -21,7 +21,7 @@ module ProjectsHelper
def project_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_project},
{:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural},
{:name => 'issues', :action => :edit_project, :partial => 'projects/settings/issues', :label => :label_issue_tracking},
{:name => 'issues', :action => :edit_project, :module => :issue_tracking, :partial => 'projects/settings/issues', :label => :label_issue_tracking},
{:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural,
:url => {:tab => 'versions', :version_status => params[:version_status], :version_name => params[:version_name]}},
{:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural},
......@@ -30,7 +30,9 @@ module ProjectsHelper
{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :label_time_tracking}
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
tabs.
select {|tab| User.current.allowed_to?(tab[:action], @project)}.
select {|tab| tab[:module].nil? || @project.module_enabled?(tab[:module])}
end
def parent_project_select_tag(project)
......
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