Project

General

Profile

Patch #39835 ยป optimize-repository-menu.patch

Go MAEDA, 2023-12-12 15:19

View differences:

lib/redmine/preparation.rb
367 367
        menu.push :repository,
368 368
                  {:controller => 'repositories', :action => 'show',
369 369
                   :repository_id => nil, :path => nil, :rev => nil},
370
                  :if => Proc.new {|p| p.repositories.any? {|r| !r.new_record?}}
370
                  :if => Proc.new {|p| Repository.where(project_id: p.id).any?}
371 371
        menu.push :settings, {:controller => 'projects', :action => 'settings'},
372 372
                  :last => true
373 373
      end
    (1-1/1)