diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb index 715667c15..a807ec426 100644 --- a/app/helpers/calendars_helper.rb +++ b/app/helpers/calendars_helper.rb @@ -55,4 +55,10 @@ module CalendarsHelper def link_to_month(link_name, year, month, options={}) link_to(link_name, {:params => request.query_parameters.merge(:year => year, :month => month)}, options) end + + def calendar_day_css_classes(calendar, day) + css = day.month==calendar.month ? 'even' : 'odd' + css << " today" if User.current.today == day + css + end end diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index 852ab5235..dce3c8b52 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -8,7 +8,7 @@ <% day = calendar.startdt while day <= calendar.enddt %> <%= ("
<%= day.day %>
<% calendar.events_on(day).each do |i| %> <% if i.is_a? Issue %>