Adapting number of columns in the carousel schedule taking screen width into account
This commit is contained in:
parent
d8f9de9363
commit
53b02d6a74
8 changed files with 235 additions and 97 deletions
|
|
@ -16,14 +16,10 @@ class ConferenceController < ApplicationController
|
|||
@events = @conference.program.events
|
||||
@events_xml = @events.scheduled.order(start_time: :asc).group_by{ |event| event.start_time.to_date }
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
|
||||
@number_columns = 1
|
||||
@step_minutes = EventType::LENGTH_STEP.minutes
|
||||
@conf_start = 9
|
||||
conf_end = 20
|
||||
@intervals = @number_columns * 60 / EventType::LENGTH_STEP + 1
|
||||
@width = 85 / @intervals
|
||||
@step_minutes = EventType::LENGTH_STEP.minutes
|
||||
@carousel_number = ((conf_end - @conf_start) / @number_columns.to_f).ceil
|
||||
@conf_period = conf_end - @conf_start
|
||||
|
||||
if @dates == Date.current
|
||||
@today = Date.current.strftime('%Y-%m-%d')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue