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