mirror of
https://github.com/redmine/redmine.git
synced 2025-11-06 13:25:44 +01:00
Use IssueRelation#to_s.
git-svn-id: http://svn.redmine.org/redmine/trunk@13565 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -104,9 +104,8 @@ module QueriesHelper
|
|||||||
when :done_ratio
|
when :done_ratio
|
||||||
progress_bar(value, :width => '80px')
|
progress_bar(value, :width => '80px')
|
||||||
when :relations
|
when :relations
|
||||||
other = value.other_issue(issue)
|
|
||||||
content_tag('span',
|
content_tag('span',
|
||||||
(l(value.label_for(issue)) + " " + link_to_issue(other, :subject => false, :tracker => false)).html_safe,
|
value.to_s(issue) {|other| link_to_issue(other, :subject => false, :tracker => false)}.html_safe,
|
||||||
:class => value.css_classes_for(issue))
|
:class => value.css_classes_for(issue))
|
||||||
else
|
else
|
||||||
format_object(value)
|
format_object(value)
|
||||||
@@ -128,8 +127,7 @@ module QueriesHelper
|
|||||||
when 'Float'
|
when 'Float'
|
||||||
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
|
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
|
||||||
when 'IssueRelation'
|
when 'IssueRelation'
|
||||||
other = value.other_issue(object)
|
value.to_s(object)
|
||||||
l(value.label_for(object)) + " ##{other.id}"
|
|
||||||
when 'Issue'
|
when 'Issue'
|
||||||
if object.is_a?(TimeEntry)
|
if object.is_a?(TimeEntry)
|
||||||
"#{value.tracker} ##{value.id}: #{value.subject}"
|
"#{value.tracker} ##{value.id}: #{value.subject}"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class IssueRelation < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_s(*args)
|
def to_s(*args)
|
||||||
map {|relation| "#{l(relation.label_for(@issue))} ##{relation.other_issue(@issue).id}"}.join(', ')
|
map {|relation| relation.to_s(@issue)}.join(', ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user