Allow scheduling volunteers for sessions.
Also fix a small bug for admin registrations edit.
This commit is contained in:
parent
b664639817
commit
8e1d03a318
12 changed files with 110 additions and 31 deletions
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
= speaker_selector_input f
|
||||
|
||||
- if current_user.manages_volunteers?(@conference)
|
||||
= volunteer_selector_input f
|
||||
|
||||
= track_selector_input f
|
||||
|
||||
= f.input :event_type_id, as: :select,
|
||||
|
|
@ -67,8 +70,8 @@
|
|||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#event_speaker_ids').selectize({
|
||||
$('.js-userSelector').selectize({
|
||||
plugins: ['remove_button'],
|
||||
maxItems: 100
|
||||
} )
|
||||
})
|
||||
});
|
||||
|
|
|
|||
19
app/views/proposals/_speaker_info.haml
Normal file
19
app/views/proposals/_speaker_info.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.speakerinfo
|
||||
.row
|
||||
.col-md-4
|
||||
= image_tag speaker.profile_picture(:size => 120), class: 'img-responsive img-rounded'
|
||||
.col-md-8
|
||||
%h4
|
||||
= link_to speaker.name, user_path(speaker.id)
|
||||
%br
|
||||
- if speaker.email_public?
|
||||
= mail_to "#{ speaker.email }" do
|
||||
%i.fa.fa-envelope-o.fa-2x
|
||||
- if speaker.affiliation?
|
||||
.text-muted
|
||||
from
|
||||
= speaker.affiliation
|
||||
- if speaker.biography?
|
||||
.row.speakerbio
|
||||
.col-md-12
|
||||
= markdown(speaker.biography)
|
||||
11
app/views/proposals/_volunteer_info.haml
Normal file
11
app/views/proposals/_volunteer_info.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.speakerinfo
|
||||
.row
|
||||
.col-md-4
|
||||
= image_tag speaker.profile_picture(:size => 120), class: 'img-responsive img-rounded'
|
||||
.col-md-8
|
||||
%h4
|
||||
= link_to speaker.name, user_path(speaker.id)
|
||||
- if speaker.affiliation?
|
||||
.text-muted
|
||||
from
|
||||
= speaker.affiliation
|
||||
19
app/views/proposals/_volunteers_table.haml
Normal file
19
app/views/proposals/_volunteers_table.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
%table.table.table-striped#events
|
||||
- events.each do |event|
|
||||
%tr
|
||||
%td.col-md-7{style: "padding:20px 8px 20px 8px;"}
|
||||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||
%br
|
||||
%small.text-muted
|
||||
= event.event_type.title
|
||||
= "(#{event.event_type.length} min)"
|
||||
= "in #{event.track.name}" if event.track
|
||||
- if event.require_registration
|
||||
%br
|
||||
= link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger'
|
||||
|
||||
%td.col-md-2{style: "padding:20px 8px 20px 8px;"}
|
||||
- event_schedule = event.event_schedules.find_by(schedule_id: @program.selected_schedule_id)
|
||||
- if event_schedule.present?
|
||||
= inyourtz(event_schedule.start_time, @conference.timezone) do
|
||||
= event_schedule.start_time.strftime("%Y %B %e - %H:%M")
|
||||
|
|
@ -70,6 +70,9 @@
|
|||
%span{ title: event.state.humanize, class: "fa #{status_icon(event)}" }
|
||||
|
||||
%td.col-md-7{style: "padding:20px 8px 20px 8px;"}
|
||||
- if event.volunteers.include?(current_user)
|
||||
%strong You are volunteer host for:
|
||||
%br
|
||||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||
%br
|
||||
%small.text-muted
|
||||
|
|
@ -113,6 +116,13 @@
|
|||
method: :patch, class: 'btn btn-mini btn-success', id: "review_event_#{event.id}"
|
||||
= link_to 'Edit', edit_conference_program_proposal_path(@conference.short_title, event.id),
|
||||
class: 'btn btn-default', id: "edit_proposal_#{event.id}"
|
||||
|
||||
- if @volunteer_events.any?
|
||||
%h2
|
||||
Volunteer Events
|
||||
%small
|
||||
Thanks for being a host at #{@conference.title}
|
||||
= render 'volunteers_table', events: @volunteer_events
|
||||
.row
|
||||
.col-md-12
|
||||
- if can? :create, @event
|
||||
|
|
|
|||
|
|
@ -29,29 +29,20 @@
|
|||
|
||||
.row
|
||||
.col-md-3
|
||||
%h3
|
||||
- if @event.speakers.any?
|
||||
Presented by:
|
||||
%h3
|
||||
Presented by:
|
||||
- @speakers_ordered.each do |speaker|
|
||||
.speakerinfo
|
||||
.row
|
||||
.col-md-4
|
||||
= image_tag speaker.profile_picture(:size => 120), class: 'img-responsive img-rounded'
|
||||
.col-md-8
|
||||
%h4
|
||||
= link_to speaker.name, user_path(speaker.id)
|
||||
%br
|
||||
- if speaker.email_public?
|
||||
= mail_to "#{ speaker.email }" do
|
||||
%i.fa.fa-envelope-o.fa-2x
|
||||
- if speaker.affiliation?
|
||||
.text-muted
|
||||
from
|
||||
= speaker.affiliation
|
||||
-if speaker.biography?
|
||||
.row.speakerbio
|
||||
.col-md-12
|
||||
= markdown(speaker.biography)
|
||||
= render 'speaker_info', speaker: speaker
|
||||
/ end speakers.
|
||||
- if @event.volunteers.any?
|
||||
%h3
|
||||
Volunteer Hosts
|
||||
%br
|
||||
%small Thanks for helping with #{@conference.title}!
|
||||
- @event.volunteers.each do |volunteer|
|
||||
= render 'volunteer_info', speaker: volunteer, show_bio: false
|
||||
|
||||
.col-md-9
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
@ -93,9 +84,10 @@
|
|||
.col-md-12
|
||||
%dt Conference:
|
||||
%dd= link_to @event.program.conference.title, conference_path(@conference)
|
||||
.col-md-12
|
||||
%dt Language:
|
||||
%dd= @event.language if @event.language
|
||||
- if @event.language
|
||||
.col-md-12
|
||||
%dt Language:
|
||||
%dd= @event.language
|
||||
.col-md-12
|
||||
%dt Track:
|
||||
%dd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue