summaryrefslogtreecommitdiffstats
path: root/app/views/trackers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-21 05:12:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-01-21 05:12:44 +0000
commite0fee3bda4700fa3e8141da2b7ffa82cf7edb638 (patch)
tree8726801c2e1beeb0fb022d0cbd43ff43816146b8 /app/views/trackers
parentd276231aca8187ca84288cafb80aaf4f16210792 (diff)
downloadredmine-e0fee3bda4700fa3e8141da2b7ffa82cf7edb638.tar.gz
redmine-e0fee3bda4700fa3e8141da2b7ffa82cf7edb638.zip
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
Diffstat (limited to 'app/views/trackers')
-rw-r--r--app/views/trackers/_form.html.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb
index 107095540..7b5b7ea61 100644
--- a/app/views/trackers/_form.html.erb
+++ b/app/views/trackers/_form.html.erb
@@ -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>