radiant-event_calendar-extension 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
@@ -1,5 +1,5 @@
1
1
  class EventCalendarExtension < Radiant::Extension
2
- version "1.3.1"
2
+ version "1.3.2"
3
3
  description "An event calendar extension that administers events locally or draws them from any ical or CalDAV publishers (Google Calendar, .Mac, Darwin Calendar Server, etc.)"
4
4
  url "http://github.com/radiant/radiant-event_calendar-extension"
5
5
 
@@ -735,37 +735,38 @@ module EventCalendarTags
735
735
  day_names = Date::DAYNAMES.dup
736
736
 
737
737
  cal = %(<table class="minimonth"><thead><tr>)
738
- cal << %(<th class="month_link"><a href="#{tag.locals.page.url(:year => previous.year, :month => previous.month)}" title="#{month_names[previous.month]}" class="previous">&lt;</a></th>) if with_paging
739
- cal << %(<th colspan="#{with_paging ? 5 : 7}" class="month_name">)
738
+ cal << %(<td class="m"><a href="#{tag.locals.page.url(:year => previous.year, :month => previous.month)}" title="#{month_names[previous.month]}" class="previous">&lt;</a></td>) if with_paging
739
+ cal << %(<td colspan="#{with_paging ? 5 : 7}"><h3>)
740
740
  cal << %(<a href="#{tag.locals.page.url(:year => first_day.year, :month => first_day.month)}">) if with_paging
741
741
  cal << %(#{month_names[first_day.month]} #{first_day.year})
742
742
  cal << %(</a>) if with_paging
743
- cal << %(</th>)
744
- cal << %(<th class="month_link"><a href="#{tag.locals.page.url(:year => following.year, :month => following.month)}" title="#{month_names[following.month]}" class="next">&gt;</a></th>) if with_paging
743
+ cal << %(</h3></td>)
744
+ cal << %(<td class="m"><a href="#{tag.locals.page.url(:year => following.year, :month => following.month)}" title="#{month_names[following.month]}" class="next">&gt;</a></td>) if with_paging
745
745
  cal << %(</tr><tr>)
746
746
  cal << day_names.map { |d| %{<th class="day_name" scope="col">#{d.first}</th>} }.join
747
747
  cal << "</tr></thead><tbody>"
748
748
 
749
749
  first_shown.upto(last_shown) do |day|
750
750
  events_today = tag.locals.events.select{ |e| e.on_this_day?(day) }
751
+ continuing_events = tag.locals.events.select{ |e| e.start_date <= day && e.end_date && e.end_date >= day }
751
752
  event_list = cell_text = date_label = ""
752
- cell_class = "day"
753
- cell_class += " today" if today?(day)
754
- cell_class += " past" if day < Date.today
755
- cell_class += " future" if day > Date.today
756
- cell_class += " other_month" if day.month != first_day.month
753
+ cell_class = "d"
754
+ cell_class += " t" if today?(day)
755
+ cell_class += " p" if day < Date.today
756
+ cell_class += " f" if day > Date.today
757
+ cell_class += " o" if day.month != first_day.month
757
758
  unless day.month != first_day.month
758
- cell_class += " weekend_day" if weekend?(day)
759
- cell_class += " weekend_today" if weekend?(day) && today?(day)
759
+ cell_class += " w" if weekend?(day)
760
760
  date_label = day.mday
761
761
  if events_today.any?
762
- cell_class += " eventful"
763
- cell_class += " eventful_weekend" if weekend?(day)
762
+ cell_class += " e"
764
763
  cell_class += events_today.map{|e| " #{e.slug}"}.join
765
764
  cell_url = day_links ? url(:day => day) : "#event_#{events_today.first.id}"
766
765
  date_label = %{<a href="#{cell_url}">#{date_label}</a>}
766
+ elsif continuing_events.any?
767
+ cell_class += " c"
767
768
  else
768
- cell_class += " uneventful"
769
+ cell_class += " u"
769
770
  end
770
771
  cell_text = %{#{date_label}#{event_list}}
771
772
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-event_calendar-extension}
8
- s.version = "1.3.1"
8
+ s.version = "1.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
12
- s.date = %q{2010-10-19}
12
+ s.date = %q{2010-10-20}
13
13
  s.description = %q{An event calendar extension that administers events locally or draws them from any ical or CalDAV publishers (Google Calendar, .Mac, Darwin Calendar Server, etc.)}
14
14
  s.email = %q{will@spanner.org}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-event_calendar-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 1
10
- version: 1.3.1
9
+ - 2
10
+ version: 1.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-19 00:00:00 +01:00
18
+ date: 2010-10-20 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency