radiant-reader-extension 3.0.25 → 3.0.26

Sign up to get free protection for your applications and to get access to all the features.
data/app/models/reader.rb CHANGED
@@ -153,6 +153,10 @@ class Reader < ActiveRecord::Base
153
153
  def preferred_name
154
154
  nickname? ? nickname : name
155
155
  end
156
+
157
+ def preferred_informal_name
158
+ nickname? ? nickname : forename
159
+ end
156
160
 
157
161
  def postal_address?
158
162
  !post_line1.blank? && !post_city.blank?
@@ -2,7 +2,7 @@
2
2
  - render_region :tbody do |tbody|
3
3
  - tbody.name_cell do
4
4
  %td.name{:style => "padding-left: #{9 + (24 * level)}px;"}
5
- = link_to image('group', :alt => '') + ' ' + group.name, admin_group_url(group)
5
+ = link_to image('group', :alt => '', :class => 'gravatar') + ' ' + group.name, admin_group_url(group)
6
6
  %br
7
7
  %span.notes
8
8
  = group.description
data/lib/message_tags.rb CHANGED
@@ -45,9 +45,9 @@ module MessageTags
45
45
  tag.expand
46
46
  end
47
47
 
48
- [:name, :forename, :surname, :email, :description, :login].each do |field|
48
+ [:name, :forename, :nickname, :preferred_name, :preferred_informal_name, :surname, :email, :description, :login].each do |field|
49
49
  desc %{
50
- Only for use in email messages. Displays the #{field} field of the reader currently being emailed.
50
+ Only for use in email messages. Displays the #{field} of the reader currently being emailed.
51
51
  <pre><code><r:recipient:#{field} /></code></pre>
52
52
  }
53
53
  tag "recipient:#{field}" do |tag|
@@ -97,6 +97,34 @@ module MessageTags
97
97
  reader_edit_profile_url(:host => @mailer_vars[:@host])
98
98
  end
99
99
 
100
+ desc %{
101
+ Expands if the addressed reader has activated his or her account. Only for use in email messages.
102
+ }
103
+ tag "recipient:if_activated" do |tag|
104
+ tag.expand if tag.locals.recipient.activated?
105
+ end
106
+
107
+ desc %{
108
+ Expands if the addressed reader has not activated his or her account. Only for use in email messages.
109
+ }
110
+ tag "recipient:unless_activated" do |tag|
111
+ tag.expand unless tag.locals.recipient.activated?
112
+ end
113
+
114
+ desc %{
115
+ Expands if a clear password is available for the addressed reader.
116
+ }
117
+ tag "recipient:if_clear_password" do |tag|
118
+ tag.expand unless tag.locals.recipient.clear_password.blank?
119
+ end
120
+
121
+ desc %{
122
+ Expands if no clear password is available for the addressed reader.
123
+ }
124
+ tag "recipient:unless_clear_password" do |tag|
125
+ tag.expand if tag.locals.recipient.clear_password.blank?
126
+ end
127
+
100
128
  desc %{
101
129
  Only for use in email messages. Displays the address that will activate the current reader account.
102
130
  <pre><code><r:recipient:activation_url /></code></pre>
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.25'
2
+ VERSION = '3.0.26'
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
@@ -76,7 +76,7 @@ module ReaderTags
76
76
  tag.expand if get_reader(tag)
77
77
  end
78
78
 
79
- [:name, :forename, :surname, :nickname, :preferred_name, :email, :description, :login].each do |field|
79
+ [:name, :forename, :surname, :nickname, :preferred_name, :preferred_informal_name, :email, :description, :login].each do |field|
80
80
  desc %{
81
81
  Displays the #{field} field of the current reader.
82
82
  <pre><code><r:reader:#{field} /></code></pre>
@@ -111,7 +111,7 @@ module ReaderTags
111
111
  %{<div class="remote_controls"></div>}
112
112
  else
113
113
  if tag.locals.reader = Reader.current
114
- welcome = %{<span class="greeting">#{I18n.t('reader_extension.navigation.greeting', :name => tag.locals.reader.preferred_name)}</span>. }
114
+ welcome = %{<span class="greeting">#{I18n.t('reader_extension.navigation.greeting', :name => tag.locals.reader.preferred_informal_name)}</span>. }
115
115
  if tag.locals.reader.activated?
116
116
  welcome << %{
117
117
  #{I18n.t('reader_extension.not_you')} <a href="#{reader_logout_path}">#{I18n.t('reader_extension.navigation.log_out')}</a>.
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: 53
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 25
10
- version: 3.0.25
9
+ - 26
10
+ version: 3.0.26
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Ross
@@ -359,7 +359,7 @@ files:
359
359
  homepage: http://radiant.spanner.org/reader
360
360
  licenses: []
361
361
 
362
- post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.25'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
362
+ post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.26'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
363
363
  rdoc_options: []
364
364
 
365
365
  require_paths: