radiant-reader-extension 3.0.33 → 3.0.35
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/app/views/accounts/_form.html.haml +62 -56
- data/app/views/accounts/_profile_form.html.haml +80 -59
- data/app/views/admin/reader_configuration/edit.html.haml +2 -0
- data/app/views/admin/reader_configuration/show.html.haml +2 -0
- data/app/views/admin/readers/_form.html.haml +9 -0
- data/app/views/dashboard/_groups.html.haml +1 -1
- data/app/views/readers/_directory.html.haml +14 -0
- data/app/views/readers/_links.html.haml +2 -2
- data/app/views/readers/_profile.html.haml +23 -23
- data/app/views/shared/_standard_reader_parts.html.haml +3 -0
- data/config/initializers/radiant_config.rb +1 -0
- data/config/locales/en.yml +9 -3
- data/db/migrate/20111122115514_date_of_birth.rb +11 -0
- data/lib/grouped_rails_page.rb +10 -0
- data/lib/radiant-reader-extension.rb +1 -1
- data/lib/reader_admin_ui.rb +4 -4
- data/public/javascripts/reader.js +26 -24
- data/public/stylesheets/sass/reader.sass +28 -3
- data/reader_extension.rb +2 -1
- metadata +8 -8
@@ -2,68 +2,74 @@
|
|
2
2
|
- check_password ||= false
|
3
3
|
|
4
4
|
- form_for reader, :html => {:class => 'friendly'} do |f|
|
5
|
-
|
5
|
+
- render_region :form do |form|
|
6
6
|
|
7
|
-
|
7
|
+
- form.edit_name do
|
8
|
+
= render :partial => 'edit_names', :locals => {:f => f}
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
10
|
+
- form.edit_email do
|
11
|
+
- if reader.new_record?
|
12
|
+
%p
|
13
|
+
= f.label reader.email_field, t('activerecord.attributes.reader.email'), :class => 'required'
|
14
|
+
%br
|
15
|
+
= text_field_tag reader.email_field, params[reader.email_field] || reader.email, :id => "reader_#{reader.email_field}", :class => 'standard'
|
16
|
+
%br
|
17
|
+
%span.formnote= t('reader_extension.form_notes.account.email')
|
18
|
+
.innocuous
|
19
|
+
%p
|
20
|
+
=f.label :email, nil, :class => 'required'
|
21
|
+
%br
|
22
|
+
= f.text_field :email, :class => 'standard', :value => ""
|
23
|
+
%br
|
24
|
+
%span.formnote= t('reader_extension.spam_trap')
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
- else
|
27
|
+
%p
|
28
|
+
= f.label :email, nil, :class => 'required'
|
29
|
+
%br
|
30
|
+
= f.text_field :email, :class => 'standard'
|
31
|
+
%br
|
32
|
+
%span.formnote= t('reader_extension.form_notes.account.email')
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
- form.edit_password do
|
35
|
+
- if reader.new_record?
|
36
|
+
%p
|
37
|
+
= f.label :password, nil, :class => 'required'
|
38
|
+
%br
|
39
|
+
= f.password_field :password, :class => 'standard', :autocomplete => 'off'
|
40
|
+
%br
|
41
|
+
%span.formnote= t('reader_extension.form_notes.account.new_password')
|
39
42
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
43
|
+
%p
|
44
|
+
= f.label :password_confirmation, nil, :class => 'required'
|
45
|
+
%br
|
46
|
+
= f.password_field :password_confirmation, :class => 'standard', :autocomplete => 'off'
|
44
47
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
- else
|
49
|
+
.display_password
|
50
|
+
%p
|
51
|
+
= f.label :password, nil, :class => 'optional'
|
52
|
+
%span.password
|
53
|
+
•••••
|
54
|
+
%span.formnote= link_to t('reader_extension.change_password'), '#', :class => 'toggle', :rel => ".display_password, .new_password"
|
52
55
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
.new_password.hidden
|
57
|
+
%p
|
58
|
+
= f.label :password, t('reader_extension.new_password'), :class => 'required'
|
59
|
+
%br
|
60
|
+
= f.password_field :password, :class => 'standard', :autocomplete => 'off'
|
61
|
+
%span.formnote= t('reader_extension.form_notes.account.new_password')
|
62
|
+
%p
|
63
|
+
= f.label :password_confirmation, t('reader_extension.confirm_new_password'), :class => 'required'
|
64
|
+
%br
|
65
|
+
= f.password_field :password_confirmation, :class => 'standard', :autocomplete => 'off'
|
63
66
|
|
64
|
-
|
67
|
+
- form.edit_groups do
|
68
|
+
= render :partial => 'choose_memberships'
|
65
69
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
+
- render_region :form_bottom, :locals => {:f => f} do |form_bottom|
|
71
|
+
- form_bottom.edit_buttons do
|
72
|
+
%p
|
73
|
+
= submit_tag reader.new_record? ? t('reader_extension.create_account') : t("reader_extension.update_account")
|
74
|
+
or
|
75
|
+
= link_to 'cancel', request.referer
|
@@ -2,72 +2,93 @@
|
|
2
2
|
- check_password ||= false
|
3
3
|
|
4
4
|
- form_for reader, :html => {:class => 'friendly'} do |f|
|
5
|
-
|
5
|
+
- render_region :profile_form do |form|
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
- form.edit_honorific do
|
8
|
+
- if Radiant.config['reader.show_honorifics?']
|
9
|
+
%p
|
10
|
+
= f.label :honorific, nil, :class => 'optional'
|
11
|
+
%br
|
12
|
+
= f.text_field :honorific, :class => 'standard'
|
13
|
+
%span.formnote= t('reader_extension.form_notes.account.honorific')
|
13
14
|
|
14
|
-
|
15
|
+
- form.edit_name do
|
16
|
+
= render :partial => 'edit_names', :locals => {:f => f}
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
- form.edit_dob do
|
19
|
+
- if Radiant.config['reader.show_dobs?']
|
20
|
+
%p
|
21
|
+
= f.label :dob, nil, :class => 'optional'
|
22
|
+
%br
|
23
|
+
%span.dateparts
|
24
|
+
= f.date_select :dob, :order => [:day, :month, :year], :start_year => Time.now.year - 100, :end_year => Time.now.year, :include_blank => true
|
25
|
+
= f.check_box :dob_secret
|
26
|
+
= f.label :dob_secret
|
27
|
+
%br
|
28
|
+
%span.formnote= t('reader_extension.form_notes.account.dob')
|
21
29
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
30
|
+
- form.edit_phone do
|
31
|
+
%p
|
32
|
+
= f.label :phone, nil, :class => 'optional'
|
33
|
+
%br
|
34
|
+
= f.text_field :phone, :class => 'standard'
|
35
|
+
%span.formnote= t('reader_extension.form_notes.account.phone')
|
27
36
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
37
|
+
- form.edit_mobile do
|
38
|
+
%p
|
39
|
+
= f.label :mobile, nil, :class => 'optional'
|
40
|
+
%br
|
41
|
+
= f.text_field :mobile, :class => 'standard'
|
42
|
+
%span.formnote= t('reader_extension.form_notes.account.mobile')
|
33
43
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
44
|
+
- form.edit_address do
|
45
|
+
%p
|
46
|
+
= f.label :post_country, nil, :class => 'optional'
|
47
|
+
= f.select :post_country, country_options_for_select(reader.post_country)
|
48
|
+
%br
|
49
|
+
%span.formnote= t('reader_extension.form_notes.account.post_country')
|
50
|
+
|
51
|
+
- if Radiant.config['reader.postal.use_organisation?']
|
52
|
+
%p
|
53
|
+
= f.label :post_organisation, nil, :class => 'optional'
|
54
|
+
= f.text_field :post_organisation, :class => 'standard'
|
55
|
+
%br
|
56
|
+
%span.formnote= t('reader_extension.form_notes.account.post_organisation')
|
40
57
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
58
|
+
%p
|
59
|
+
= f.label :post_line1, t('activerecord.attributes.reader.postal_address'), :class => 'optional'
|
60
|
+
%br
|
61
|
+
= f.text_field :post_line1, :class => 'standard'
|
62
|
+
%br
|
63
|
+
= f.text_field :post_line2, :class => 'standard'
|
64
|
+
%br
|
65
|
+
= f.label :post_city, nil, :class => 'optional'
|
66
|
+
= f.text_field :post_city, :class => 'standard'
|
67
|
+
%br
|
68
|
+
= f.label :post_province, nil, :class => 'optional'
|
69
|
+
= f.text_field :post_province, :class => 'standard'
|
70
|
+
%br
|
71
|
+
= f.label :postcode, nil, :class => 'optional'
|
72
|
+
= f.text_field :postcode, :class => 'standard'
|
56
73
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
74
|
+
- form.edit_description do
|
75
|
+
- if Radiant.config['reader.show_descriptions?']
|
76
|
+
%p
|
77
|
+
= f.label :description, nil, :class => 'optional'
|
78
|
+
%br
|
79
|
+
= f.text_area :description, :class => Radiant.config['forum.toolbar?'] ? 'rte' : 'standard'
|
80
|
+
%span.formnote= t('reader_extension.form_notes.account.description')
|
63
81
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
82
|
+
- form.edit_shareability do
|
83
|
+
%p
|
84
|
+
= f.check_box :unshareable, :class => 'reversed'
|
85
|
+
= f.label :unshareable
|
86
|
+
%br
|
87
|
+
%span.formnote= t('reader_extension.form_notes.account.unshareable')
|
69
88
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
89
|
+
- render_region :form_bottom, :locals => {:f => f} do |form_bottom|
|
90
|
+
- form_bottom.edit_buttons do
|
91
|
+
%p
|
92
|
+
= submit_tag reader.new_record? ? t('reader_extension.create_account') : t("reader_extension.update_account")
|
93
|
+
or
|
94
|
+
= link_to 'cancel', request.referer
|
@@ -26,6 +26,15 @@
|
|
26
26
|
- form.edit_password do
|
27
27
|
= render "password_fields", :f => f
|
28
28
|
|
29
|
+
- form.edit_dob do
|
30
|
+
%p
|
31
|
+
= f.label :dob
|
32
|
+
%br
|
33
|
+
= f.date_select :dob
|
34
|
+
%br
|
35
|
+
= f.check_box :dob_secret
|
36
|
+
= f.label :dob_secret
|
37
|
+
|
29
38
|
- form.edit_phone do
|
30
39
|
%p
|
31
40
|
= f.label :phone
|
@@ -12,6 +12,20 @@
|
|
12
12
|
= t('reader_extension.people').titlecase
|
13
13
|
= render :partial => 'readers/list', :locals => {:readers => @readers}
|
14
14
|
|
15
|
+
- when 'private'
|
16
|
+
.groups
|
17
|
+
%h2
|
18
|
+
= t('reader_extension.your_groups')
|
19
|
+
- if @groups.any
|
20
|
+
= render :partial => 'groups/group', :collection => @groups
|
21
|
+
- else
|
22
|
+
= t('reader_extension.no_groups')
|
23
|
+
.readers
|
24
|
+
- if @readers.any?
|
25
|
+
%h2
|
26
|
+
= t('reader_extension.people')
|
27
|
+
= render :partial => 'readers/list', :locals => {:readers => @readers}
|
28
|
+
|
15
29
|
- when 'grouped'
|
16
30
|
.groups
|
17
31
|
%h2
|
@@ -4,6 +4,6 @@
|
|
4
4
|
%li
|
5
5
|
= link_to t("reader_extension.directory.link"), readers_url
|
6
6
|
%li
|
7
|
-
= link_to t("reader_extension.directory.csv_link"), readers_url(:format => :csv)
|
7
|
+
= link_to t("reader_extension.directory.csv_link"), readers_url(:format => :csv), :class => 'csv'
|
8
8
|
%li
|
9
|
-
= link_to t("reader_extension.directory.vcard_link"), readers_url(:format => :vcard)
|
9
|
+
= link_to t("reader_extension.directory.vcard_link"), readers_url(:format => :vcard), :class => 'vcards'
|
@@ -1,30 +1,30 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
1
|
+
- reader ||= @reader
|
2
|
+
|
3
|
+
%div.contact
|
4
4
|
- if reader.unshareable?
|
5
5
|
- if reader == current_reader
|
6
6
|
%p.warning
|
7
7
|
= t('reader_extension.you_are_not_shared')
|
8
8
|
- else
|
9
|
-
%
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
%h3
|
10
|
+
= link_to reader.name, reader_url(reader, :format => :vcard), :class => 'vcard', :title => t('reader_extension.directory.vcard_link')
|
11
|
+
- if reader == current_reader
|
12
|
+
%span.note
|
13
|
+
= link_to t("reader_extension.edit_profile"), reader_edit_profile_url, :class => 'edit'
|
14
|
+
%ul
|
15
|
+
- if email = reader.email
|
16
|
+
%li
|
17
|
+
= t("reader_extension.directory.email") + ': '
|
18
|
+
= email_link email
|
19
|
+
- %w{phone mobile}.each do |field|
|
20
|
+
- if value = reader.send(field.to_sym)
|
14
21
|
%li
|
15
|
-
= t("reader_extension.directory
|
16
|
-
=
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- if reader.postal_address?
|
23
|
-
%li
|
24
|
-
%span.indent
|
25
|
-
= t("reader_extension.directory.postal_address") + ': '
|
26
|
-
= reader.postal_address.to_html
|
27
|
-
- if reader == current_reader
|
28
|
-
%li.edit
|
29
|
-
= link_to t("reader_extension.edit_profile"), reader_edit_profile_url, :class => 'edit'
|
22
|
+
= t("reader_extension.directory.#{field}") + ': '
|
23
|
+
= value
|
24
|
+
- if reader.postal_address?
|
25
|
+
%li
|
26
|
+
%span.indent
|
27
|
+
= t("reader_extension.directory.postal_address") + ': '
|
28
|
+
= reader.postal_address.to_html
|
30
29
|
|
30
|
+
|
@@ -12,6 +12,7 @@ Radiant.config do |config|
|
|
12
12
|
reader.define 'login_to', :default => "dashboard"
|
13
13
|
reader.define 'show_honorifics?', :default => false
|
14
14
|
reader.define 'show_descriptions?', :default => false
|
15
|
+
reader.define 'show_dobs?', :default => false
|
15
16
|
end
|
16
17
|
config.namespace('email') do |email|
|
17
18
|
email.define 'layout', :select_from => lambda { Layout.all.map(&:name) }, :allow_blank => true
|
data/config/locales/en.yml
CHANGED
@@ -10,6 +10,8 @@ en:
|
|
10
10
|
role: "Role"
|
11
11
|
admin: "admin?"
|
12
12
|
reader:
|
13
|
+
dob: "Date of birth"
|
14
|
+
dob_secret: "Keep secret"
|
13
15
|
description: "A but of text about yourself"
|
14
16
|
email: "Email address"
|
15
17
|
forename: "Forename"
|
@@ -70,6 +72,7 @@ en:
|
|
70
72
|
require_confirmation?: "Confirm email addresses"
|
71
73
|
show_honorifics?: "Show honorifics"
|
72
74
|
show_descriptions?: "Show biography"
|
75
|
+
show_dobs?: "Show dates of birth"
|
73
76
|
email:
|
74
77
|
address: "Message reply-to"
|
75
78
|
layout: "Email layout"
|
@@ -95,7 +98,7 @@ en:
|
|
95
98
|
access_open: "Open"
|
96
99
|
access_restricted: "Restricted"
|
97
100
|
access_restricted_to: "only visible to %{groups}"
|
98
|
-
account_settings: "
|
101
|
+
account_settings: "Preferences"
|
99
102
|
account_updated: "Your account has been updated"
|
100
103
|
activate_account: "Activate your account"
|
101
104
|
activation_complete: "Thank you very much for persevering with the registration process. Your account is now active."
|
@@ -159,12 +162,12 @@ en:
|
|
159
162
|
directory: "Directory"
|
160
163
|
edit_profile: "Edit profile"
|
161
164
|
groups: "Your groups"
|
162
|
-
introduction: "Hello %{name}
|
165
|
+
introduction: "<strong>Hello %{name}.</strong> Welcome back. This page gathers together recent activity, useful links and bits of administration. You can always get back here by clicking on a 'dashboard' link."
|
163
166
|
listing: "Directory listing"
|
164
167
|
messages: "Messages for you"
|
165
168
|
profile: "Your page"
|
166
169
|
title: "Welcome"
|
167
|
-
welcome: "Hello %{name}
|
170
|
+
welcome: "<strong>Hello %{name}.</strong> Welcome to %{site} and thank you for persevering with the registration process. Your account is now active and this is your (empty) dashboard page."
|
168
171
|
delete_group: "delete group"
|
169
172
|
delete_message: "Delete message"
|
170
173
|
delete_message: "delete message"
|
@@ -187,6 +190,7 @@ en:
|
|
187
190
|
download_as: "Download as"
|
188
191
|
download_group_as: "You can download the whole group as"
|
189
192
|
download_vcard: "Download vcard"
|
193
|
+
edit: "edit"
|
190
194
|
edit_group: "edit group"
|
191
195
|
edit_message: "Edit message"
|
192
196
|
edit_profile: "Edit your profile"
|
@@ -209,6 +213,7 @@ en:
|
|
209
213
|
form_notes:
|
210
214
|
account:
|
211
215
|
description: "This appears at the top of your profile page."
|
216
|
+
dob: "This is used for some calculations and might appear in your profile."
|
212
217
|
email: "we will send activation instructions to this address"
|
213
218
|
existing_password: "leave blank to keep present password. If changing, at least four characters."
|
214
219
|
forename: "This is normally how we refer to you..."
|
@@ -430,6 +435,7 @@ en:
|
|
430
435
|
your_groups: "Your groups"
|
431
436
|
your_group_members: "All your group members"
|
432
437
|
your_name: "Your name"
|
438
|
+
welcome: "Hello %{name}."
|
433
439
|
readers: "Readers"
|
434
440
|
settings: "Settings"
|
435
441
|
time:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RadiantReaderExtension
|
2
|
-
VERSION = '3.0.
|
2
|
+
VERSION = '3.0.35'
|
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_admin_ui.rb
CHANGED
@@ -29,7 +29,7 @@ module ReaderAdminUI
|
|
29
29
|
OpenStruct.new.tap do |reader|
|
30
30
|
reader.edit = Radiant::AdminUI::RegionSet.new do |edit|
|
31
31
|
edit.main.concat %w{edit_header edit_form}
|
32
|
-
edit.form.concat %w{edit_name edit_email edit_nickname edit_password reader_groups edit_address edit_phone edit_description edit_notes}
|
32
|
+
edit.form.concat %w{edit_name edit_email edit_nickname edit_password edit_dob reader_groups edit_address edit_phone edit_description edit_notes}
|
33
33
|
edit.form_bottom.concat %w{edit_timestamp edit_buttons}
|
34
34
|
end
|
35
35
|
reader.index = Radiant::AdminUI::RegionSet.new do |index|
|
@@ -104,7 +104,7 @@ module ReaderAdminUI
|
|
104
104
|
OpenStruct.new.tap do |account|
|
105
105
|
account.dashboard = Radiant::AdminUI::RegionSet.new do |dashboard|
|
106
106
|
dashboard.main.concat %w{dashboard/welcome dashboard/groups}
|
107
|
-
dashboard.sidebar.concat %w{dashboard/profile dashboard/messages
|
107
|
+
dashboard.sidebar.concat %w{dashboard/profile dashboard/messages}
|
108
108
|
end
|
109
109
|
account.index = Radiant::AdminUI::RegionSet.new do |index|
|
110
110
|
index.main.concat %w{readers/directory}
|
@@ -115,12 +115,12 @@ module ReaderAdminUI
|
|
115
115
|
end
|
116
116
|
account.edit = Radiant::AdminUI::RegionSet.new do |edit|
|
117
117
|
edit.main.concat %w{preamble form gravatar}
|
118
|
-
edit.form.concat %w{edit_name edit_email
|
118
|
+
edit.form.concat %w{edit_name edit_email edit_password}
|
119
119
|
edit.form_bottom.concat %w{edit_buttons}
|
120
120
|
end
|
121
121
|
account.edit_profile = Radiant::AdminUI::RegionSet.new do |edit_profile|
|
122
122
|
edit_profile.main.concat %w{preamble profile_form gravatar}
|
123
|
-
edit_profile.profile_form.concat %w{edit_honorific edit_name
|
123
|
+
edit_profile.profile_form.concat %w{edit_honorific edit_name edit_dob edit_phone edit_mobile edit_address edit_shareability}
|
124
124
|
edit_profile.form_bottom.concat %w{edit_buttons}
|
125
125
|
end
|
126
126
|
account.new = account.edit
|
@@ -1,28 +1,30 @@
|
|
1
1
|
(function($) {
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
$.fn.rails_flash = function() {
|
4
|
+
this.each(function() {
|
5
|
+
var self = $(this);
|
6
6
|
var closer = $('<a href="#" class="closer">x</a>').appendTo(self);
|
7
7
|
closer.click( function (event) {
|
8
8
|
event.preventDefault();
|
9
9
|
self.fadeOut('fast');
|
10
10
|
});
|
11
|
-
|
12
|
-
|
11
|
+
});
|
12
|
+
return this;
|
13
13
|
};
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
$.fn.toggler = function() {
|
16
|
+
this.each(function() {
|
17
|
+
var self = $(this);
|
18
|
+
var toggling = $(self.attr('rel'));
|
19
19
|
self.click( function (event) {
|
20
20
|
event.preventDefault();
|
21
21
|
toggling.toggle();
|
22
|
+
if (toggling.is(':visible')) self.text(self.text().replace('more', 'fewer'));
|
23
|
+
else self.text(self.text().replace('fewer', 'more'));
|
22
24
|
});
|
23
|
-
|
24
|
-
|
25
|
-
|
25
|
+
});
|
26
|
+
return this;
|
27
|
+
};
|
26
28
|
|
27
29
|
$.ajaxSetup({
|
28
30
|
'beforeSend': function(xhr) {
|
@@ -38,18 +40,18 @@
|
|
38
40
|
if (e.target) e.target.blur();
|
39
41
|
}
|
40
42
|
}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
|
44
|
+
$.fn.fetch_remote_content = function() {
|
45
|
+
this.each(function() {
|
46
|
+
var self = $(this);
|
47
|
+
var url = self.attr('href');
|
48
|
+
if (url) {
|
49
|
+
self.addClass('waiting');
|
48
50
|
$.get(url, function (result) { self.replaceWith($(result)); }, 'html');
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
}
|
52
|
+
});
|
53
|
+
return this;
|
54
|
+
};
|
53
55
|
|
54
56
|
/*
|
55
57
|
* jQuery Color Animations
|
@@ -72,7 +74,7 @@
|
|
72
74
|
Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10), 255), 0),
|
73
75
|
Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10), 255), 0)
|
74
76
|
].join(",") + ")";
|
75
|
-
}
|
77
|
+
};
|
76
78
|
});
|
77
79
|
|
78
80
|
// Color Conversion functions from highlightFade
|
@@ -112,6 +112,13 @@ form.friendly
|
|
112
112
|
line-height: 1.2
|
113
113
|
color: $pale
|
114
114
|
border: 1px solid $pale
|
115
|
+
span.dateparts
|
116
|
+
display: block
|
117
|
+
overflow: hidden
|
118
|
+
select
|
119
|
+
float: left
|
120
|
+
width: auto
|
121
|
+
margin-right: 0.5em
|
115
122
|
span.error-with-field
|
116
123
|
input, select
|
117
124
|
border: 1px solid red
|
@@ -166,8 +173,14 @@ div.indented
|
|
166
173
|
text-align: right
|
167
174
|
|
168
175
|
a.vcard
|
169
|
-
|
170
|
-
|
176
|
+
color: #50860e
|
177
|
+
padding-left: 20px
|
178
|
+
background: transparent url(/images/furniture/vcard-16x16.png) no-repeat 0 0
|
179
|
+
|
180
|
+
a.vcards
|
181
|
+
color: #50860e
|
182
|
+
padding-left: 24px
|
183
|
+
background: transparent url(/images/furniture/vcards.png) no-repeat 0 0
|
171
184
|
|
172
185
|
h2
|
173
186
|
span.headernote
|
@@ -179,7 +192,11 @@ h2
|
|
179
192
|
text-indent: -100px
|
180
193
|
padding-left: 0
|
181
194
|
margin-right: 4px
|
182
|
-
|
195
|
+
|
196
|
+
h3
|
197
|
+
span.note
|
198
|
+
font-size: 60%
|
199
|
+
|
183
200
|
a.mailto
|
184
201
|
color: $mid
|
185
202
|
|
@@ -211,6 +228,14 @@ ul.groups
|
|
211
228
|
margin-right: 1em
|
212
229
|
display: inline
|
213
230
|
|
231
|
+
.groups
|
232
|
+
.group
|
233
|
+
float: left
|
234
|
+
margin-right: 32px
|
235
|
+
|
236
|
+
.readers
|
237
|
+
clear: left
|
238
|
+
|
214
239
|
.cleared
|
215
240
|
clear: left
|
216
241
|
|
data/reader_extension.rb
CHANGED
@@ -14,7 +14,8 @@ class ReaderExtension < Radiant::Extension
|
|
14
14
|
SiteController.send :include, SiteControllerExtensions # access control based on group membership
|
15
15
|
User.send :include, ReaderUser # update linked reader when user account values change
|
16
16
|
Page.send :include, GroupedPage # group associations and visibility decisions
|
17
|
-
|
17
|
+
RailsPage.send :include, GroupedRailsPage # some control over the caching of ShareLayouts pages
|
18
|
+
# Site.send :include, ReaderSite if defined? Site # adds site scope and site-based layout-chooser
|
18
19
|
Page.send :include, ReaderTags # a few mailmerge-like radius tags for use in messages, or for greeting readers on (uncached) pages
|
19
20
|
UserActionObserver.instance.send :add_observer!, Reader
|
20
21
|
UserActionObserver.instance.send :add_observer!, Message
|
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: 65
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 35
|
10
|
+
version: 3.0.35
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- William Ross
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-11-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-11-22 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: radiant-layouts-extension
|
@@ -305,10 +304,12 @@ files:
|
|
305
304
|
- db/migrate/20110908194602_membership_attributes.rb
|
306
305
|
- db/migrate/20111013134949_sort_out_names.rb
|
307
306
|
- db/migrate/20111013203306_remove_login.rb
|
307
|
+
- db/migrate/20111122115514_date_of_birth.rb
|
308
308
|
- lib/controller_extensions.rb
|
309
309
|
- lib/group_tags.rb
|
310
310
|
- lib/grouped_model.rb
|
311
311
|
- lib/grouped_page.rb
|
312
|
+
- lib/grouped_rails_page.rb
|
312
313
|
- lib/message_tags.rb
|
313
314
|
- lib/radiant-reader-extension.rb
|
314
315
|
- lib/reader_admin_ui.rb
|
@@ -361,11 +362,10 @@ files:
|
|
361
362
|
- spec/models/reader_spec.rb
|
362
363
|
- spec/spec.opts
|
363
364
|
- spec/spec_helper.rb
|
364
|
-
has_rdoc: true
|
365
365
|
homepage: http://radiant.spanner.org/reader
|
366
366
|
licenses: []
|
367
367
|
|
368
|
-
post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.
|
368
|
+
post_install_message: "\n Add this to your radiant project with a line in your Gemfile:\n\n gem 'radiant-reader-extension', '~> 3.0.35'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
|
369
369
|
rdoc_options: []
|
370
370
|
|
371
371
|
require_paths:
|
@@ -391,7 +391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
391
391
|
requirements: []
|
392
392
|
|
393
393
|
rubyforge_project:
|
394
|
-
rubygems_version: 1.
|
394
|
+
rubygems_version: 1.8.10
|
395
395
|
signing_key:
|
396
396
|
specification_version: 3
|
397
397
|
summary: Reader/viewer/visitor registration, login and access-control for Radiant CMS
|