add ticket payment_mode in organiser's views

This commit is contained in:
Rishabh Saxena 2016-05-30 19:32:33 +05:30
parent a8fd1a7903
commit e2a9dd1db1
3 changed files with 5 additions and 1 deletions

View file

@ -48,7 +48,7 @@ module Admin
private private
def ticket_params def ticket_params
params.require(:ticket).permit(:conference, :title, :url, :description, :conference_id, :price_cents, :price_currency, :price) params.require(:ticket).permit(:conference, :title, :url, :description, :conference_id, :price_cents, :price_currency, :price, :payment_mode)
end end
end end
end end

View file

@ -13,5 +13,6 @@
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } } = f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :price = f.input :price
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false = f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false
= f.input :payment_mode, as: :select, class: 'form-control', collection: ['Online', 'Offline'], include_blank: false
%p.text-right %p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' } = f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -13,6 +13,7 @@
%th Price %th Price
%th Sold %th Sold
%th Turnover %th Turnover
%th Payment Mode
%th Actions %th Actions
%tbody %tbody
- @conference.tickets.each do |ticket| - @conference.tickets.each do |ticket|
@ -26,6 +27,8 @@
= ticket.tickets_sold = ticket.tickets_sold
%td %td
= humanized_money_with_symbol ticket.tickets_turnover = humanized_money_with_symbol ticket.tickets_turnover
%td
= ticket.payment_mode
%td %td
.btn-group .btn-group
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id), = link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),