summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 16:49:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 16:49:55 +0000
commitccba924df9eb4b2bb0582ea97a0bbdc075443092 (patch)
tree7ce32f702e8bc139925fe16b10326c4d28fcb477
parentfbce1b01ef9426243d9119a855c333435d5c015f (diff)
downloadredmine-ccba924df9eb4b2bb0582ea97a0bbdc075443092.tar.gz
redmine-ccba924df9eb4b2bb0582ea97a0bbdc075443092.zip
Hide the issue tracking tab if module is disabled (#26488).
git-svn-id: http://svn.redmine.org/redmine/trunk@16899 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/projects_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 50df88b20..819547abd 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -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)