radiant-taggable_events-extension 1.3.0 → 1.3.1

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.0
1
+ 1.3.1
@@ -5,7 +5,7 @@ module TaggableEventTags
5
5
  desc %{
6
6
  Presents a tag cloud built from the current set of events.
7
7
 
8
- See r:tag_cloud for formatting and linking parameters. By default we show the top 100 most used tags.
8
+ See r:tag_cloud for formatting and linking parameters. By default we show the top 50 most used tags.
9
9
 
10
10
  *Usage:*
11
11
  <pre><code><r:events:tag_cloud /></code></pre>
@@ -13,7 +13,7 @@ module TaggableEventTags
13
13
  tag 'events:tag_cloud' do |tag|
14
14
  options = tag.attr.dup
15
15
  tag.locals.events ||= get_events(tag)
16
- limit = options.delete('limit') || 100
16
+ limit = options.delete('limit') || 50
17
17
  tag.locals.tags = Tag.sized(Tag.attached_to(tag.locals.events).most_popular(limit))
18
18
  tag.render('tags:cloud', options)
19
19
  end
@@ -21,15 +21,28 @@ module TaggableEventTags
21
21
  desc %{
22
22
  Presents a tag cloud built from the entire population of events.
23
23
 
24
- See r:tag_cloud for formatting and linking parameters. By default we show the top 100 most used tags.
24
+ See r:tag_cloud for formatting and linking parameters. By default we show the top 50 most used tags.
25
25
 
26
26
  *Usage:*
27
27
  <pre><code><r:all_events:tag_cloud /></code></pre>
28
28
  }
29
29
  tag 'all_events:tag_cloud' do |tag|
30
30
  options = tag.attr.dup
31
- limit = options.delete('limit') || 100
31
+ limit = options.delete('limit') || 50
32
32
  tag.locals.tags = Tag.sized(Tag.attached_to(tag.locals.events).most_popular(limit))
33
33
  tag.render('tags:cloud', options)
34
34
  end
35
+
36
+ def event_finder_with_tags(tag)
37
+ ef = event_finder_without_tags(tag)
38
+ ef = ef.from_all_tags(Tag.from_list(tag.attr['tags'])) unless tag.attr['tags'].blank?
39
+ ef
40
+ end
41
+
42
+ def self.included(base)
43
+ base.class_eval {
44
+ alias_method_chain :event_finder, :tags
45
+ }
46
+ end
47
+
35
48
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-taggable_events-extension}
8
- s.version = "1.3.0"
8
+ s.version = "1.3.1"
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-21}
12
+ s.date = %q{2010-12-09}
13
13
  s.description = %q{A tiny bit of glue to attach tags to event_calendar events and define some radius tags useful on calendar pages}
14
14
  s.email = %q{will@spanner.org}
15
15
  s.extra_rdoc_files = [
@@ -2,7 +2,7 @@
2
2
  require_dependency 'application_controller'
3
3
 
4
4
  class TaggableEventsExtension < Radiant::Extension
5
- version "1.3.0"
5
+ version "1.3.1"
6
6
  description "A tiny bit of glue to attach tags to event_calendar events and define some radius tags useful on calendar pages"
7
7
  url "http://github.com/spanner/radiant-taggable_events-extension"
8
8
 
@@ -12,6 +12,7 @@ class TaggableEventsExtension < Radiant::Extension
12
12
  Event.send :is_taggable # make events taggable
13
13
  Event.send :include, TaggableEvent # and inherit tags from venue and calendar
14
14
  EventsController.send :include, TaggedEventsController # further complicate the retrieval of events by adding tag-filters
15
+ Page.send :include, TaggableEventTags # supports tag conditions on r:events:* radius tags
15
16
  end
16
17
 
17
18
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-taggable_events-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 0
10
- version: 1.3.0
9
+ - 1
10
+ version: 1.3.1
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-21 00:00:00 +01:00
18
+ date: 2010-12-09 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency