Show warning when exported issues exceed the limit (#13770).
git-svn-id: http://svn.redmine.org/redmine/trunk@12663 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
682f0231ff
commit
f890c775f1
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
<% other_formats_links do |f| %>
|
<% other_formats_links do |f| %>
|
||||||
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
<%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
|
||||||
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
|
<%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %>
|
||||||
<%= f.link_to 'PDF', :url => params %>
|
<%= f.link_to 'PDF', :url => params %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
@ -80,6 +80,11 @@
|
||||||
<p>
|
<p>
|
||||||
<label><%= check_box_tag 'description', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label>
|
<label><%= check_box_tag 'description', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label>
|
||||||
</p>
|
</p>
|
||||||
|
<% if @issue_count > Setting.issues_export_limit.to_i %>
|
||||||
|
<p class="icon icon-warning">
|
||||||
|
<%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
<p class="buttons">
|
<p class="buttons">
|
||||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||||
|
|
|
@ -373,6 +373,20 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert_select 'form#csv-export-form[action=/issues.csv]'
|
assert_select 'form#csv-export-form[action=/issues.csv]'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_index_should_not_warn_when_not_exceeding_export_limit
|
||||||
|
with_settings :issues_export_limit => 200 do
|
||||||
|
get :index
|
||||||
|
assert_select '#csv-export-options p.icon-warning', 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_index_should_warn_when_exceeding_export_limit
|
||||||
|
with_settings :issues_export_limit => 2 do
|
||||||
|
get :index
|
||||||
|
assert_select '#csv-export-options p.icon-warning', :text => %r{limit: 2}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_index_csv
|
def test_index_csv
|
||||||
get :index, :format => 'csv'
|
get :index, :format => 'csv'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
Loading…
Reference in New Issue