radiant-reader-extension 3.0.16 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/group_tags.rb CHANGED
@@ -6,12 +6,26 @@ module GroupTags
6
6
  desc %{
7
7
  The root 'group' tag is not meant to be called directly.
8
8
  All it does is summon a group object so that its fields can be displayed with eg.
9
+
9
10
  <pre><code><r:group:name /></code></pre>
10
11
 
11
- This tag will not throw an exception if there is no group; it will just disappear.
12
+ To show a particular group, supply an id or name attribute. There is no access control
13
+ involved here: if you choose to show a group on an unrestricted page, it will appear.
14
+
15
+ Note that because of limitations in radius this has to be done in a containing root tag:
16
+
17
+ <pre><code><r:group id="1"><r:group:url /></r;group></code></pre>
12
18
  }
13
19
  tag 'group' do |tag|
14
- tag.locals.group = @mailer_vars ? @mailer_vars[:@group] : tag.locals.page.group
20
+ tag.locals.group = if tag.attr['id']
21
+ Group.find_by_id(tag.attr['id'])
22
+ elsif tag.attr['name']
23
+ Group.find_by_name(tag.attr['name'])
24
+ elsif @mailer_vars
25
+ @mailer_vars[:@group]
26
+ else
27
+ tag.locals.page.homegroup
28
+ end
15
29
  tag.expand if tag.locals.group
16
30
  end
17
31
 
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.16'
2
+ VERSION = '3.0.17'
3
3
  SUMMARY = %q{Reader/viewer/visitor registration, login and access-control for Radiant CMS}
4
4
  DESCRIPTION = %q{Provides reader/member/user registration and management functions including password-reminder, group-based page access control and administrative email.}
5
5
  URL = "http://radiant.spanner.org/reader"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-reader-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 16
10
- version: 3.0.16
9
+ - 17
10
+ version: 3.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -328,8 +328,6 @@ files:
328
328
  - public/stylesheets/sass/admin/reader.sass
329
329
  - public/stylesheets/sass/admin/reader_group.sass
330
330
  - public/stylesheets/sass/reader.sass
331
- - radiant-reader-extension-3.0.14.gem
332
- - radiant-reader-extension-3.0.15.gem
333
331
  - radiant-reader-extension.gemspec
334
332
  - Rakefile
335
333
  - reader_extension.rb
@@ -358,7 +356,7 @@ files:
358
356
  homepage: http://radiant.spanner.org/reader
359
357
  licenses: []
360
358
 
361
- post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.16'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
359
+ post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.17'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
362
360
  rdoc_options: []
363
361
 
364
362
  require_paths:
Binary file
Binary file