Project

General

Profile

Defect #26350 ยป 0001-Don-t-display-download-button-for-dir-entries.patch

Mischa The Evil, 2017-07-05 03:43

View differences:

app/views/repositories/_navigation.html.erb
<%= javascript_include_tag 'repository_navigation' %>
<% end %>
<% if @entry && @repository.supports_cat? %>
<% if @entry && !@entry.is_dir? && @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,
test/functional/repositories_git_controller_test.rb
assert_response :success
assert_select 'h2 a', :text => 'sources'
assert_select 'table.entries tbody'
assert_select 'div.contextual > a.icon-download', false
end
def test_diff
    (1-1/1)