Introduced Physical Ticket
Added PhysicalTicket model and controller. It holds the information about each physical ticket bought at the purchase. Physical Tickets are created after every successfull payment.
This commit is contained in:
parent
1c38b091cc
commit
5c56683ae8
17 changed files with 115 additions and 12 deletions
|
|
@ -38,3 +38,5 @@
|
|||
= link_to 'Subscribe', conference_subscriptions_path(conference.short_title), method: :post, class: 'btn btn-default'
|
||||
- else
|
||||
= link_to 'Unsubscribe', conference_subscriptions_path(conference.short_title), method: :delete, class: 'btn btn-default'
|
||||
- if current_user && current_user.physical_tickets.by_conference(conference).any?
|
||||
= link_to "My Tickets", conference_physical_ticket_index_path(conference.short_title), class: 'btn btn-default'
|
||||
|
|
|
|||
35
app/views/physical_ticket/index.html.haml
Normal file
35
app/views/physical_ticket/index.html.haml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12.page-header
|
||||
%h2
|
||||
Tickets
|
||||
.text-muted
|
||||
Your tickets for the conference
|
||||
|
||||
.col-md-12
|
||||
- if @physical_tickets.present?
|
||||
%table.table.table-bordered.table-striped.table-hover#roles
|
||||
%thead
|
||||
%th ID
|
||||
%th Type
|
||||
%th User
|
||||
%th Actions
|
||||
%tbody
|
||||
- @physical_tickets.each do |physical_ticket|
|
||||
%tr
|
||||
%td= physical_ticket.id
|
||||
%td= physical_ticket.ticket.title
|
||||
%td= physical_ticket.user.name
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Show',
|
||||
conference_physical_ticket_path(@conference.short_title,
|
||||
physical_ticket.id),
|
||||
class: 'btn btn-primary'
|
||||
= link_to 'Generate PDF',
|
||||
conference_physical_ticket_path(@conference.short_title,
|
||||
physical_ticket.id,
|
||||
format: :pdf),
|
||||
class: 'button btn btn-default btn-info'
|
||||
- else
|
||||
%h5 No Tickets found!
|
||||
0
app/views/physical_ticket/show.html.haml
Normal file
0
app/views/physical_ticket/show.html.haml
Normal file
Loading…
Add table
Add a link
Reference in a new issue