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
} )
});

View file

@ -3,8 +3,9 @@
%meta{ property: "og:url", content: conference_program_proposal_url(@conference.short_title, @event) }
%meta{ property: "og:description", content: @event.abstract }
%meta{ property: "og:site_name", content: (ENV['OSEM_NAME'] || 'OSEM') }
%meta{ property: "og:image", content: @speaker.gravatar_url }
%meta{ property: "og:image:secure_url", content: @speaker.gravatar_url }
- if @speakers_ordered.any?
%meta{ property: "og:image", content: @speakers_ordered.first.gravatar_url }
%meta{ property: "og:image:secure_url", content: @speakers_ordered.first.gravatar_url }
.container
.row
@ -25,21 +26,25 @@
.row
.col-md-3
.speakerinfo
.col-md-12
= image_tag @speaker.gravatar_url(size: 200), class: 'img-responsive img-rounded'
.col-md-12
%h3
by
= link_to @speaker.name, user_path(@speaker.id)
= "(#{@speaker.email})" if @speaker.email_public
- if @speaker.affiliation?
%br
%span.muted
from
= @speaker.affiliation
-if @speaker.biography?
= markdown(@speaker.biography)
%h3
Presented by:
- @speakers_ordered.each do |speaker|
.speakerinfo
.row
.col-md-4
= image_tag speaker.gravatar_url(:size => 120), class: 'img-responsive img-rounded'
.col-md-8
%h4
= link_to speaker.name, user_path(speaker.id)
= "(#{speaker.email})"
- if speaker.affiliation?
.text-muted
from
= speaker.affiliation
-if speaker.biography?
.row.speakerbio
.col-md-12
= markdown(speaker.biography)
.col-md-9
.row
.col-md-12