1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-23 03:51:46 +00:00

Display source project for cross-project associated revisions for issues (#5242).

Contributed by Felix Schäfer.


git-svn-id: http://svn.redmine.org/redmine/trunk@21368 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2022-01-18 15:03:29 +00:00
parent 8cc4cff362
commit a5785c8ee6
3 changed files with 5 additions and 2 deletions

View File

@ -239,7 +239,7 @@ class IssuesController < ApplicationController
when 'changesets'
@changesets = @issue.changesets.visible.preload(:repository, :user).to_a
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
render :partial => 'issues/tabs/changesets', :locals => {:changesets => @changesets}
render :partial => 'issues/tabs/changesets', :locals => {:changesets => @changesets, :project => @project}
end
end

View File

@ -5,7 +5,9 @@
<%= avatar(changeset.user, :size => "24") %>
<%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %>
</h4>
<p><%= link_to_revision(changeset, changeset.repository,
<p>
<%= "#{changeset.project.name} - " unless changeset.project == project %>
<%= link_to_revision(changeset, changeset.repository,
:text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
<% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
(<%= link_to(l(:label_diff),

View File

@ -2661,6 +2661,7 @@ class IssuesControllerTest < Redmine::ControllerTest
:xhr => true
)
assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/3'
assert_select 'div.changeset p', :text => /eCookbook - /
end
def test_show_should_display_watchers