Unscheduled events added to all events
Unscheduled events added to all events of the schedule
This commit is contained in:
parent
69043e1549
commit
cc031b9f3a
4 changed files with 27 additions and 0 deletions
|
|
@ -171,6 +171,9 @@ td.no-padding{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unscheduled-event{
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.all-speaker-pic{
|
.all-speaker-pic{
|
||||||
padding: 20px 10px 20px 10px;
|
padding: 20px 10px 20px 10px;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ class ConferenceController < ApplicationController
|
||||||
@conf_period = conf_end - @conf_start
|
@conf_period = conf_end - @conf_start
|
||||||
|
|
||||||
@scheduled_events = @conference.program.events.scheduled
|
@scheduled_events = @conference.program.events.scheduled
|
||||||
|
@unscheduled_events = @conference.program.events.unscheduled
|
||||||
|
|
||||||
if @dates == Date.current
|
if @dates == Date.current
|
||||||
@today = Date.current.strftime('%Y-%m-%d')
|
@today = Date.current.strftime('%Y-%m-%d')
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ class Program < ActiveRecord::Base
|
||||||
where.not(start_time: nil).where.not(room: nil).order(start_time: :asc)
|
where.not(start_time: nil).where.not(room: nil).order(start_time: :asc)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def unscheduled
|
||||||
|
confirmed.where('start_time IS NULL OR room_id IS NULL')
|
||||||
|
end
|
||||||
|
|
||||||
def highlights
|
def highlights
|
||||||
where(state: :confirmed, is_highlight: true)
|
where(state: :confirmed, is_highlight: true)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<h1 class="text-center">Program for <%= @conference.title %></h1>
|
<h1 class="text-center">Program for <%= @conference.title %></h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<!-- scheduled events -->
|
||||||
<% date = nil %>
|
<% date = nil %>
|
||||||
<% time = nil %>
|
<% time = nil %>
|
||||||
<% @scheduled_events.each do |event| %>
|
<% @scheduled_events.each do |event| %>
|
||||||
|
|
@ -26,4 +28,21 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<!-- confirmed events that are not scheduled -->
|
||||||
|
<% if @unscheduled_events.any? %>
|
||||||
|
<div class='col-xs-12 col-md-12 all-events-title'>
|
||||||
|
<span class='date-title' id='program-unscheduled'>
|
||||||
|
Unscheduled events
|
||||||
|
</span>
|
||||||
|
<a title="Go up" class="pull-right" href="#program">
|
||||||
|
<i class="fa fa-angle-double-up fa-lg" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% @unscheduled_events.each do |event| %>
|
||||||
|
<div class='col-xs-12 col-md-12 unscheduled-event'>
|
||||||
|
<%= render partial: 'event', locals: {event: event} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue