Add (admin-only) tickets via 'visibile' attribute [migration]
(cherry picked from commit ce0db3d7a736e7bcde480721986dbfb4a82aa083)
This commit is contained in:
parent
1fcd5c68c5
commit
26f0377c76
15 changed files with 56 additions and 10 deletions
|
|
@ -14,5 +14,6 @@
|
|||
= f.input :price
|
||||
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY', 'CHF'], include_blank: false
|
||||
= f.input :registration_ticket, hint: 'A registration ticket is with which user register for the conference.'
|
||||
= f.input :visible, hint: 'Only visible tickets are available to registrants. Non-visible tickets can only be managed by Admins.'
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
%th Sold
|
||||
%th Turnover
|
||||
%th Registration Ticket
|
||||
%th Visible?
|
||||
%th Actions
|
||||
%tbody
|
||||
- @conference.tickets.each do |ticket|
|
||||
|
|
@ -30,6 +31,8 @@
|
|||
= humanized_money_with_symbol ticket.tickets_turnover_total(ticket.id)
|
||||
%td
|
||||
= ticket.registration_ticket? ? 'Yes' : 'No'
|
||||
%td
|
||||
= ticket.visible? ? 'Yes' : 'No'
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||
= '(' + registered_text(event) + ')'
|
||||
|
||||
- if @conference.tickets.any?
|
||||
- if @conference.tickets.visible.any?
|
||||
.row
|
||||
.col-md-12
|
||||
-if @tickets.any?
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
%h1
|
||||
Tickets
|
||||
%p.lead
|
||||
Please choose your tickets for
|
||||
Please choose your tickets for
|
||||
%strong
|
||||
= @conference.title
|
||||
here*
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
%th Price
|
||||
%th Total
|
||||
%tbody
|
||||
- @conference.tickets.each do |ticket|
|
||||
- @conference.tickets.visible.each do |ticket|
|
||||
= render partial: 'ticket', f: f, locals: {ticket: ticket}
|
||||
%tr
|
||||
%td
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue