radiant-reader-extension 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/accounts_controller.rb +11 -1
- data/app/views/accounts/dashboard.html.haml +4 -3
- data/app/views/dashboard/_description.html.haml +1 -1
- data/app/views/dashboard/_directory.html.haml +1 -1
- data/app/views/dashboard/_profile.html.haml +1 -1
- data/app/views/groups/_group.html.haml +5 -3
- data/app/views/groups/index.html.haml +4 -0
- data/app/views/groups/show.html.haml +3 -1
- data/app/views/readers/_directory.html.haml +23 -0
- data/app/views/readers/_links.html.haml +2 -5
- data/app/views/readers/_profile.html.haml +1 -1
- data/app/views/readers/_reader.html.haml +1 -1
- data/app/views/readers/index.html.haml +1 -0
- data/app/views/readers/show.html.haml +2 -0
- data/config/locales/en.yml +5 -4
- data/lib/radiant-reader-extension.rb +1 -1
- data/lib/reader_admin_ui.rb +2 -2
- data/public/stylesheets/sass/reader.sass +36 -10
- metadata +6 -7
- data/app/views/readers/_groups.html.haml +0 -9
- data/app/views/readers/_people.html.haml +0 -6
@@ -14,6 +14,7 @@ class AccountsController < ReaderActionController
|
|
14
14
|
def index
|
15
15
|
respond_to do |format|
|
16
16
|
format.html {
|
17
|
+
set_expiry
|
17
18
|
render :template => 'readers/index'
|
18
19
|
}
|
19
20
|
format.csv {
|
@@ -28,6 +29,7 @@ class AccountsController < ReaderActionController
|
|
28
29
|
def show
|
29
30
|
respond_to do |format|
|
30
31
|
format.html {
|
32
|
+
set_expiry
|
31
33
|
render :template => 'readers/show'
|
32
34
|
}
|
33
35
|
format.vcard {
|
@@ -100,6 +102,14 @@ class AccountsController < ReaderActionController
|
|
100
102
|
|
101
103
|
protected
|
102
104
|
|
105
|
+
def set_expiry
|
106
|
+
if Radiant.config['directory.visibility'] == 'public'
|
107
|
+
expires_in 1.day
|
108
|
+
else
|
109
|
+
expires_now
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
103
113
|
def i_am_me
|
104
114
|
params[:id] = current_reader.id if current_reader && params[:id] == 'me'
|
105
115
|
end
|
@@ -142,7 +152,7 @@ private
|
|
142
152
|
|
143
153
|
def get_readers_and_groups
|
144
154
|
@readers = Reader.visible_to(current_reader)
|
145
|
-
@groups =
|
155
|
+
@groups = current_reader.all_visible_groups
|
146
156
|
@reader = Reader.find(params[:id]) if params[:id]
|
147
157
|
end
|
148
158
|
|
@@ -18,10 +18,11 @@
|
|
18
18
|
= render :partial => 'shared/standard_reader_parts'
|
19
19
|
|
20
20
|
- content_for :sidebar do
|
21
|
-
|
21
|
+
= render_region :sidebar
|
22
|
+
// UI => dashboard/profile dashboard/messages dashboard/directory
|
22
23
|
|
23
24
|
- content_for :main do
|
24
|
-
|
25
|
-
|
25
|
+
= render_region :main
|
26
|
+
// UI => dashboard/welcome dashboard/groups dashboard/description
|
26
27
|
|
27
28
|
= yield :main
|
@@ -4,9 +4,11 @@
|
|
4
4
|
|
5
5
|
%p.context
|
6
6
|
= t("reader_extension.member_count", :count => group.readers.count) + '.'
|
7
|
-
= link_to t('reader_extension.directory.vcard_link'), group_url(group, :format => :vcard), :class => 'vcard'
|
8
|
-
= link_to t('reader_extension.directory.csv_link'), group_url(group, :format => :csv), :class => 'csv'
|
9
7
|
|
10
8
|
- if group.description
|
11
9
|
%p
|
12
|
-
= group.description
|
10
|
+
= group.description
|
11
|
+
|
12
|
+
- if group.children.any?
|
13
|
+
.indented
|
14
|
+
= render :partial => 'groups/group', :collection => group.children
|
@@ -2,6 +2,10 @@
|
|
2
2
|
%p
|
3
3
|
=t('reader_extension.groups_introduction')
|
4
4
|
|
5
|
+
- content_for :breadhead do
|
6
|
+
= link_to t('reader_extension.readers_title').titlecase, reader_index_url
|
7
|
+
= t('reader_extension.separator')
|
8
|
+
|
5
9
|
- content_for :breadcrumbs do
|
6
10
|
= link_to t('reader_extension.home').titlecase, '/'
|
7
11
|
= t('reader_extension.separator')
|
@@ -32,7 +32,9 @@
|
|
32
32
|
= t('reader_extension.subgroups', :name => @group.name)
|
33
33
|
= render :partial => 'groups/group', :collection => @group.children
|
34
34
|
|
35
|
-
|
35
|
+
%h2
|
36
|
+
= t('reader_extension.group_members')
|
37
|
+
= render :partial => 'readers/list', :locals => {:readers => @readers}
|
36
38
|
|
37
39
|
= yield :main
|
38
40
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- case Radiant.config['reader.directory_visibility']
|
2
|
+
- when 'public'
|
3
|
+
- if @groups.any?
|
4
|
+
%h2
|
5
|
+
= t('reader_extension.groups').titlecase
|
6
|
+
= render :partial => 'groups/group', :collection => @groups
|
7
|
+
- if @readers.any?
|
8
|
+
%h2
|
9
|
+
= t('reader_extension.people').titlecase
|
10
|
+
= render :partial => 'readers/list', :locals => {:readers => @readers}
|
11
|
+
|
12
|
+
- when 'grouped'
|
13
|
+
%h2
|
14
|
+
= t('reader_extension.your_groups')
|
15
|
+
- if @groups.any
|
16
|
+
= render :partial => 'groups/group', :collection => @groups
|
17
|
+
- else
|
18
|
+
= t('reader_extension.no_groups')
|
19
|
+
|
20
|
+
- else
|
21
|
+
= t('reader_extension.no_directory')
|
22
|
+
|
23
|
+
|
@@ -4,9 +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)
|
8
8
|
%li
|
9
|
-
= link_to t("reader_extension.directory.vcard_link"), readers_url(:format => :vcard)
|
10
|
-
- Group.visible_to(current_reader).each do |group|
|
11
|
-
%li
|
12
|
-
= link_to_group(group) + ' ' + t('group')
|
9
|
+
= link_to t("reader_extension.directory.vcard_link"), readers_url(:format => :vcard)
|
data/config/locales/en.yml
CHANGED
@@ -153,7 +153,7 @@ en:
|
|
153
153
|
delivery_status: "Delivery"
|
154
154
|
directory:
|
155
155
|
contact: "Contact"
|
156
|
-
csv_link: "
|
156
|
+
csv_link: "CSV"
|
157
157
|
email: "Email"
|
158
158
|
groups: "Groups"
|
159
159
|
link: "Browse members list"
|
@@ -163,7 +163,7 @@ en:
|
|
163
163
|
postal_address: "Address"
|
164
164
|
profile: "Profile"
|
165
165
|
title: "Directory"
|
166
|
-
vcard_link: "
|
166
|
+
vcard_link: "vcard"
|
167
167
|
dont_fill: "Don't fill this in!"
|
168
168
|
download_as: "Download as"
|
169
169
|
download_group_as: "Download the whole group as"
|
@@ -208,7 +208,6 @@ en:
|
|
208
208
|
group: "group"
|
209
209
|
group_filter: "Show only members of the group: "
|
210
210
|
group_invitation: "This is the invitation message"
|
211
|
-
group_members: "Group Members"
|
212
211
|
group_members: "Group members"
|
213
212
|
group_page: "group page"
|
214
213
|
group_welcome: "This is the welcome message"
|
@@ -280,6 +279,7 @@ en:
|
|
280
279
|
new_password_instructions: "Please enter and confirm the new password you would like to use. It should be at least six characters long, nothing obvious or typical and with at least one non-letter character."
|
281
280
|
'no': "no"
|
282
281
|
no_description: "No description available"
|
282
|
+
no_directory: "This site does not make user information public."
|
283
283
|
no_invitation_message: "This group has no invitation message. You will need to create one before you can invite people into it."
|
284
284
|
no_mobile: "no mobile"
|
285
285
|
none_option: "<none>"
|
@@ -331,7 +331,7 @@ en:
|
|
331
331
|
reader_saved: "Reader saved"
|
332
332
|
readers: 'People'
|
333
333
|
readers_introduction_edit: 'You can update your listing by <a href="%{url}">editing your profile</a>.'
|
334
|
-
readers_introduction_grouped: "This is a private directory
|
334
|
+
readers_introduction_grouped: "This is a private directory: information is only shared among members of the same groups."
|
335
335
|
readers_introduction_none: "This site does not provide a directory of members."
|
336
336
|
readers_introduction_private: "This is a private directory visible only to logged-in users of the site."
|
337
337
|
readers_introduction_public: "Click on a person to see their profile, contact information and other details."
|
@@ -395,6 +395,7 @@ en:
|
|
395
395
|
you_are_not_shared: "You have chosen not to share your contact information."
|
396
396
|
your_description: "Your profile text"
|
397
397
|
your_email: "Your email address"
|
398
|
+
your_groups: "Your groups"
|
398
399
|
your_name: "Your name"
|
399
400
|
readers: "Readers"
|
400
401
|
settings: "Settings"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RadiantReaderExtension
|
2
|
-
VERSION = '3.0.
|
2
|
+
VERSION = '3.0.2'
|
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
@@ -103,11 +103,11 @@ module ReaderAdminUI
|
|
103
103
|
def load_default_account_regions
|
104
104
|
OpenStruct.new.tap do |account|
|
105
105
|
account.dashboard = Radiant::AdminUI::RegionSet.new do |dashboard|
|
106
|
-
dashboard.main.concat %w{dashboard/welcome dashboard/groups
|
106
|
+
dashboard.main.concat %w{dashboard/welcome dashboard/groups}
|
107
107
|
dashboard.sidebar.concat %w{dashboard/profile dashboard/messages dashboard/directory}
|
108
108
|
end
|
109
109
|
account.index = Radiant::AdminUI::RegionSet.new do |index|
|
110
|
-
index.main.concat %w{readers/
|
110
|
+
index.main.concat %w{readers/directory}
|
111
111
|
end
|
112
112
|
account.show = Radiant::AdminUI::RegionSet.new do |show|
|
113
113
|
show.main.concat %w{readers/memberships readers/description}
|
@@ -122,7 +122,10 @@ form.friendly
|
|
122
122
|
margin-left: 10px
|
123
123
|
color: white
|
124
124
|
text-decoration: none
|
125
|
-
|
125
|
+
|
126
|
+
div.indented
|
127
|
+
margin-left: 40px
|
128
|
+
|
126
129
|
.dashboard_module
|
127
130
|
margin-top: 2em
|
128
131
|
&:first-child
|
@@ -136,11 +139,12 @@ form.friendly
|
|
136
139
|
#marginalia
|
137
140
|
div.contact
|
138
141
|
border: 1px solid $paler
|
139
|
-
+box-shadow
|
142
|
+
+box-shadow(1px 2px 3px)
|
140
143
|
padding: 1em
|
141
144
|
margin: 1em -1em
|
142
145
|
h3
|
143
146
|
margin-bottom: 1em
|
147
|
+
margin-left: -4px
|
144
148
|
ul
|
145
149
|
margin-bottom: 0
|
146
150
|
li
|
@@ -150,15 +154,12 @@ form.friendly
|
|
150
154
|
margin-right: 0.5em
|
151
155
|
address
|
152
156
|
overflow: hidden
|
153
|
-
|
154
|
-
|
155
|
-
padding-left: 12px
|
156
|
-
background: transparent url(/images/furniture/vcard_tiny.png) no-repeat 0 0
|
157
|
-
&:hover
|
158
|
-
background-position: 0 -19px
|
157
|
+
li.edit
|
158
|
+
text-align: right
|
159
159
|
|
160
|
-
a.
|
161
|
-
|
160
|
+
a.vcard
|
161
|
+
padding-left: 30px
|
162
|
+
background: transparent url(/images/furniture/vcard.png) no-repeat 0 0
|
162
163
|
|
163
164
|
h2
|
164
165
|
span.headernote
|
@@ -235,3 +236,28 @@ div#preview
|
|
235
236
|
margin: 0
|
236
237
|
border: 0
|
237
238
|
overflow: auto
|
239
|
+
|
240
|
+
table.readers
|
241
|
+
td
|
242
|
+
vertical-align: top
|
243
|
+
padding-right: 1em
|
244
|
+
padding: 0.25em 1em 0.25em 0
|
245
|
+
border-bottom: 1px dotted $pale
|
246
|
+
h4
|
247
|
+
white-space: nowrap
|
248
|
+
h3, p
|
249
|
+
margin: 0
|
250
|
+
line-height: 25px
|
251
|
+
td.phone, td.mobile
|
252
|
+
white-space: nowrap
|
253
|
+
td.missing
|
254
|
+
color: $pale
|
255
|
+
font-size: 80%
|
256
|
+
tr:last-child
|
257
|
+
td
|
258
|
+
border-bottom: none
|
259
|
+
|
260
|
+
p.exception
|
261
|
+
color: #c00
|
262
|
+
font-size: 150%
|
263
|
+
text-align: center
|
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: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 2
|
10
|
+
version: 3.0.2
|
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-09-
|
18
|
+
date: 2011-09-08 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -251,12 +251,11 @@ files:
|
|
251
251
|
- app/views/reader_sessions/_login_form.html.haml
|
252
252
|
- app/views/reader_sessions/new.html.haml
|
253
253
|
- app/views/readers/_description.html.haml
|
254
|
-
- app/views/readers/
|
254
|
+
- app/views/readers/_directory.html.haml
|
255
255
|
- app/views/readers/_links.html.haml
|
256
256
|
- app/views/readers/_list.html.haml
|
257
257
|
- app/views/readers/_memberships.html.haml
|
258
258
|
- app/views/readers/_mugshot.html.haml
|
259
|
-
- app/views/readers/_people.html.haml
|
260
259
|
- app/views/readers/_profile.html.haml
|
261
260
|
- app/views/readers/_reader.html.haml
|
262
261
|
- app/views/readers/index.html.haml
|
@@ -350,7 +349,7 @@ has_rdoc: true
|
|
350
349
|
homepage: http://radiant.spanner.org/reader
|
351
350
|
licenses: []
|
352
351
|
|
353
|
-
post_install_message: "\n Add this to your radiant project with:\n\n config.gem 'radiant-reader-extension', :version => '~> 3.0.
|
352
|
+
post_install_message: "\n Add this to your radiant project with:\n\n config.gem 'radiant-reader-extension', :version => '~> 3.0.2'\n\n and if you haven't already, remember to enable ActionMailer in your\n project's config/environment.rb.\n "
|
354
353
|
rdoc_options: []
|
355
354
|
|
356
355
|
require_paths:
|