mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
add missing code for pdf csv xlsx in registrations
This commit is contained in:
parent
140a50afde
commit
c27483301a
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue