radiant-reader-extension 3.0.18 → 3.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  module ControllerExtensions # for inclusion into ApplicationController
2
2
 
3
3
  def self.included(base)
4
-
5
4
  base.class_eval do
6
5
  rescue_from ReaderError::AccessDenied, :with => :access_denied
7
6
  rescue_from ReaderError::LoginRequired, :with => :login_required
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.18'
2
+ VERSION = '3.0.19'
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"
data/lib/reader_tags.rb CHANGED
@@ -114,14 +114,16 @@ module ReaderTags
114
114
  welcome = %{<span class="greeting">#{I18n.t('reader_extension.navigation.greeting', :name => tag.locals.reader.name)}</span> }
115
115
  links = []
116
116
  if tag.locals.reader.activated?
117
- links << %{<a href="#{edit_reader_path(tag.locals.reader)}">#{I18n.t('reader_extension.navigation.preferences')}</a>}
118
- links << %{<a href="#{reader_path(tag.locals.reader)}">#{I18n.t('reader_extension.navigation.account')}</a>}
117
+ links << %{<a href="#{reader_dashboard_url}">#{I18n.t('reader_extension.navigation.dashboard')}</a>}
118
+ links << %{<a href="#{reader_index_url}">#{I18n.t('reader_extension.navigation.directory')}</a>}
119
+ links << %{<a href="#{reader_account}">#{I18n.t('reader_extension.navigation.account')}</a>}
120
+ links << %{<a href="#{reader_edit_profile_url}">#{I18n.t('reader_extension.navigation.profile')}</a>}
119
121
  links << %{<a href="/admin">#{I18n.t('reader_extension.navigation.admin')}</a>} if tag.locals.reader.is_user?
120
122
  links << %{<a href="#{reader_logout_path}">#{I18n.t('reader_extension.navigation.log_out')}</a>}
121
123
  else
122
124
  welcome << I18n.t('reader_extension.navigation.activate')
123
125
  end
124
- %{<div class="controls"><p>} + welcome + links.join(%{<span class="separator"> | </span>}) + %{</p></div>}
126
+ %{<div class="controls"><p>} + welcome + '<br />' + links.join(%{<span class="separator"> | </span>}) + %{</p></div>}
125
127
  elsif Radiant::Config['reader.allow_registration?']
126
128
  %{<div class="controls"><p>#{I18n.t('reader_extension.navigation.welcome_please_log_in', :login_url => reader_login_url, :register_url => new_reader_url)}</p></div>}
127
129
  end
@@ -2,6 +2,10 @@ module SiteControllerExtensions
2
2
 
3
3
  def self.included(base)
4
4
  base.class_eval {
5
+ rescue_from ReaderError::AccessDenied, :with => :access_denied
6
+ rescue_from ReaderError::LoginRequired, :with => :login_required
7
+ rescue_from ReaderError::ActivationRequired, :with => :activation_required
8
+
5
9
  # NB. to control access without disabling the cache we have overridden Page.cache?
6
10
  # to return false for any page that has a group association.
7
11
 
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: 35
4
+ hash: 33
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 18
10
- version: 3.0.18
9
+ - 19
10
+ version: 3.0.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-12 00:00:00 Z
18
+ date: 2011-10-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: radiant-layouts-extension
@@ -356,7 +356,7 @@ files:
356
356
  homepage: http://radiant.spanner.org/reader
357
357
  licenses: []
358
358
 
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.18'\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.19'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
360
360
  rdoc_options: []
361
361
 
362
362
  require_paths: