summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-06 16:45:34 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-06 16:45:34 +0000
commit0705c839d92b4bc2539c8e5723f069c10b8bb50c (patch)
treefd614174554b1963b905785fbebcb095ab083bb5
parentbc42405d7f85e8fa8fe18e6f9a3a5d1022320ca3 (diff)
downloadredmine-0705c839d92b4bc2539c8e5723f069c10b8bb50c.tar.gz
redmine-0705c839d92b4bc2539c8e5723f069c10b8bb50c.zip
Merged r16762 (#26350).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@16763 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/repositories/_navigation.html.erb2
-rw-r--r--test/functional/repositories_git_controller_test.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb
index 0cbb94ae6..0bd6e33cf 100644
--- a/app/views/repositories/_navigation.html.erb
+++ b/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,
diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb
index 29d1a5521..c7cd7bce2 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/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