Handle cancelation of scheduled events
This commit is contained in:
parent
63750345e7
commit
a071d4497b
5 changed files with 50 additions and 0 deletions
|
|
@ -33,6 +33,11 @@
|
|||
- span -= 1
|
||||
- else
|
||||
- event = events.find{|e| e.start_time <= start_room_time and e.end_time > start_room_time}
|
||||
|
||||
- if event && (event.state == 'canceled' || event.state == 'withdrawn') && !event.intersecting_events.confirmed.empty?
|
||||
- replacement_event = event.intersecting_events.confirmed.first
|
||||
- event = (replacement_event.start_time <= start_room_time && replacement_event.end_time > start_room_time) ? replacement_event : nil
|
||||
|
||||
- if event
|
||||
/ There is an event, calculate the span and show it
|
||||
- event_span = (event.end_time.to_i - start_room_time.to_i) / 60 / EventType::LENGTH_STEP
|
||||
|
|
|
|||
|
|
@ -4,7 +4,14 @@
|
|||
%a.unstyled-link{href: url_for(conference_program_proposal_path(@conference.short_title, event.id))}
|
||||
%div{ class: "elipsis break-words event-title", |
|
||||
style: "-webkit-line-clamp: #{ event_lines(@rooms) }; height: #{ event_height(@rooms) }px;"} |
|
||||
|
||||
- if event.state == 'canceled' || event.state == 'withdrawn'
|
||||
%span.label.label-danger.schedule-label CANCELED
|
||||
- elsif event.state == 'confirmed' && (!event.intersecting_events.canceled.empty? || !event.intersecting_events.withdrawn.empty?)
|
||||
%span.label.label-info.schedule-label REPLACEMENT
|
||||
|
||||
= event.title
|
||||
|
||||
- if speaker = event.speakers.first
|
||||
= image_tag speaker.gravatar_url, :class => "img-circle pull-right speaker-pic", |
|
||||
:alt => speaker.name, |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue