summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-29 12:57:38 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-29 12:57:38 +0000
commit1b6da80e16dd0cb200588422dfc5a655cb3b94f0 (patch)
tree5a4bedc3760b89680f96e989fa606fcba92e6250 /app/helpers
parent69b8931e92e37feceb7353d5baa6be6a51492bf0 (diff)
downloadredmine-1b6da80e16dd0cb200588422dfc5a655cb3b94f0.tar.gz
redmine-1b6da80e16dd0cb200588422dfc5a655cb3b94f0.zip
Makes related issues available for display and filtering on the issue list (#3239, #3265).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10513 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--app/helpers/queries_helper.rb7
2 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index bcccfd29b..4743eda43 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -64,10 +64,12 @@ module ApplicationHelper
# link_to_issue(issue, :truncate => 6) # => Defect #6: This i...
# link_to_issue(issue, :subject => false) # => Defect #6
# link_to_issue(issue, :project => true) # => Foo - Defect #6
+ # link_to_issue(issue, :subject => false, :tracker => false) # => #6
#
def link_to_issue(issue, options={})
title = nil
subject = nil
+ text = options[:tracker] == false ? "##{issue.id}" : "#{issue.tracker} ##{issue.id}"
if options[:subject] == false
title = truncate(issue.subject, :length => 60)
else
@@ -76,7 +78,7 @@ module ApplicationHelper
subject = truncate(subject, :length => options[:truncate])
end
end
- s = link_to "#{h(issue.tracker)} ##{issue.id}", {:controller => "issues", :action => "show", :id => issue},
+ s = link_to text, {:controller => "issues", :action => "show", :id => issue},
:class => issue.css_classes,
:title => title
s << h(": #{subject}") if subject
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 076a8959e..ca452a41a 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -35,7 +35,7 @@ module QueriesHelper
def column_content(column, issue)
value = column.value(issue)
if value.is_a?(Array)
- value.collect {|v| column_value(column, issue, v)}.compact.sort.join(', ').html_safe
+ value.collect {|v| column_value(column, issue, v)}.compact.join(', ').html_safe
else
column_value(column, issue, value)
end
@@ -73,6 +73,11 @@ module QueriesHelper
l(:general_text_No)
when 'Issue'
link_to_issue(value, :subject => false)
+ when 'IssueRelation'
+ other = value.other_issue(issue)
+ content_tag('span',
+ (l(value.label_for(issue)) + " " + link_to_issue(other, :subject => false, :tracker => false)).html_safe,
+ :class => value.css_classes_for(issue))
else
h(value)
end