summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-15 10:32:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-12-15 10:32:03 +0000
commit13756eb3a830e04493ebc048ae72e9271df4411c (patch)
treeb17fdec14093c8e5e67ceba6452c0fcde857f93b /app/helpers
parentc6fc1a8047cb2707882cbc586065bf3bd7872aa2 (diff)
downloadredmine-13756eb3a830e04493ebc048ae72e9271df4411c.tar.gz
redmine-13756eb3a830e04493ebc048ae72e9271df4411c.zip
Fixed that links for relations in notifications do not include hostname (#15677).
git-svn-id: http://svn.redmine.org/redmine/trunk@12415 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb3
-rw-r--r--app/helpers/issues_helper.rb4
2 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b83691c08..fac002565 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -79,7 +79,8 @@ module ApplicationHelper
subject = truncate(subject, :length => options[:truncate])
end
end
- s = link_to text, issue_path(issue), :class => issue.css_classes, :title => title
+ only_path = options[:only_path].nil? ? true : options[:only_path]
+ s = link_to text, issue_path(issue, :only_path => only_path), :class => issue.css_classes, :title => title
s << h(": #{subject}") if subject
s = h("#{issue.project} - ") + s if options[:project]
s
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 9e70f5119..ed1d243fb 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -334,11 +334,11 @@ module IssuesHelper
if detail.value && !detail.old_value
rel_issue = Issue.visible.find_by_id(detail.value)
value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" :
- (no_html ? rel_issue : link_to_issue(rel_issue))
+ (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
elsif detail.old_value && !detail.value
rel_issue = Issue.visible.find_by_id(detail.old_value)
old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" :
- (no_html ? rel_issue : link_to_issue(rel_issue))
+ (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
end
label = l(detail.prop_key.to_sym)
end