diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 4c0528b79..41660f741 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -66,12 +66,12 @@
<% other_formats_links do |f| %>
<%= 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 %>
<% end %>
-
<%= l(:label_export_options, :export_format => 'CSV') %>
+
<%= l(:label_export_options, :export_format => 'CSV') %>
<%= form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
@@ -80,6 +80,11 @@
+ <% if @issue_count > Setting.issues_export_limit.to_i %>
+
+ <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
+
+ <% end %>
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 89d47f456..e42b85d40 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -373,6 +373,20 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'form#csv-export-form[action=/issues.csv]'
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
get :index, :format => 'csv'
assert_response :success