소스 검색

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

Patch by Gregor Schmidt.


git-svn-id: http://svn.redmine.org/redmine/trunk@17237 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.0.0
Go MAEDA 6 년 전
부모
커밋
c437d8db61
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1
    1
      app/controllers/trackers_controller.rb
  2. 3
    2
      app/views/trackers/_form.html.erb

+ 1
- 1
app/controllers/trackers_controller.rb 파일 보기

@@ -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

+ 3
- 2
app/views/trackers/_form.html.erb 파일 보기

@@ -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 %>

Loading…
취소
저장