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
|
|
@ -223,13 +223,6 @@ class Event < ActiveRecord::Base
|
|||
(100 * result.values.count(true) / result.values.compact.count).to_s
|
||||
end
|
||||
|
||||
##
|
||||
# Returns the number of columns this event should span in the schedule
|
||||
#
|
||||
def span
|
||||
self.event_type.length / EventType::LENGTH_STEP
|
||||
end
|
||||
|
||||
##
|
||||
# Returns end of the event
|
||||
#
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class EventType < ActiveRecord::Base
|
|||
|
||||
alias_attribute :name, :title
|
||||
|
||||
# If LENGTH_STEP > 60 the public schedule must be changed
|
||||
# If LENGTH_STEP must be divisor of 60, otherwise the schedule wont be displayed properly
|
||||
LENGTH_STEP = 15
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue