@@ -58,8 +58,11 module RepositoriesHelper | |||||
58 | end |
|
58 | end | |
59 |
|
59 | |||
60 | def with_leading_slash(path) |
|
60 | def with_leading_slash(path) | |
61 | path ||= '' |
|
61 | path.to_s.starts_with?('/') ? path : "/#{path}" | |
62 | path.starts_with?('/') ? path : "/#{path}" |
|
62 | end | |
|
63 | ||||
|
64 | def without_leading_slash(path) | |||
|
65 | path.gsub(%r{^/+}, '') | |||
63 | end |
|
66 | end | |
64 |
|
67 | |||
65 | def subversion_field_tags(form, repository) |
|
68 | def subversion_field_tags(form, repository) |
@@ -49,7 +49,7 | |||||
49 | <td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank? %></td> |
|
49 | <td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank? %></td> | |
50 | <td align="right"> |
|
50 | <td align="right"> | |
51 | <% if change.action == "M" %> |
|
51 | <% if change.action == "M" %> | |
52 | <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => change.path, :rev => @changeset.revision %> |
|
52 | <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => without_leading_slash(change.path), :rev => @changeset.revision %> | |
53 | <% end %> |
|
53 | <% end %> | |
54 | </td> |
|
54 | </td> | |
55 | </tr> |
|
55 | </tr> |
General Comments 0
You need to be logged in to leave comments.
Login now