summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-15 14:40:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-15 14:40:05 +0000
commit93b3dba926ef9593c6849b2e84f57de176c595f1 (patch)
tree2f829ba0bebe82a29a48b58685171e27e0041fcb
parent7c1c2e1ba22e7fbf64012ab927c49ee62687472e (diff)
downloadredmine-93b3dba926ef9593c6849b2e84f57de176c595f1.tar.gz
redmine-93b3dba926ef9593c6849b2e84f57de176c595f1.zip
Makes changes link to entries on the revision view.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1552 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/repositories/revision.rhtml4
-rw-r--r--test/functional/repositories_subversion_controller_test.rb7
2 files changed, 9 insertions, 2 deletions
diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml
index 2fdf58faf..8d994ef7f 100644
--- a/app/views/repositories/revision.rhtml
+++ b/app/views/repositories/revision.rhtml
@@ -46,7 +46,9 @@
<tbody>
<% @changes.each do |change| %>
<tr class="<%= cycle 'odd', 'even' %>">
-<td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank? %></td>
+<td><div class="square action_<%= change.action %>"></div>
+<%= link_to change.path, :action => 'entry', :id => @project, :path => change.relative_path, :rev => @changeset.revision %>
+<%= "(#{change.revision})" unless change.revision.blank? %></td>
<td align="right">
<% if change.action == "M" %>
<%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision %>
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index bc3f261a0..efb824992 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -102,8 +102,13 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
assert_response :success
assert_template 'revision'
assert_tag :tag => 'tr',
- :child => { :tag => 'td', :content => %r{/test/some/path/in/the/repo} },
:child => { :tag => 'td',
+ # link to the entry at rev 2
+ :child => { :tag => 'a', :attributes => {:href => 'repositories/entry/ecookbook/test/some/path/in/the/repo?rev=2'},
+ :content => %r{/test/some/path/in/the/repo} }
+ },
+ :child => { :tag => 'td',
+ # link to partial diff
:child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' } }
}
end