@@ -200,7 +200,7 module IssuesHelper | |||
|
200 | 200 | end |
|
201 | 201 | |
|
202 | 202 | def cells(label, text, options={}) |
|
203 |
content_tag('th', " |
|
|
203 | content_tag('th', label + ":", options) + content_tag('td', text, options) | |
|
204 | 204 | end |
|
205 | 205 | end |
|
206 | 206 | |
@@ -213,22 +213,14 module IssuesHelper | |||
|
213 | 213 | def render_custom_fields_rows(issue) |
|
214 | 214 | values = issue.visible_custom_field_values |
|
215 | 215 | return if values.empty? |
|
216 | ordered_values = [] | |
|
217 | 216 | half = (values.size / 2.0).ceil |
|
218 | half.times do |i| | |
|
219 | ordered_values << values[i] | |
|
220 | ordered_values << values[i + half] | |
|
221 | end | |
|
222 | s = "<tr>\n" | |
|
223 | n = 0 | |
|
224 | ordered_values.compact.each do |value| | |
|
225 | css = "cf_#{value.custom_field.id}" | |
|
226 | s << "</tr>\n<tr>\n" if n > 0 && (n % 2) == 0 | |
|
227 | s << "\t<th class=\"#{css}\">#{ custom_field_name_tag(value.custom_field) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n" | |
|
228 | n += 1 | |
|
217 | issue_fields_rows do |rows| | |
|
218 | values.each_with_index do |value, i| | |
|
219 | css = "cf_#{value.custom_field.id}" | |
|
220 | m = (i < half ? :left : :right) | |
|
221 | rows.send m, custom_field_name_tag(value.custom_field), show_value(value), :class => css | |
|
222 | end | |
|
229 | 223 | end |
|
230 | s << "</tr>\n" | |
|
231 | s.html_safe | |
|
232 | 224 | end |
|
233 | 225 | |
|
234 | 226 | # Returns the path for updating the issue form |
General Comments 0
You need to be logged in to leave comments.
Login now