Module: Redmineup::CalendarsHelper
- Defined in:
- lib/redmineup/helpers/calendars_helper.rb
Instance Method Summary collapse
Instance Method Details
#calendar_day_css_classes(calendar, day) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/redmineup/helpers/calendars_helper.rb', line 4 def calendar_day_css_classes(calendar, day) css = day.month==calendar.month ? +'even' : +'odd' css << " today" if User.current.today == day css << " nwday" if non_working_week_days.include?(day.cwday) css end |
#non_working_week_days ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/redmineup/helpers/calendars_helper.rb', line 11 def non_working_week_days @non_working_week_days ||= begin days = Setting.non_working_week_days if days.is_a?(Array) && days.size < 7 days.map(&:to_i) else [] end end end |