Sha256: 32463c1a548cad00922bb42dc159fcff8619a840d2d1cecaff79493270995c32

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

module RedmineCrm
  module CalendarsHelper

    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

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redmine_crm-0.0.63 lib/redmine_crm/helpers/calendars_helper.rb
redmine_crm-0.0.62 lib/redmine_crm/helpers/calendars_helper.rb