Skip to content

Instantly share code, notes, and snippets.

@amrnt
Created March 1, 2010 21:07
Show Gist options
  • Save amrnt/318812 to your computer and use it in GitHub Desktop.
Save amrnt/318812 to your computer and use it in GitHub Desktop.
-from = 12.00
-to = 23.00
%table.time-table
%tr
%th  
-h = from
-until h >= to do
%th{ :colspan => 4 }= h
-h+=1
//start - fix colspan of the moives
%tr.nil
%th.nil
-i = from
-until i >= to do
%th.nil
-i+=0.25
//end - fix colspan of the moives
-@periods_days.each do |periods|
%tr
%td.period
= periods[0].start_at.strftime('%a, %h %d')
-j = from
-until j >= to do
-founded = false
-periods.each do |period|
-if j == (time_to_float(period.start_at))
-founded = true
-j = time_to_float(period.end_at) - 0.25
%td.movie-area{:colspan => colspan(period.start_at, period.end_at)}
= link_to period.show.name, period.show
%br
= time_to_float(period.start_at)
to
= time_to_float(period.end_at)
-break
-if founded==false && j
%td  
-j = j+0.25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment