Optimize repository menu visibility check (#39835).

Patch by Holger Just (@hjust).


git-svn-id: https://svn.redmine.org/redmine/trunk@22580 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-12-30 04:47:38 +00:00
parent 87e7283ac0
commit a6509d658b

View File

@@ -367,7 +367,7 @@ module Redmine
menu.push :repository,
{:controller => 'repositories', :action => 'show',
:repository_id => nil, :path => nil, :rev => nil},
:if => Proc.new {|p| p.repositories.any? {|r| !r.new_record?}}
:if => Proc.new {|p| p.repositories.exists?}
menu.push :settings, {:controller => 'projects', :action => 'settings'},
:last => true
end