Display of multi custom fields.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8726 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-01-29 22:01:40 +00:00
parent 0cd62a3c77
commit 79b12c73d9
7 changed files with 30 additions and 6 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ module CustomFieldsHelper
# Return a string used to display a custom value
def format_value(value, field_format)
if value.is_a?(Array)
value.collect {|v| format_value(v, field_format)}.join(', ')
value.collect {|v| format_value(v, field_format)}.compact.sort.join(', ')
else
Redmine::CustomFieldFormat.format_value(value, field_format)
end
+1 -1
View File
@@ -320,7 +320,7 @@ module IssuesHelper
issues.each do |issue|
col_values = columns.collect do |column|
s = if column.is_a?(QueryCustomFieldColumn)
cv = issue.custom_values.detect {|v| v.custom_field_id == column.custom_field.id}
cv = issue.custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
show_value(cv)
else
value = issue.send(column.name)
+1 -1
View File
@@ -118,7 +118,7 @@ module TimelogHelper
entry.hours.to_s.gsub('.', decimal_separator),
entry.comments
]
fields += custom_fields.collect {|f| show_value(entry.custom_value_for(f)) }
fields += custom_fields.collect {|f| show_value(entry.custom_field_values.detect {|v| v.custom_field_id == f.id}) }
csv << fields.collect {|c| Redmine::CodesetUtil.from_utf8(
c.to_s,
+1 -1
View File
@@ -5,7 +5,7 @@
<% end %>
<p><%=h version.description %></p>
<% if version.custom_values.any? %>
<% if version.custom_field_values.any? %>
<ul>
<% version.custom_field_values.each do |custom_value| %>
<% if custom_value.value.present? %>