Commit 636d0fc6 authored by maeda's avatar maeda

Fix: Sort issue custom fields by position in tracker views (#28393).

Patch by Gregor Schmidt.


git-svn-id: https://svn.redmine.org/redmine/trunk@17237 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 6fa75120
......@@ -106,6 +106,6 @@ class TrackersController < ApplicationController
return
end
@trackers = Tracker.sorted.to_a
@custom_fields = IssueCustomField.all.sort
@custom_fields = IssueCustomField.sorted
end
end
......@@ -21,10 +21,11 @@
</p>
<%= hidden_field_tag 'tracker[core_fields][]', '' %>
<% if IssueCustomField.all.any? %>
<% @issue_custom_fields = IssueCustomField.sorted %>
<% if @issue_custom_fields.present? %>
<p>
<label><%= l(:label_custom_field_plural) %></label>
<% IssueCustomField.all.each do |field| %>
<% @issue_custom_fields.each do |field| %>
<label class="block">
<%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.to_a.include?(field), :id => nil %>
<%= field.name %>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment