瀏覽代碼

Don't display download button for dir entries (#26350).

Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@16762 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.0.0
Jean-Philippe Lang 7 年之前
父節點
當前提交
a628ba7e60
共有 2 個檔案被更改,包括 3 行新增1 行删除
  1. 1
    1
      app/views/repositories/_navigation.html.erb
  2. 2
    0
      test/functional/repositories_git_controller_test.rb

+ 1
- 1
app/views/repositories/_navigation.html.erb 查看文件

@@ -2,7 +2,7 @@
<%= 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,

+ 2
- 0
test/functional/repositories_git_controller_test.rb 查看文件

@@ -277,6 +277,8 @@ class RepositoriesGitControllerTest < Redmine::ControllerTest
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

Loading…
取消
儲存