implement manual event management and support for multiple speakers per event

This commit is contained in:
Eugene Dubinin 2017-02-02 16:34:59 +02:00
parent 46a6a59622
commit 790e2fd3a2
24 changed files with 180 additions and 89 deletions

View file

@ -4,6 +4,10 @@
= f.input :subtitle, as: :string
= f.input :speakers, as: :select,
collection: options_for_select(@users.map {|user| ["#{user.name} (#{user.email})", user.id]}, @event.speakers.map(&:id)),
include_blank: false, label: 'Speakers', input_html: { class: 'select-help-toggle', multiple: 'true' }
- if @program.tracks.any?
= f.input :track_id, as: :select,
collection: @program.tracks.map {|track| ["#{track.name}", track.id] },
@ -60,4 +64,15 @@
%p.text-right
= f.submit 'Update Proposal', class: 'btn btn-success'
- if @event.new_record?
= f.submit 'Create Proposal', class: 'btn btn-success'
- else
= f.submit 'Update Proposal', class: 'btn btn-success'
:javascript
$(document).ready(function() {
$('#event_speaker_ids').selectize({
plugins: ['remove_button'],
maxItems: 5
} )
});