Project

General

Profile

Feature #26081 » 26081.patch.txt

patch to set @inline = false on 'long text' columns and display in search results with a label - jb cbdse, 2017-06-01 16:52

 
Index: app/models/query.rb
===================================================================
--- app/models/query.rb (revision 16584)
+++ app/models/query.rb (working copy)
@@ -82,6 +82,9 @@
self.groupable = custom_field.group_statement || false
self.totalable = custom_field.totalable?
@inline = true
+ if custom_field.field_format == "text" then
+ @inline = false
+ end
@cf = custom_field
end
@@ -114,7 +117,7 @@
end
def css_classes
- @css_classes ||= "#{name} #{@cf.field_format}"
+ @css_classes ||= "#{name} #{@cf.field_format}" + (@inline?"":" description")
end
end
Index: app/views/issues/_list.html.erb
===================================================================
--- app/views/issues/_list.html.erb (revision 16584)
+++ app/views/issues/_list.html.erb (working copy)
@@ -33,7 +33,7 @@
<% @query.block_columns.each do |column|
if (text = column_content(column, issue)) && text.present? -%>
<tr class="<%= current_cycle %>">
- <td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>"><%= text %></td>
+ <td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>"><h3><%=column.caption%></h3><%= text %></td>
</tr>
<% end -%>
<% end -%>
(1-1/4)