diff --git a/app/views/layouts/_file.html.erb b/app/views/layouts/_file.html.erb index 24bfd1843..eb11f9931 100644 --- a/app/views/layouts/_file.html.erb +++ b/app/views/layouts/_file.html.erb @@ -1,10 +1,12 @@ +
-<%= link_to(l(:button_download), - {:action => 'raw', :id => @project, - :repository_id => @repository.identifier_param, - :path => to_path_param(@path), - :rev => @rev}, class: 'icon icon-download') if @repository.supports_cat? %> -<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> -
- <% end %> diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index 082f55575..0cbb94ae6 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -2,6 +2,15 @@ <%= javascript_include_tag 'repository_navigation' %> <% end %> +<% if @entry && @repository.supports_cat? %> + <% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %> + <%= link_to(download_label, + {:action => 'raw', :id => @project, + :repository_id => @repository.identifier_param, + :path => to_path_param(@path), + :rev => @rev}, class: 'icon icon-download') %> +<% end %> + <%= link_to l(:label_statistics), {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, :class => 'icon icon-stats' if @repository.supports_all_revisions? %>