Commit 0ee69a4d authored by jon richter's avatar jon richter

Merge branch 'fix/246' into 'deployment'

attempt correcting display of overlapping events

Closes #246 and #243

See merge request degrowth/scriptorium!22
parents 3ed23eb1 bf9542f5
......@@ -94,12 +94,22 @@ div.event {
div.event.fatal {
background: #EE3333;
overflow: hidden;
}
div.event.fatal > p.small {
display: none;
}
div.event.warning {
background: #EEEE00;
}
div#event-pane {
float: left;
width: 100%;
}
div.unscheduled-event {
background: #F9F9F9;
border: 1px solid #EEEEEE;
......
.event{ :id => "event_#{event.id}",
:style => "height: #{event.time_slots * 20 - 7}px;",
:class => event.conflict_level,
:"data-update-url" => schedule_update_event_path(:id => event.id),
:"data-room" => event.room ? event.room.name.downcase : nil,
:"data-time" => event.start_time ? event.start_time.to_s(:rfc822) : nil }
= link_to event.title, event
%p.small
= by_speakers(event)
(
= event.track.try(:name)
\/
= event.event_type
)
- events_without_time_slots = 0
- events_without_room = 0
- @scheduled_events.each do |event|
- if event.time_slots != nil && event.room != nil
.event{ :id => "event_#{event.id}",
:style => "height: #{event.time_slots * 20 - 7}px;",
:class => event.conflict_level,
:"data-update-url" => schedule_update_event_path(:id => event.id),
:"data-room" => event.room ? event.room.name.downcase : nil,
:"data-time" => event.start_time ? event.start_time.to_s(:rfc822) : nil }
= link_to event.title, event
%p.small
= by_speakers(event)
(
= event.track.try(:name)
\/
= event.event_type
)
- if event.time_slots == nil
- events_without_time_slots += 1
- if event.room == nil
- events_without_room += 1
- if events_without_room != 0 || events_without_time_slots != 0
%h2 Events on this day
- if events_without_room > 0
%h3 missing a room
- @scheduled_events.each do |event|
- if event.room == nil
%li.unscheduled-event{ :id => "event_#{event.id}",
:"data-update-url" => schedule_update_event_path(:id => event.id) }
= link_to event.title, event
- if events_without_time_slots > 0
%h3 missing time slots
- @scheduled_events.each do |event|
- if event.time_slots == nil
%li.unscheduled-event{ :id => "event_#{event.id}",
:"data-update-url" => schedule_update_event_path(:id => event.id) }
= link_to event.title, event
- @unscheduled_events.each do |event|
%li.unscheduled-event{ :id => "event_#{event.id}",
:"data-update-url" => schedule_update_event_path(:id => event.id) }
= link_to event.title, "#"
- if @unscheduled_events != nil
%h2 Accepted events with
%h3 no start time or room assigned
- @unscheduled_events.each do |event|
- if event.time_slots != nil
%li.unscheduled-event{ :id => "event_#{event.id}",
:"data-update-url" => schedule_update_event_path(:id => event.id),
:"data-height" => (event.time_slots * 20 - 7) }
= link_to event.title, event
%h3 nothing assigned
- @unscheduled_events.each do |event|
- if event.time_slots == nil
%li.unscheduled-event{ :id => "event_#{event.id}",
:"data-update-url" => schedule_update_event_path(:id => event.id) }
= link_to event.title, event
......@@ -65,8 +65,10 @@
- slot += 1
.clear
#event-pane
- @scheduled_events.each do |event|
= render 'event', :event => event
%ul#scheduled-events
= render 'event'
%ul#unscheduled-events
= render 'unscheduled_events'
#add-event-modal.modal{:style => "display: none;"}
.modal-header
= link_to "×", "#", :class => "close"
......@@ -81,9 +83,6 @@
= tag("br")
= label_tag "session_type_select", "Filter by Type"
= select_tag "session_type_select", content_tag(:option, "All", selected: true) + content_tag(:option, "Special Session") + options_for_select(Event::TYPES)
%p
%ul#unscheduled-events
= render 'unscheduled_events'
.modal-footer
 
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment