radiant-reader-extension 3.0.28 → 3.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ private
58
58
  csv = line.collect {|value| value ? value.gsub(/^ */, '').chomp : ''}
59
59
  input = {}
60
60
  input[:honorific] = csv.shift if Radiant::Config['reader.show_honorifics?']
61
- [:name, :email, :phone].each {|field| input[field] = csv.shift}
61
+ [:forename, :surname, :email, :phone].each {|field| input[field] = csv.shift}
62
62
  r = Reader.find_by_email(input[:email]) || Reader.new(input)
63
63
  r.create_password! # only for validation purposes: not saved nor passed through
64
64
  r.valid? # so that errors can be shown on the confirmation form
data/app/models/reader.rb CHANGED
@@ -285,6 +285,10 @@ class Reader < ActiveRecord::Base
285
285
  readers.map(&:vcard).join("\n")
286
286
  end
287
287
 
288
+ def send_group_invitation_message(group=nil)
289
+ send_functional_message('group_invitation', group)
290
+ end
291
+
288
292
  private
289
293
 
290
294
  def combine_names
@@ -336,8 +340,4 @@ private
336
340
  groups.each { |g| g.send_welcome_to(self) }
337
341
  end
338
342
 
339
- def send_group_invitation_message(group=nil)
340
- send_functional_message('group_invitation', group)
341
- end
342
-
343
343
  end
@@ -13,7 +13,7 @@
13
13
  %span.formnote
14
14
  - if Radiant::Config['reader.show_honorifics?']
15
15
  title or rank,
16
- name, email, [phone]
16
+ forename, surname, email, [phone]
17
17
  = text_area_tag "readerlist", params[:readerlist], :class => "textarea", :style => "width: 100%; height: 240px;"
18
18
 
19
19
  %p.buttons
@@ -27,5 +27,5 @@
27
27
  - else
28
28
  %p
29
29
  = t('reader_extension.no_invitation_message')
30
- = link_to image('plus') + ' ' + t("reader_extension.create_invitation_message"), new_admin_group_message_url(@group, :function => 'invitation'), :class => "action"
30
+ = link_to image('plus') + ' ' + t("reader_extension.create_invitation_message"), new_admin_group_message_url(@group, :function => 'group_invitation'), :class => "action"
31
31
 
@@ -12,10 +12,11 @@
12
12
  %tr
13
13
  %th
14
14
  - if Radiant::Config['reader.show_honorifics?']
15
- %th= t('reader_extension.honorific')
16
- %th= t('reader_extension.full_name')
17
- %th= t('reader_extension.email')
18
- %th= t('reader_extension.optional_phone')
15
+ %th= t('activerecord.attributes.reader.honorific')
16
+ %th= t('activerecord.attributes.reader.forename')
17
+ %th= t('activerecord.attributes.reader.surname')
18
+ %th= t('activerecord.attributes.reader.email')
19
+ %th= t('activerecord.attributes.reader.phone')
19
20
  %tbody
20
21
  - i = 0
21
22
  - @readers.each do |reader|
@@ -27,7 +28,9 @@
27
28
  %td
28
29
  = text_field_tag "reader_#{i}[honorific]", reader.honorific, :class => "preview#{ ' with_error' if reader.errors.on(:honorific)}", :title => reader.errors.on(:honorific)
29
30
  %td
30
- = text_field_tag "reader_#{i}[name]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:name)}", :title => reader.errors.on(:name)
31
+ = text_field_tag "reader_#{i}[forename]", reader.forename, :class => "preview#{ ' with_error' if reader.errors.on(:forename)}", :title => reader.errors.on(:forename)
32
+ %td
33
+ = text_field_tag "reader_#{i}[surname]", reader.surname, :class => "preview#{ ' with_error' if reader.errors.on(:surname)}", :title => reader.errors.on(:surname)
31
34
  %td
32
35
  = text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email)
33
36
  %td
@@ -40,7 +43,9 @@
40
43
  %td
41
44
  = text_field_tag "reader_#{i}[honorific]", reader.honorific, :class => "preview#{ ' with_error' if reader.errors.on(:honorific)}", :title => reader.errors.on(:honorific), :disabled => true
42
45
  %td
43
- = text_field_tag "reader_#{i}[name]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:name)}", :title => reader.errors.on(:name), :disabled => true
46
+ = text_field_tag "reader_#{i}[forename]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:forename)}", :title => reader.errors.on(:forename), :disabled => true
47
+ %td
48
+ = text_field_tag "reader_#{i}[surname]", reader.preferred_name, :class => "preview#{ ' with_error' if reader.errors.on(:surname)}", :title => reader.errors.on(:surname), :disabled => true
44
49
  %td
45
50
  = text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email), :disabled => true
46
51
  %td
@@ -30,7 +30,7 @@ en:
30
30
  postal_address: "Postal address"
31
31
  postcode: "Postcode"
32
32
  surname: "Surname"
33
- unshareable: "Share none of this information"
33
+ unshareable: "Share none of this information with other users (note that you can omit any fields above)"
34
34
  message:
35
35
  body: "Message body"
36
36
  filter_id: "Filter"
@@ -251,6 +251,7 @@ en:
251
251
  is_free_and_quick: " is free and only takes a moment"
252
252
  joined_on: "Joined on"
253
253
  last_sent: "last sent"
254
+ listing_denied: "Details hidden"
254
255
  log_in: 'log in'
255
256
  log_in_or_register: "Please log in here. If you haven't already, you will need to <a href='/register'>register</a> first."
256
257
  log_out: "log out"
data/lib/message_tags.rb CHANGED
@@ -45,7 +45,7 @@ module MessageTags
45
45
  tag.expand
46
46
  end
47
47
 
48
- [:name, :forename, :nickname, :preferred_name, :preferred_informal_name, :surname, :email, :description, :login].each do |field|
48
+ [:name, :forename, :nickname, :preferred_name, :preferred_informal_name, :surname, :email, :description].each do |field|
49
49
  desc %{
50
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>
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '3.0.28'
2
+ VERSION = '3.0.29'
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: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 28
10
- version: 3.0.28
9
+ - 29
10
+ version: 3.0.29
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-14 00:00:00 Z
18
+ date: 2011-10-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: radiant-layouts-extension
@@ -331,7 +331,6 @@ files:
331
331
  - public/stylesheets/sass/admin/reader.sass
332
332
  - public/stylesheets/sass/admin/reader_group.sass
333
333
  - public/stylesheets/sass/reader.sass
334
- - radiant-reader-extension-3.0.27.gem
335
334
  - radiant-reader-extension.gemspec
336
335
  - Rakefile
337
336
  - reader_extension.rb
@@ -360,7 +359,7 @@ files:
360
359
  homepage: http://radiant.spanner.org/reader
361
360
  licenses: []
362
361
 
363
- post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.28'\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.29'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
364
363
  rdoc_options: []
365
364
 
366
365
  require_paths:
Binary file