ical 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,7 @@ module CalendarHelper
32
32
  options = options_from_hash(args)
33
33
  day_method = options.delete(:day_method) || :date
34
34
  id_pattern = options.delete(:id) || 'day-%d'
35
+ special_klass = options.delete(:special_klass) || nil
35
36
 
36
37
  # status
37
38
  tbody do
@@ -48,7 +49,7 @@ module CalendarHelper
48
49
  yield(day, nil)
49
50
  concat("</td>")
50
51
  end
51
- concat(tag(:td, td_options(day, id_pattern, status), true))
52
+ concat(tag(:td, td_options(day, id_pattern, status, special_klass), true))
52
53
  yield(day, objects)
53
54
  concat('</td>')
54
55
  concat('</tr>') if(day.wday == @calendar.last_weekday)
@@ -62,7 +63,7 @@ module CalendarHelper
62
63
  @calendar.objects_for_days(@objects)
63
64
  end
64
65
 
65
- def td_options(day, id_pattern, status)
66
+ def td_options(day, id_pattern, status, special_klass)
66
67
  options = {}
67
68
  css_classes = []
68
69
  css_classes << 'today' if day.strftime("%Y-%m-%d") == @today.strftime("%Y-%m-%d")
@@ -71,6 +72,7 @@ module CalendarHelper
71
72
  css_classes << 'weekend' if day.wday == 0 or day.wday == 6
72
73
  css_classes << 'future' if day > @today.to_date
73
74
  css_classes << status
75
+ css_classes << special_klass if special_klass
74
76
  options[:class] = css_classes.join(' ') unless css_classes.empty?
75
77
  options[:id] = day.strftime(id_pattern) if id_pattern
76
78
  options
@@ -1,3 +1,3 @@
1
1
  module Ical
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: