Fixed Export Pdf button on admin registration page
This commit is contained in:
parent
b0bc9d4cb0
commit
e8e37e0a60
2 changed files with 8 additions and 1 deletions
|
|
@ -30,6 +30,13 @@ module Admin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@file_name = "ticket_for_#{@conference.short_title}"
|
||||||
|
respond_to do |format|
|
||||||
|
format.pdf {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if can? :destroy, @registration
|
if can? :destroy, @registration
|
||||||
@registration.destroy
|
@registration.destroy
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
method: :get, class: 'btn btn-primary'
|
method: :get, class: 'btn btn-primary'
|
||||||
= link_to 'Delete', admin_conference_registration_path(@conference.short_title, registration),
|
= link_to 'Delete', admin_conference_registration_path(@conference.short_title, registration),
|
||||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Registration for #{registration.name}?" }
|
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete the Registration for #{registration.name}?" }
|
||||||
= link_to 'Export Ticket', conference_conference_registration_path(@conference.short_title, format: :pdf), class: 'btn btn-success'
|
= link_to 'Export Ticket', admin_conference_registration_path(@conference.short_title, registration, format: :pdf), class: 'btn btn-success'
|
||||||
- @registrations.each_with_index do |registration, index|
|
- @registrations.each_with_index do |registration, index|
|
||||||
.questions{class: "question#{index}", style: 'display:none;'}
|
.questions{class: "question#{index}", style: 'display:none;'}
|
||||||
= render partial: 'questions', locals: { registration: registration }
|
= render partial: 'questions', locals: { registration: registration }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue