remove excel export

This commit is contained in:
Devin Howard 2016-09-27 21:10:14 +08:00
parent 8f0b350a2d
commit a86101dda0
4 changed files with 0 additions and 19 deletions

View file

@ -4,8 +4,6 @@ class MapsController < ApplicationController
before_action :set_map, only: [:show, :update, :destroy, :access, :contains, :events, :export, :screenshot, :star, :unstar]
after_action :verify_authorized
respond_to :html, :json, :csv
autocomplete :map, :name, full: true, extra_data: [:user_id]
# GET maps/:id
@ -24,7 +22,6 @@ class MapsController < ApplicationController
end
format.json { render json: @map }
format.csv { redirect_to action: :export, format: :csv }
format.xls { redirect_to action: :export, format: :xls }
end
end
@ -118,7 +115,6 @@ class MapsController < ApplicationController
respond_to do |format|
format.json { render json: exporter.json }
format.csv { send_data exporter.csv }
format.xls { @spreadsheet = exporter.xls }
end
end

View file

@ -22,10 +22,6 @@ class MapExportService
end
end
def xls
to_spreadsheet
end
private
def topic_headings

View file

@ -1,9 +0,0 @@
<table>
<% @spreadsheet.each do |line| %>
<tr>
<% line.each do |field| %>
<td><%= field %></td>
<% end %>
</tr>
<% end %>
</table>

View file

@ -3,5 +3,3 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
Mime::Type.register 'application/xls', :xls