Merge branch 'master' into issue_1608

This commit is contained in:
Stella Rouzi 2017-08-11 12:06:27 +03:00 committed by GitHub
commit 678d0ae90e
12 changed files with 44 additions and 6 deletions

View file

@ -50,7 +50,7 @@ module Admin
private
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, :registration_ticket)
end
end
end

View file

@ -13,5 +13,6 @@
= f.input :description, input_html: { rows: 5, data: { provide: "markdown-editable" } }
= f.input :price
= f.input :price_currency, as: :select, class: 'form-control', collection: ['USD', 'EUR', 'GBP', 'INR', 'CNY'], include_blank: false
= f.input :registration_ticket, hint: 'A registration ticket is with which user register for the conference.'
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -14,6 +14,7 @@
%th Price
%th Sold
%th Turnover
%th Registration Ticket
%th Actions
%tbody
- @conference.tickets.each do |ticket|
@ -27,6 +28,8 @@
= ticket.tickets_sold
%td
= humanized_money_with_symbol ticket.tickets_turnover
%td
= ticket.registration_ticket? ? 'Yes' : 'No'
%td
.btn-group
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, ticket.id),

View file

@ -7,7 +7,10 @@
%span.icon-bar
%span.icon-bar
%span.icon-bar
= link_to (ENV['OSEM_NAME'] || 'OSEM'), root_path, class: 'navbar-brand', title: 'Open Source Event Manager'
- if conference.nil? || conference.new_record?
= link_to (ENV['OSEM_NAME'] || 'OSEM'), root_path, class: 'navbar-brand', title: 'Open Source Event Manager'
- else
= link_to conference.organization.name, organizations_path, class: 'navbar-brand', title: 'Open Source Event Manager'
.collapse.navbar-collapse
- if content_for :splash_nav
%ul.nav.navbar-nav#splash-nav

View file

@ -21,7 +21,7 @@
= yield(:head)
%body
= render 'layouts/navigation'
= render 'layouts/navigation', conference: @conference
-# Admin area
- if controller.class.name.split("::").first=="Admin"
= render 'layouts/admin'