mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Reduce database queries when rendering Custom fields box in the project settings tab (#36505).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@21411 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a043021151
commit
b0e1f8d8f3
@ -21,9 +21,10 @@
|
||||
<% if User.current.admin? %>
|
||||
<div class="contextual"><%= link_to l(:label_administration), custom_fields_path, :class => "icon icon-settings" %></div>
|
||||
<% end %>
|
||||
<% all_issue_custom_field_ids = @project.all_issue_custom_fields.ids %>
|
||||
<% @issue_custom_fields.each do |custom_field| %>
|
||||
<label class="floating">
|
||||
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
|
||||
<%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (all_issue_custom_field_ids.include? custom_field.id),
|
||||
:disabled => (custom_field.is_for_all? ? "disabled" : nil),
|
||||
:id => nil %>
|
||||
<%= custom_field_name_tag(custom_field) %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user