Skip to content

Instantly share code, notes, and snippets.

Created March 24, 2011 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/885960 to your computer and use it in GitHub Desktop.
Save anonymous/885960 to your computer and use it in GitHub Desktop.
options[:event_strips].each do |strip|
strip[row_num*7, 7].each_with_index do |event, index|
if event
dates = event.clip_range(first_day_of_week, last_day_of_week)
end
cal << %(<tr>)
first_day_of_week.upto(last_day_of_week) do |day|
if event
debugger
end
cal << %(<td class="ec-day-header )
cal << %(ec-event-header ) if event and (day.to_date == dates[0])
cal << %(ec-today-header ) if options[:show_today] and (day == Date.today)
cal << %(ec-other-month-header ) if (day < first) || (day > last)
cal << %(ec-weekend-day-header) if weekend?(day)
cal << %(" style="height: #{options[:day_nums_height]}px;">)
if options[:link_to_day_action]
cal << day_link(day.day, day, options[:link_to_day_action])
else
cal << %(#{day.day})
end
cal << %(</td>)
end
cal << %(</tr>)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment