1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-04 06:39:38 +00:00

Speeds up the tracker edit view when having hundreds of projects.

git-svn-id: http://svn.redmine.org/redmine/trunk@15083 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-01-21 05:12:44 +00:00
parent d276231aca
commit e0fee3bda4

View File

@ -46,8 +46,9 @@
<div class="splitcontentright">
<% if @projects.any? %>
<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
<% project_ids = @tracker.project_ids.to_a %>
<%= render_project_nested_lists(@projects) do |p|
content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.to_a.include?(p), :id => nil) + ' ' + h(p))
content_tag('label', check_box_tag('tracker[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + h(p))
end %>
<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'tracker_project_ids' %></p>