diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-21 05:15:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-21 05:15:45 +0000 |
commit | aa490a70b3ddd1e99a8910bf133d164e0a218020 (patch) | |
tree | a937721cc30f3f5dc0f3f14dfbb3b7bf96821f16 /app/views/custom_fields | |
parent | e0fee3bda4700fa3e8141da2b7ffa82cf7edb638 (diff) | |
download | redmine-aa490a70b3ddd1e99a8910bf133d164e0a218020.tar.gz redmine-aa490a70b3ddd1e99a8910bf133d164e0a218020.zip |
Speeds up the custom field edit view when having hundreds of projects.
git-svn-id: http://svn.redmine.org/redmine/trunk@15084 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/_form.html.erb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb index 99fffadeb..7c79189ac 100644 --- a/app/views/custom_fields/_form.html.erb +++ b/app/views/custom_fields/_form.html.erb @@ -102,8 +102,9 @@ when "IssueCustomField" %> </fieldset> <fieldset class="box" id="custom_field_project_ids"><legend><%= l(:label_project_plural) %></legend> + <% project_ids = @custom_field.project_ids.to_a %> <%= render_project_nested_lists(Project.all) do |p| - content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, @custom_field.projects.to_a.include?(p), :id => nil) + ' ' + p) + content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p) end %> <%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %> <p><%= check_all_links 'custom_field_project_ids' %></p> |