+<% show_diff = revisions.size > 1 && User.current.allowed_to?(:browse_repository, @repository.project) %>
+<% if show_diff %>
+<p>
+ <%= submit_tag(l(:label_view_diff), :name => nil) %>
+</p>
+<% end %>
<div class="autoscroll">
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
<%= if show_revision_graph && revisions && revisions.any?
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
:method => :get
) do %>
-<% show_diff = revisions.size > 1 && User.current.allowed_to?(:browse_repository, @repository.project) %>
-<% if show_diff %>
-<p>
- <%= submit_tag(l(:label_view_diff), :name => nil) %>
-</p>
-<% end %>
<table class="list changesets">
<thead><tr>
<th>#</th>
<% end %>
</tbody>
</table>
+<% end %>
+</div>
<% if show_diff %>
<p>
<%= submit_tag(l(:label_view_diff), :name => nil) %>
</p>
<% end %>
-<% end %>
-</div>