Adapt public schedule to use the confence hours

This commit is contained in:
Ana 2016-08-15 13:11:33 +02:00 committed by Ana María Martínez Gómez
parent 7eb9a57c34
commit b3bbaf87a4

View file

@ -14,16 +14,15 @@ class SchedulesController < ApplicationController
@events_xml = schedules.map(&:event).group_by{ |event| event.time.to_date } if schedules
@dates = @conference.start_date..@conference.end_date
@step_minutes = EventType::LENGTH_STEP.minutes
@conf_start = 9
conf_end = 20
@conf_period = conf_end - @conf_start
@conf_start = @conference.start_hour
@conf_period = @conference.end_hour - @conf_start
# the schedule takes you to today if it is a date of the schedule
@current_day = @conference.current_conference_day
@day = @current_day.present? ? @current_day : @dates.first
return unless @current_day
# the schedule takes you to the current time if it is beetween the start and the end time.
@hour_column = @conference.hours_from_start_time(@conf_start, conf_end)
@hour_column = @conference.hours_from_start_time(@conf_start, @conference.end_hour)
end
def events