commit
9bdd889e32
7 changed files with 41 additions and 16 deletions
|
|
@ -14,12 +14,12 @@ module Admin
|
|||
format.json { render json: Booth.where(state: :confirmed, program: @program).to_json }
|
||||
format.xlsx do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
|
||||
render 'booths'
|
||||
render 'booths', layout: false
|
||||
end
|
||||
format.pdf { render 'booths' }
|
||||
format.pdf { render 'booths', layout: false }
|
||||
format.csv do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
|
||||
render 'booths'
|
||||
render 'booths', layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ module Admin
|
|||
format.json { render json: Event.where(state: :confirmed, program: @program).to_json }
|
||||
format.xlsx do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
|
||||
render 'events'
|
||||
render 'events', layout: false
|
||||
end
|
||||
format.pdf { render 'events' }
|
||||
format.pdf { render 'events', layout: false }
|
||||
format.csv do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
|
||||
render 'events'
|
||||
render 'events', layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,12 +15,22 @@ module Admin
|
|||
@registration_distribution = @conference.registration_distribution
|
||||
@affiliation_distribution = @conference.affiliation_distribution
|
||||
@code_of_conduct = @conference.code_of_conduct.present?
|
||||
@file_name = "registrations_for_#{@conference.short_title}"
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json do
|
||||
render json: RegistrationDatatable.new(view_context, conference: @conference)
|
||||
end
|
||||
format.pdf { render 'index', layout: false }
|
||||
format.xlsx do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
|
||||
render 'index', layout: false
|
||||
end
|
||||
format.csv do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
|
||||
render 'index', layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ module Admin
|
|||
format.json { render json: Track.where(state: :confirmed, program: @program).to_json }
|
||||
format.xlsx do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.xlsx\""
|
||||
render 'tracks'
|
||||
render 'tracks', layout: false
|
||||
end
|
||||
format.pdf { render 'tracks' }
|
||||
format.pdf { render 'tracks', layout: false }
|
||||
format.csv do
|
||||
response.headers['Content-Disposition'] = "attachment; filename=\"#{@file_name}.csv\""
|
||||
render 'tracks'
|
||||
render 'tracks', layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,16 @@
|
|||
- headers = ['Name', 'Email']
|
||||
- headers = ['Attended',
|
||||
'Name',
|
||||
'Nickname',
|
||||
'Affilιation',
|
||||
'Email',
|
||||
'Arrival',
|
||||
'Departure']
|
||||
= CSV.generate_line headers
|
||||
- @registrations.each do |registration|
|
||||
= CSV.generate_line([registration.name, registration.email])
|
||||
= CSV.generate_line([registration.attended ? 'X' : '',
|
||||
registration.name,
|
||||
registration.nickname,
|
||||
registration.affiliation,
|
||||
registration.email,
|
||||
registration.arrival.to_s,
|
||||
registration.departure.to_s])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue