adds_project_name_to_associated_revision_link_v2.patch

Yuichi HARADA, 2018-12-04 03:56

Download (1.88 KB)

View differences:

app/views/issues/_changesets.html.erb
1 1
<% changesets.each do |changeset| %>
2 2
    <div class="changeset">
3 3
    <p><%= link_to_revision(changeset, changeset.repository,
4
                            :text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
4
                            :text => "#{l(:label_revision)} #{changeset.format_identifier}" + (changeset.project.id == project.id ? "" : " (#{changeset.project.name})")) %>
5 5
        <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
6 6
        (<%= link_to(l(:label_diff),
7 7
               :controller => 'repositories',
app/views/issues/show.html.erb
123 123
<% if @changesets.present? %>
124 124
<div id="issue-changesets">
125 125
<h3><%=l(:label_associated_revisions)%></h3>
126
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
126
<%= render :partial => 'changesets', :locals => {:changesets => @changesets, :project => @project} %>
127 127
</div>
128 128
<% end %>
129 129

  
test/functional/issues_controller_test.rb
2047 2047
        :id => issue.id
2048 2048
      }
2049 2049

  
2050
    assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/3'
2050
    assert_select 'a[href=?]', '/projects/ecookbook/repository/10/revisions/3', 'Revision 3 (eCookbook)'
2051 2051
  end
2052 2052

  
2053 2053
  def test_show_should_display_watchers