2013-06-19 13:58:48 +02:00
|
|
|
class ScheduleController < ApplicationController
|
2014-06-28 11:32:17 +03:00
|
|
|
layout 'application'
|
2013-06-19 13:58:48 +02:00
|
|
|
|
|
|
|
|
def index
|
2014-06-28 11:32:17 +03:00
|
|
|
@conference = Conference.includes(:rooms, events: [:speakers, :track, :event_type]).
|
|
|
|
|
where('conferences.short_title' => params[:conference_id]).first
|
2013-07-16 18:16:37 +02:00
|
|
|
@rooms = @conference.rooms
|
2013-06-19 13:58:48 +02:00
|
|
|
@events = @conference.events
|
|
|
|
|
@dates = @conference.start_date..@conference.end_date
|
2013-07-29 02:01:24 +03:00
|
|
|
|
|
|
|
|
if @dates === Date.current
|
2014-06-28 11:32:17 +03:00
|
|
|
@today = Date.current.strftime('%Y-%m-%d')
|
2013-07-29 08:48:04 +03:00
|
|
|
else
|
2014-06-28 11:32:17 +03:00
|
|
|
@today = @conference.start_date.strftime('%Y-%m-%d')
|
2013-06-19 13:58:48 +02:00
|
|
|
end
|
2013-07-29 02:01:24 +03:00
|
|
|
end
|
2013-06-19 13:58:48 +02:00
|
|
|
end
|