radiant-reader-extension 3.0.30 → 3.0.31
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/group_invitations_controller.rb +1 -1
- data/app/views/admin/group_invitations/new.html.haml +1 -1
- data/app/views/admin/group_invitations/preview.html.haml +5 -0
- data/lib/message_tags.rb +24 -0
- data/lib/radiant-reader-extension.rb +1 -1
- data/lib/reader_tags.rb +24 -0
- metadata +5 -5
@@ -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
|
-
[:forename, :surname, :email, :phone].each {|field| input[field] = csv.shift}
|
61
|
+
[:forename, :surname, :email, :phone, :post_organisation].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
|
@@ -13,7 +13,7 @@
|
|
13
13
|
%span.formnote
|
14
14
|
- if Radiant::Config['reader.show_honorifics?']
|
15
15
|
title or rank,
|
16
|
-
forename, surname, email, [phone]
|
16
|
+
forename, surname, email, [phone], [organisation]
|
17
17
|
= text_area_tag "readerlist", params[:readerlist], :class => "textarea", :style => "width: 100%; height: 240px;"
|
18
18
|
|
19
19
|
%p.buttons
|
@@ -17,6 +17,7 @@
|
|
17
17
|
%th= t('activerecord.attributes.reader.surname')
|
18
18
|
%th= t('activerecord.attributes.reader.email')
|
19
19
|
%th= t('activerecord.attributes.reader.phone')
|
20
|
+
%th= t('activerecord.attributes.reader.post_organisation')
|
20
21
|
%tbody
|
21
22
|
- i = 0
|
22
23
|
- @readers.each do |reader|
|
@@ -35,6 +36,8 @@
|
|
35
36
|
= text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email)
|
36
37
|
%td
|
37
38
|
= text_field_tag "reader_#{i}[phone]", reader.phone, :class => "preview#{ ' with_error' if reader.errors.on(:phone)}", :title => reader.errors.on(:phone)
|
39
|
+
%td
|
40
|
+
= text_field_tag "reader_#{i}[post_organisation]", reader.post_organisation, :class => "preview#{ ' with_error' if reader.errors.on(:post_organisation)}", :title => reader.errors.on(:post_organisation)
|
38
41
|
- else
|
39
42
|
%tr.invite
|
40
43
|
%td
|
@@ -50,6 +53,8 @@
|
|
50
53
|
= text_field_tag "reader_#{i}[email]", reader.email, :class => "preview#{ ' with_error' if reader.errors.on(:email)}", :title => reader.errors.on(:email), :disabled => true
|
51
54
|
%td
|
52
55
|
= text_field_tag "reader_#{i}[phone]", reader.phone, :class => "preview#{ ' with_error' if reader.errors.on(:phone)}", :title => reader.errors.on(:phone), :disabled => true
|
56
|
+
%td
|
57
|
+
= text_field_tag "reader_#{i}[post_organisation]", reader.phone, :class => "preview#{ ' with_error' if reader.errors.on(:post_organisation)}", :title => reader.errors.on(:post_organisation), :disabled => true
|
53
58
|
- i = i + 1
|
54
59
|
|
55
60
|
%p.buttons
|
data/lib/message_tags.rb
CHANGED
@@ -54,6 +54,30 @@ module MessageTags
|
|
54
54
|
tag.locals.recipient.send(field)
|
55
55
|
end
|
56
56
|
end
|
57
|
+
|
58
|
+
desc %{
|
59
|
+
Displays the organisation recorded for the current recipient.
|
60
|
+
<pre><code><r:reader:organisation /></code></pre>
|
61
|
+
}
|
62
|
+
tag "recipient:organisation" do |tag|
|
63
|
+
tag.locals.recipient.post_organisation
|
64
|
+
end
|
65
|
+
|
66
|
+
desc %{
|
67
|
+
Expands if the current recipient has an organisation.
|
68
|
+
<pre><code><r:reader:organisation /></code></pre>
|
69
|
+
}
|
70
|
+
tag "recipient:if_organisation" do |tag|
|
71
|
+
tag.expand unless tag.locals.recipient.post_organisation.blank?
|
72
|
+
end
|
73
|
+
|
74
|
+
desc %{
|
75
|
+
Expands unless the current reader has an organisation.
|
76
|
+
<pre><code><r:reader:organisation /></code></pre>
|
77
|
+
}
|
78
|
+
tag "recipient:unless_organisation" do |tag|
|
79
|
+
tag.expand if tag.locals.recipient.post_organisation.blank?
|
80
|
+
end
|
57
81
|
|
58
82
|
desc %{
|
59
83
|
Only for use in email messages. Displays the password of the reader currently being emailed, if we still have it.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RadiantReaderExtension
|
2
|
-
VERSION = '3.0.
|
2
|
+
VERSION = '3.0.31'
|
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
@@ -86,6 +86,30 @@ module ReaderTags
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
desc %{
|
90
|
+
Displays the organisation recorded for the current reader.
|
91
|
+
<pre><code><r:reader:organisation /></code></pre>
|
92
|
+
}
|
93
|
+
tag "reader:organisation" do |tag|
|
94
|
+
tag.locals.reader.post_organisation if tag.locals.reader
|
95
|
+
end
|
96
|
+
|
97
|
+
desc %{
|
98
|
+
Expands if the current reader has an organisation.
|
99
|
+
<pre><code><r:reader:organisation /></code></pre>
|
100
|
+
}
|
101
|
+
tag "reader:if_organisation" do |tag|
|
102
|
+
tag.expand unless tag.locals.reader.post_organisation.blank?
|
103
|
+
end
|
104
|
+
|
105
|
+
desc %{
|
106
|
+
Expands unless the current reader has an organisation.
|
107
|
+
<pre><code><r:reader:organisation /></code></pre>
|
108
|
+
}
|
109
|
+
tag "reader:unless_organisation" do |tag|
|
110
|
+
tag.expand if tag.locals.reader.post_organisation.blank?
|
111
|
+
end
|
112
|
+
|
89
113
|
desc %{
|
90
114
|
Displays the standard reader_welcome block, but only if a reader is present. For a block that shows an invitation to non-logged-in
|
91
115
|
people, use @r:reader_welcome@
|
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:
|
4
|
+
hash: 57
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 31
|
10
|
+
version: 3.0.31
|
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-11-
|
18
|
+
date: 2011-11-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: radiant-layouts-extension
|
@@ -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.
|
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.31'\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:
|