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
2 2
  <%= javascript_include_tag 'repository_navigation' %>
3 3
<% end %>
4 4

  
5
<% if @entry && @repository.supports_cat? %>
5
<% if @entry && !@entry.is_dir? && @repository.supports_cat? %>
6 6
  <% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %>
7 7
  <%= link_to(download_label,
8 8
              {:action => 'raw', :id => @project,
test/functional/repositories_git_controller_test.rb
277 277
      assert_response :success
278 278
      assert_select 'h2 a', :text => 'sources'
279 279
      assert_select 'table.entries tbody'
280
      assert_select 'div.contextual > a.icon-download', false
281

  
280 282
    end
281 283

  
282 284
    def test_diff
    (1-1/1)