The schedule takes you to the current day and time

The schedule takes you to the current day and time in case that the current date belongs to the conference schedule.

Closes https://github.com/openSUSE/osem/issues/1057
This commit is contained in:
Ana 2016-07-02 17:23:56 +02:00
parent 39c4261859
commit bf7f5ce09f
5 changed files with 50 additions and 12 deletions

View file

@ -24,6 +24,13 @@ class ConferenceController < ApplicationController
@conf_start = 9
conf_end = 20
@conf_period = conf_end - @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)
end
def events