mirror of
https://github.com/redmine/redmine.git
synced 2026-01-16 04:23:19 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user