summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-02 07:22:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-02 07:22:45 +0000
commit501111708657d54eccefaa6d82b465d471b65ef9 (patch)
treec74c3f122bbe3bc791dac40d9e2c1c9df88e4dd4 /app/views/projects
parentf1f913afc655e66a2b5a4a7b42e1059b0d874ddb (diff)
downloadredmine-501111708657d54eccefaa6d82b465d471b65ef9.tar.gz
redmine-501111708657d54eccefaa6d82b465d471b65ef9.zip
Fix CSV export of projects (#29482).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18888 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_list.html.erb16
-rw-r--r--app/views/projects/index.html.erb3
2 files changed, 19 insertions, 0 deletions
diff --git a/app/views/projects/_list.html.erb b/app/views/projects/_list.html.erb
index 298ec8ca7..8f1f6d974 100644
--- a/app/views/projects/_list.html.erb
+++ b/app/views/projects/_list.html.erb
@@ -34,3 +34,19 @@
</table>
</div>
<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
+
+<div id="csv-export-options" style="display:none;">
+ <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
+ <%= form_tag(projects_path(:format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
+ <%= query_as_hidden_field_tags(@query) %>
+ <p>
+ <label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
+ <label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
+ </p>
+ <%= export_csv_encoding_select_tag %>
+ <p class="buttons">
+ <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false } %>
+ <%= link_to_function l(:button_cancel), "hideModal(this);" %>
+ </p>
+ <% end %>
+</div>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 59fc4e6e2..4afb5de19 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -29,6 +29,9 @@
<% end %>
<% other_formats_links do |f| %>
+ <% if @query.display_type == 'list' %>
+ <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %>
+ <% end %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
<% end %>