0001-Use-same-layout-for-custom-fields-in-issue-bulk-edit.patch

Marius BALTEANU, 2020-04-05 10:45

Download (2.05 KB)

View differences:

app/views/issues/bulk_edit.html.erb
94 94
</p>
95 95
<% end %>
96 96

  
97
<% @custom_fields.each do |custom_field| %>
98
  <p>
99
    <label><%= custom_field.name %></label>
100
    <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
101
  </p>
102
<% end %>
103

  
104 97
<% if @copy && Setting.link_copied_issue == 'ask' %>
105 98
<p>
106 99
  <label for='link_copy'><%= l(:label_link_copied_issue) %></label>
......
190 183
<% end %>
191 184
</div>
192 185
</div>
186

  
187
<% custom_fields = @custom_fields %>
188
<% custom_fields_full_width = custom_fields.select { |value| value.full_width_layout? } %>
189
<% custom_fields -= custom_fields_full_width %>
190

  
191
<% if custom_fields.present? %>
192
<div class="splitcontent">
193
  <div class="splitcontentleft">
194
   <% i = 0 %>
195
   <% split_on = (custom_fields.size / 2.0).ceil - 1 %>
196
   <% custom_fields.each do |custom_field| %>
197
     <p>
198
       <label><%= custom_field.name %></label>
199
       <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
200
     </p>
201
     <% if i == split_on %>
202
       </div><div class="splitcontentright">
203
     <% end %>
204
     <% i += 1 %>
205
   <% end %>
206
  </div>
207
</div>
208
<% end %>
209

  
210
<% custom_fields_full_width.each do |custom_field| %>
211
  <p>
212
    <label><%= custom_field.name %></label>
213
    <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
214
  </p>
215
<% end %>
216

  
193 217
</fieldset>
194 218

  
195 219
<fieldset>
196
-