diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-05 16:33:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-11-05 16:33:45 +0000 |
commit | 4d6c52a82b44a88a25eb0aee2fe7e01147cf68ef (patch) | |
tree | 8b9f50c9c77a496631d5c2b53f1c9924b23c1ba2 | |
parent | 78cc63e52cbab1edc9d5327ea4635850321a4b11 (diff) | |
download | redmine-4d6c52a82b44a88a25eb0aee2fe7e01147cf68ef.tar.gz redmine-4d6c52a82b44a88a25eb0aee2fe7e01147cf68ef.zip |
Use IssueRelation#to_s.
git-svn-id: http://svn.redmine.org/redmine/trunk@13565 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/queries_helper.rb | 6 | ||||
-rw-r--r-- | app/models/issue_relation.rb | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 583d1b104..1eb0fa593 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -104,9 +104,8 @@ module QueriesHelper when :done_ratio progress_bar(value, :width => '80px') when :relations - other = value.other_issue(issue) 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)) else format_object(value) @@ -128,8 +127,7 @@ module QueriesHelper when 'Float' sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator)) when 'IssueRelation' - other = value.other_issue(object) - l(value.label_for(object)) + " ##{other.id}" + value.to_s(object) when 'Issue' if object.is_a?(TimeEntry) "#{value.tracker} ##{value.id}: #{value.subject}" diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb index 9eebe1bb0..f0376b505 100644 --- a/app/models/issue_relation.rb +++ b/app/models/issue_relation.rb @@ -26,7 +26,7 @@ class IssueRelation < ActiveRecord::Base end 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 |