Make ticket layout configurable
This commit is contained in:
parent
f37d3095e1
commit
a21d95c486
7 changed files with 19 additions and 1 deletions
|
|
@ -211,7 +211,7 @@ module Admin
|
|||
:vpositions_attributes, :use_volunteers, :color,
|
||||
:sponsorship_levels_attributes, :sponsors_attributes,
|
||||
:targets, :targets_attributes,
|
||||
:campaigns, :campaigns_attributes, :registration_limit, :organization_id)
|
||||
:campaigns, :campaigns_attributes, :registration_limit, :organization_id, :ticket_layout)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class Conference < ActiveRecord::Base
|
|||
:end_date,
|
||||
:start_hour,
|
||||
:end_hour,
|
||||
:ticket_layout,
|
||||
:organization, presence: true
|
||||
|
||||
validates :short_title, uniqueness: true
|
||||
|
|
@ -73,6 +74,11 @@ class Conference < ActiveRecord::Base
|
|||
after_create :create_free_ticket
|
||||
after_update :delete_event_schedules
|
||||
|
||||
enum ticket_layout: {
|
||||
vertical: 0,
|
||||
horizontal: 1
|
||||
}
|
||||
|
||||
##
|
||||
# Checks if the user is registered to the conference
|
||||
#
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
= f.input :short_title, hint: "A short title, e.g. 'oSC14', to be used in URLs"
|
||||
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } }
|
||||
= f.input :color, hint: 'The color will be used eg for the dashboard.', input_html: {size: 6, type: 'color'}
|
||||
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
|
||||
= f.label 'Conference Logo'
|
||||
%br
|
||||
- if @conference.picture?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue