@@ -79,7 +79,8 module ApplicationHelper | |||||
79 | subject = truncate(subject, :length => options[:truncate]) |
|
79 | subject = truncate(subject, :length => options[:truncate]) | |
80 | end |
|
80 | end | |
81 | end |
|
81 | end | |
82 | s = link_to text, issue_path(issue), :class => issue.css_classes, :title => title |
|
82 | only_path = options[:only_path].nil? ? true : options[:only_path] | |
|
83 | s = link_to text, issue_path(issue, :only_path => only_path), :class => issue.css_classes, :title => title | |||
83 | s << h(": #{subject}") if subject |
|
84 | s << h(": #{subject}") if subject | |
84 | s = h("#{issue.project} - ") + s if options[:project] |
|
85 | s = h("#{issue.project} - ") + s if options[:project] | |
85 | s |
|
86 | s |
@@ -334,11 +334,11 module IssuesHelper | |||||
334 | if detail.value && !detail.old_value |
|
334 | if detail.value && !detail.old_value | |
335 | rel_issue = Issue.visible.find_by_id(detail.value) |
|
335 | rel_issue = Issue.visible.find_by_id(detail.value) | |
336 | value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" : |
|
336 | value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" : | |
337 | (no_html ? rel_issue : link_to_issue(rel_issue)) |
|
337 | (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path])) | |
338 | elsif detail.old_value && !detail.value |
|
338 | elsif detail.old_value && !detail.value | |
339 | rel_issue = Issue.visible.find_by_id(detail.old_value) |
|
339 | rel_issue = Issue.visible.find_by_id(detail.old_value) | |
340 | old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" : |
|
340 | old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" : | |
341 | (no_html ? rel_issue : link_to_issue(rel_issue)) |
|
341 | (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path])) | |
342 | end |
|
342 | end | |
343 | label = l(detail.prop_key.to_sym) |
|
343 | label = l(detail.prop_key.to_sym) | |
344 | end |
|
344 | end |
@@ -113,6 +113,16 class MailerTest < ActiveSupport::TestCase | |||||
113 | end |
|
113 | end | |
114 | end |
|
114 | end | |
115 |
|
115 | |||
|
116 | def test_issue_edit_should_generate_url_with_hostname_for_relations | |||
|
117 | journal = Journal.new(:journalized => Issue.find(1), :user => User.find(1), :created_on => Time.now) | |||
|
118 | journal.details << JournalDetail.new(:property => 'relation', :prop_key => 'label_relates_to', :value => 2) | |||
|
119 | Mailer.deliver_issue_edit(journal) | |||
|
120 | assert_not_nil last_email | |||
|
121 | assert_select_email do | |||
|
122 | assert_select 'a[href=?]', 'http://mydomain.foo/issues/2', :text => 'Feature request #2' | |||
|
123 | end | |||
|
124 | end | |||
|
125 | ||||
116 | def test_generated_links_with_prefix_and_no_relative_url_root |
|
126 | def test_generated_links_with_prefix_and_no_relative_url_root | |
117 | Setting.default_language = 'en' |
|
127 | Setting.default_language = 'en' | |
118 | relative_url_root = Redmine::Utils.relative_url_root |
|
128 | relative_url_root = Redmine::Utils.relative_url_root |
General Comments 0
You need to be logged in to leave comments.
Login now