Commit 2f39e461 authored by jplang's avatar jplang

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

Patch by Mischa The Evil.

git-svn-id: https://svn.redmine.org/redmine/trunk@16762 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1bc2e001
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<%= javascript_include_tag 'repository_navigation' %> <%= javascript_include_tag 'repository_navigation' %>
<% end %> <% 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) %> <% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %>
<%= link_to(download_label, <%= link_to(download_label,
{:action => 'raw', :id => @project, {:action => 'raw', :id => @project,
......
...@@ -277,6 +277,8 @@ class RepositoriesGitControllerTest < Redmine::ControllerTest ...@@ -277,6 +277,8 @@ class RepositoriesGitControllerTest < Redmine::ControllerTest
assert_response :success assert_response :success
assert_select 'h2 a', :text => 'sources' assert_select 'h2 a', :text => 'sources'
assert_select 'table.entries tbody' assert_select 'table.entries tbody'
assert_select 'div.contextual > a.icon-download', false
end end
def test_diff def test_diff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment