radiant-reader-extension 2.0.0.rc4 → 3.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/README.md +9 -5
  2. data/app/controllers/{readers_controller.rb → accounts_controller.rb} +31 -30
  3. data/app/controllers/groups_controller.rb +35 -0
  4. data/app/controllers/messages_controller.rb +1 -0
  5. data/app/controllers/password_resets_controller.rb +6 -6
  6. data/app/controllers/reader_action_controller.rb +8 -0
  7. data/app/controllers/reader_activations_controller.rb +3 -2
  8. data/app/controllers/reader_sessions_controller.rb +6 -2
  9. data/app/helpers/reader_helper.rb +61 -17
  10. data/app/models/group.rb +33 -5
  11. data/app/models/message.rb +7 -4
  12. data/app/models/message_reader.rb +4 -0
  13. data/app/models/reader.rb +71 -3
  14. data/app/models/reader_page.rb +56 -0
  15. data/app/views/{readers → accounts}/_contributions.html.haml +0 -0
  16. data/app/views/{readers → accounts}/_controls.html.haml +1 -2
  17. data/app/views/accounts/_description.html.haml +2 -0
  18. data/app/views/{readers → accounts}/_extra_controls.html.haml +0 -0
  19. data/app/views/{readers → accounts}/_flasher.html.haml +0 -0
  20. data/app/views/{readers → accounts}/_form.html.haml +10 -15
  21. data/app/views/accounts/_gravatar.html.haml +3 -0
  22. data/app/views/accounts/_groups.html.haml +9 -0
  23. data/app/views/accounts/_links.html.haml +12 -0
  24. data/app/views/accounts/_list.html.haml +17 -0
  25. data/app/views/{readers → accounts}/_memberships.html.haml +0 -0
  26. data/app/views/accounts/_profile.html.haml +29 -0
  27. data/app/views/accounts/_profile_form.html.haml +86 -0
  28. data/app/views/accounts/_reader.html.haml +10 -0
  29. data/app/views/accounts/dashboard.html.haml +28 -0
  30. data/app/views/{readers → accounts}/edit.html.haml +12 -10
  31. data/app/views/accounts/edit_profile.html.haml +34 -0
  32. data/app/views/accounts/index.html.haml +23 -0
  33. data/app/views/{readers → accounts}/login.html.haml +0 -0
  34. data/app/views/{readers → accounts}/new.html.haml +0 -0
  35. data/app/views/{readers → accounts}/permission_denied.html.haml +0 -0
  36. data/app/views/{readers → accounts}/show.html.haml +9 -12
  37. data/app/views/dashboard/_description.html.haml +3 -0
  38. data/app/views/dashboard/_directory.html.haml +3 -0
  39. data/app/views/dashboard/_groups.html.haml +8 -0
  40. data/app/views/dashboard/_messages.html.haml +11 -0
  41. data/app/views/dashboard/_profile.html.haml +3 -0
  42. data/app/views/dashboard/_welcome.html.haml +5 -0
  43. data/app/views/groups/_all.html.haml +10 -0
  44. data/app/views/groups/index.html.haml +21 -0
  45. data/app/views/groups/show.html.haml +31 -0
  46. data/app/views/messages/show.html.haml +12 -3
  47. data/app/views/reader_sessions/new.html.haml +1 -1
  48. data/app/views/shared/_standard_reader_parts.html.haml +9 -3
  49. data/config/initializers/formats.rb +2 -0
  50. data/config/initializers/radiant_config.rb +3 -0
  51. data/config/locales/en.yml +90 -25
  52. data/config/routes.rb +8 -6
  53. data/db/migrate/20110707101339_group_slugs.rb +9 -0
  54. data/db/migrate/20110711150605_snail_addresses.rb +21 -0
  55. data/db/migrate/20110712081159_directory_permissions.rb +11 -0
  56. data/db/migrate/20110712141134_name_parts.rb +9 -0
  57. data/db/migrate/20110728112254_current_login_at.rb +9 -0
  58. data/lib/grouped_model.rb +16 -12
  59. data/lib/grouped_page.rb +1 -0
  60. data/lib/radiant-reader-extension.rb +1 -1
  61. data/lib/reader_admin_ui.rb +32 -1
  62. data/lib/reader_tags.rb +119 -52
  63. data/lib/site_controller_extensions.rb +2 -2
  64. data/public/stylesheets/sass/reader.sass +49 -0
  65. data/radiant-reader-extension.gemspec +4 -1
  66. data/reader_extension.rb +9 -9
  67. data/spec/controllers/{readers_controller_spec.rb → accounts_controller_spec.rb} +9 -5
  68. data/spec/controllers/groups_controller_spec.rb +17 -0
  69. data/spec/controllers/reader_activations_controller_spec.rb +3 -3
  70. data/spec/datasets/readers_dataset.rb +3 -0
  71. data/spec/lib/reader_tags_spec.rb +55 -0
  72. data/spec/matchers/reader_login_system_matcher.rb +2 -2
  73. data/spec/models/group_spec.rb +6 -0
  74. data/spec/models/reader_page_spec.rb +106 -0
  75. metadata +109 -26
  76. data/app/views/readers/index.html.haml +0 -38
@@ -2,13 +2,26 @@ en:
2
2
  activerecord:
3
3
  attributes:
4
4
  reader:
5
- description: "Text for your profile page"
5
+ description: "Biog"
6
6
  email: "Email address"
7
+ phone: "Home phone"
8
+ mobile: "Mobile phone"
9
+ forename: "Forename"
7
10
  honorific: "Title or rank"
8
- login: "Login username (optional)"
11
+ login: "Login username"
9
12
  name: "Your name"
10
13
  password: "Password"
11
14
  password_confirmation: "Confirm password"
15
+ postal_address: "Postal address"
16
+ post_organisation: "Organisation"
17
+ post_line1: "Building name or number"
18
+ post_line2: "Street"
19
+ post_city: "City or town"
20
+ post_province: "County"
21
+ post_country: "Country"
22
+ postcode: "Postcode"
23
+ surname: "Surname"
24
+ unshareable: "Share none of this information"
12
25
  errors:
13
26
  models:
14
27
  reader:
@@ -26,8 +39,6 @@ en:
26
39
  password:
27
40
  too_short: "this must have at least six characters"
28
41
  invalid: "this must include at least one non-letter"
29
- password_confirmation:
30
-
31
42
 
32
43
  config:
33
44
  reader:
@@ -35,13 +46,15 @@ en:
35
46
  require_confirmation?: "Confirm email addresses"
36
47
  use_honorifics?: "Use honorifics"
37
48
  layout: "Layout for forms"
38
- get_profile?: "As for profile text"
49
+ get_profile?: "Ask for profile text"
50
+ public?: "Readers list public"
51
+ confine_to_groups?: "Show only members of shared groups"
39
52
  email:
40
53
  name: "Message sender"
41
54
  address: "Message reply-to"
42
55
  prefix: "Subject prefix"
43
56
  layout: "Email layout"
44
- reader: "reader"
57
+ reader: "Reader"
45
58
  readers: "Readers"
46
59
  groups: "Groups"
47
60
  messages: "Messages"
@@ -58,6 +71,7 @@ en:
58
71
  activation_required_explanation: "You should have received a confirmation message containing a link that will activate your account."
59
72
  activation_sent: "Activation message sent"
60
73
  affected_fields_highlighted: "The affected fields are highlighted below."
74
+ all: "All"
61
75
  all_deliveries_failed: "All deliveries failed"
62
76
  already_active: "Your account is already active."
63
77
  already_logged_in: "You're already logged in!"
@@ -71,14 +85,48 @@ en:
71
85
  change_gravatar: "change gravatar image"
72
86
  change_password: "Change your password"
73
87
  check_email: "Please check your email for an activation message"
88
+ check_vcard: "Check your contact card"
89
+ checked_fields_public: "Uncheck any field (by clicking on the green tick) that you do not want to publish."
90
+ checked_fields_uncheck: "Click on the arrow to make that field private."
74
91
  confirm_new_password: "Confirm new password"
75
92
  confirm_password: "Confirm password"
76
93
  confirmation_code: "Confirmation code"
77
94
  confirming_email: "When you press the 'register' button we will send a confirmation email to the address you enter above. Click on a link in that message, and you're in."
78
95
  continue: "Continue"
96
+ count_people:
97
+ zero: "(nobody)"
98
+ one: "(one person)"
99
+ other: "(%{count} people)"
79
100
  create_message: "create message"
101
+ csv_file: "a csv file"
102
+ dashboard:
103
+ directory: "Directory"
104
+ edit_profile: "Edit profile"
105
+ profile: "Your page"
106
+ account: "Account settings"
107
+ listing: "Directory listing"
108
+ introduction: "Hello %{name}. Welcome back to %{site}. This page gathers together recent activity, useful links and bits of administration. You can always get back here by clicking on a 'dashboard' link."
109
+ welcome: "Hello %{name}. Welcome to %{site} and thank you for persevering with the registration process. Your account is now active and this is your (empty) dashboard page."
110
+ groups: "Your groups"
111
+ messages: "Messages for you"
112
+ title: "Welcome"
113
+ directory:
114
+ name: "Full name"
115
+ contact: "Contact"
116
+ profile: "Profile"
117
+ email: "Email"
118
+ phone: "Telephone"
119
+ mobile: "Mobile"
120
+ postal_address: "Address"
121
+ link: "Browse members list"
122
+ title: "Directory"
123
+ csv_link: "Download as CSV file"
124
+ vcard_link: "Download to your address book"
125
+ groups: "Groups"
80
126
  dont_fill: "Don't fill this in!"
81
- edit_profile: "edit your profile"
127
+ download_as: "Download as"
128
+ download_group_as: "Download the whole group as"
129
+ edit_profile: "Edit your profile"
82
130
  email_unknown: "Sorry. That email address is not known here."
83
131
  enter_code: "Please enter confirmation code"
84
132
  enter_email_for_reminder: "enter your email address and we will send the message again"
@@ -89,11 +137,19 @@ en:
89
137
  email: "we will send activation instructions to this address"
90
138
  existing_password: "leave blank to keep present password. If changing, at least four characters."
91
139
  login: "you can always use your email address instead"
92
- name: "this is how you will be credited on the site"
140
+ name: "this is how you will be referred to on the site"
93
141
  new_password: "at least six characters, please, and with at least one non-letter character"
94
- honorific: "this is prepended to your name when you are credited"
142
+ honorific: "this is prepended to your name but only in a formal setting"
143
+ post_country: "Please choose from the list"
144
+ post_organisation: "You can omit this unless it's part of your postal address"
145
+ unshareable: "to keep one field private, uncheck it above. To keep all your contact information private and receive only administrative messages, check this box."
146
+ phone: "with area code but no country code"
147
+ mobile: "without country code"
95
148
  form_problem: "there was a problem with the form"
96
149
  getting_gravatar: "If you would like a picture to appear next to your messages, give yourself a gravatar at"
150
+ groups: "Groups"
151
+ group_filter: "Show only members of the group: "
152
+ group_members: "Group Members"
97
153
  hello: "hello"
98
154
  honorific: "Title or rank"
99
155
  invitation_message: "Invitation message"
@@ -103,15 +159,6 @@ en:
103
159
  if_not_you: "If that's not you, please"
104
160
  is_free_and_quick: " is free and only takes a moment"
105
161
  joined_on: "Joined on"
106
- label:
107
- reader:
108
- name: "Your name"
109
- honorific: "Title"
110
- login: "Login username"
111
- email: "Email address"
112
- password: "Password"
113
- repeat_password: "Confirm password"
114
- current_password: "Current password"
115
162
  log_in: 'log in'
116
163
  log_in_or_register: "Please log in here. If you haven't already, you will need to <a href='/register'>register</a> first."
117
164
  log_out: "log out"
@@ -119,14 +166,19 @@ en:
119
166
  login_or_email: "Login name or email address"
120
167
  login_unknown: "Sorry: we don't recognise that combination of username and password."
121
168
  logout_message: "You are logged out. Bye!"
169
+ member: "member"
122
170
  message_delivered: "Message delivered"
171
+ message_preview_introduction: "This is a snapshot of the message that was delivered to you %{date}. If it contains instructions they may now be out of date."
123
172
  must_be_empty: "must be empty"
124
173
  navigation:
125
174
  account: "Your account"
126
175
  activate: "Activate account"
127
176
  admin: "Admin"
177
+ dashboard: "Dashboard"
178
+ directory: "Directory"
128
179
  greeting: "Hello %{name}"
129
- readers: "Readers"
180
+ help: "Help"
181
+ readers: "Members"
130
182
  preferences: "Preferences"
131
183
  profile: "Profile"
132
184
  log_in: "Log in"
@@ -136,7 +188,7 @@ en:
136
188
  your_account: "Preferences"
137
189
  new_account: "Register here"
138
190
  new_password: "New password"
139
- new_password_instructions: "Please enter and confirm the new password you would like to use. It must be at least four characters long, nothing obvious or typical and ideally a mixture of numbers and letters."
191
+ 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."
140
192
  'no': "no"
141
193
  no_description: "No description available"
142
194
  notes: "notes"
@@ -157,9 +209,12 @@ en:
157
209
  please_log_in: "Please log in"
158
210
  please_log_out: "Please log out"
159
211
  please_read_our: "Please read our"
160
- please_register: "Please take a moment to register an account."
212
+ please_register: "Please take a moment to choose a login and password. We need your email address to confirm your identity and send administrative messages: any other information you can fill in later."
161
213
  please_use_form: "Please use the registration form"
162
214
  preferences_intro: "You can use this form to change your preferences and enter a bit more information about yourself."
215
+ profile_intro_private: "The information that you put in here is made available to other members both on the site and in their address books. It is not available to the public and nobody will see it who is not logged in to this site."
216
+ profile_intro_grouped: "The information that you put in here is made available to the other members of your groups both on the site and in their address books. It is not available to the public or to users of this site outside your groups."
217
+ profile_intro_public: "The information that you put in here is made visible to the public. Email addresses are spam-protected but your contact information will be visible to everyone."
163
218
  reader_admin: "Reader administration"
164
219
  reader_emails: "Administrative messages"
165
220
  reader: 'Reader'
@@ -181,7 +236,13 @@ en:
181
236
  return_to_page: "return to the page you were looking at before you started registering"
182
237
  send_it_again: "send it again"
183
238
  send_reset_button: "send me instructions"
239
+ sent_on: "sent %{date}"
184
240
  set_new_password: "set new password"
241
+ showing: "Showing"
242
+ showing_of_total:
243
+ zero: "No %{names} to show."
244
+ one: "Showing one %{name}"
245
+ other: "Showing %{start} to %{finish} of %{count} %{names}"
185
246
  some_deliveries_failed: "Some deliveries failed"
186
247
  sorry: "sorry"
187
248
  sorry_access_denied: "Sorry: access denied"
@@ -199,13 +260,10 @@ en:
199
260
  your_description: "Some text for your profile page"
200
261
  your_email: "Your email address"
201
262
  your_name: "Your name"
202
- count_people:
203
- zero: "(nobody)"
204
- one: "(one person)"
205
- other: "(%{count} people)"
206
263
  send_to: "Send to"
207
264
  reader_configuration_page: "reader settings"
208
265
  welcome_sent_automatically: "This message is sent automatically when someone completes the registration and email-confirmation process."
266
+ welcome_please_log_in: '<span class="greeting">Welcome!</span> To take part, please <a href="%{login_url}">log in</a> or <a href="%{register_url}">register</a>.'
209
267
  password_reset_sent_automatically: "This message is sent automatically when someone asks to reset their password."
210
268
  activation_sent_automatically: "This message is sent automatically when someone begins to register."
211
269
  invitation_sent_automatically: "This message is sent automatically when someone is invited to the site."
@@ -227,6 +285,13 @@ en:
227
285
  update_account: "Save changes"
228
286
  create_account: "Register"
229
287
  separator: " &raquo; "
288
+ vcard_file: "address book"
289
+ you_are_not_shared: "You have chosen not to share your contact information."
230
290
  time:
231
291
  formats:
232
292
  date: "%B %e, %Y"
293
+ recently: "on %A at %l:%M%p"
294
+ standard: "on %B %e, %Y at %l:%M%p"
295
+ this_year: "on %B %e at %l:%M%p"
296
+ today: "today at %l:%M%p"
297
+ yesterday: "yesterday at %l:%M%p"
data/config/routes.rb CHANGED
@@ -9,9 +9,9 @@ ActionController::Routing::Routes.draw do |map|
9
9
  admin.resources :readers, :except => [:show]
10
10
  end
11
11
 
12
- map.resources :readers
12
+ map.resources :readers, :controller => 'accounts'
13
13
  map.resources :messages, :only => [:index, :show], :member => [:preview]
14
- map.resources :groups, :only => [] do |group|
14
+ map.resources :groups, :only => [:index, :show] do |group|
15
15
  group.resources :messages, :only => [:index, :show], :member => [:preview]
16
16
  end
17
17
 
@@ -21,10 +21,12 @@ ActionController::Routing::Routes.draw do |map|
21
21
 
22
22
  map.activate_me '/activate/:id/:activation_code', :controller => 'reader_activations', :action => 'update'
23
23
  map.repassword_me 'repassword/:id/:confirmation_code', :controller => 'password_resets', :action => 'edit'
24
- map.reader_register '/register', :controller => 'readers', :action => 'new'
24
+ map.reader_register '/register', :controller => 'accounts', :action => 'new'
25
25
  map.reader_login '/login', :controller => 'reader_sessions', :action => 'new'
26
- map.reader_account '/account', :controller => 'readers', :action => 'edit'
27
- map.reader_profile '/profile', :controller => 'readers', :action => 'show'
28
26
  map.reader_logout '/logout', :controller => 'reader_sessions', :action => 'destroy'
29
- map.reader_permission_denied '/permission_denied', :controller => 'readers', :action => 'permission_denied'
27
+ map.reader_dashboard '/dashboard', :controller => 'accounts', :action => 'dashboard'
28
+ map.reader_account '/account', :controller => 'accounts', :action => 'edit'
29
+ map.reader_profile '/profile', :controller => 'accounts', :action => 'show'
30
+ map.reader_edit_profile '/edit_profile', :controller => 'accounts', :action => 'edit_profile'
31
+ map.reader_permission_denied '/permission_denied', :controller => 'accounts', :action => 'permission_denied'
30
32
  end
@@ -0,0 +1,9 @@
1
+ class GroupSlugs < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :groups, :slug, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :groups, :slug
8
+ end
9
+ end
@@ -0,0 +1,21 @@
1
+ class SnailAddresses < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :readers, :post_place, :post_organisation
4
+ rename_column :readers, :post_building, :post_line1
5
+ rename_column :readers, :post_street, :post_line2
6
+ rename_column :readers, :post_town, :post_city
7
+ rename_column :readers, :post_county, :post_province
8
+ add_column :readers, :post_country, :string
9
+ add_column :readers, :mobile, :string
10
+ end
11
+
12
+ def self.down
13
+ rename_column :readers, :post_organisation, :post_place
14
+ rename_column :readers, :post_line1, :post_building
15
+ rename_column :readers, :post_line2, :post_street
16
+ rename_column :readers, :post_city, :post_place
17
+ rename_column :readers, :post_province, :post_county
18
+ remove_column :readers, :post_country
19
+ remove_column :readers, :mobile
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ class DirectoryPermissions < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :readers, :unshareable, :boolean
4
+ add_column :readers, :unshared, :text
5
+ end
6
+
7
+ def self.down
8
+ remove_column :readers, :unshareable
9
+ remove_column :readers, :unshared
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class NameParts < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :readers, :surname, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :readers, :surname, :string
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CurrentLoginAt < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :readers, :current_login_at, :datetime
4
+ end
5
+
6
+ def self.down
7
+ remove_column :readers, :current_login_at
8
+ end
9
+ end
data/lib/grouped_model.rb CHANGED
@@ -42,24 +42,28 @@ module GroupedModel
42
42
  }
43
43
  }
44
44
 
45
- named_scope :ungrouped, {
46
- :select => "#{self.table_name}.*, count(pp.id) as group_count",
47
- :joins => "LEFT OUTER JOIN permissions as pp on pp.permitted_id = #{self.table_name}.id AND pp.permitted_type = '#{self.to_s}'",
48
- :having => "group_count = 0",
49
- :group => column_names.map { |n| self.table_name + '.' + n }.join(','), # postgres requires that we group by all selected (but not aggregated) columns
50
- :readonly => false
45
+ named_scope :ungrouped, lambda {
46
+ {
47
+ :select => "#{self.table_name}.*, count(pp.id) as group_count",
48
+ :joins => "LEFT OUTER JOIN permissions as pp on pp.permitted_id = #{self.table_name}.id AND pp.permitted_type = '#{self.to_s}'",
49
+ :having => "group_count = 0",
50
+ :group => column_names.map { |n| self.table_name + '.' + n }.join(','), # postgres requires that we group by all selected (but not aggregated) columns
51
+ :readonly => false
52
+ }
51
53
  } do
52
54
  def count
53
55
  length
54
56
  end
55
57
  end
56
58
 
57
- named_scope :grouped, {
58
- :select => "#{self.table_name}.*, count(pp.id) as group_count",
59
- :joins => "LEFT OUTER JOIN permissions as pp on pp.permitted_id = #{self.table_name}.id AND pp.permitted_type = '#{self.to_s}'",
60
- :having => "group_count > 0",
61
- :group => column_names.map { |n| self.table_name + '.' + n }.join(','),
62
- :readonly => false
59
+ named_scope :grouped, lambda {
60
+ {
61
+ :select => "#{self.table_name}.*, count(pp.id) as group_count",
62
+ :joins => "LEFT OUTER JOIN permissions as pp on pp.permitted_id = #{self.table_name}.id AND pp.permitted_type = '#{self.to_s}'",
63
+ :having => "group_count > 0",
64
+ :group => column_names.map { |n| self.table_name + '.' + n }.join(','),
65
+ :readonly => false
66
+ }
63
67
  } do
64
68
  def count
65
69
  length
data/lib/grouped_page.rb CHANGED
@@ -20,6 +20,7 @@ module GroupedPage
20
20
  permitted_groups_without_inheritance + inherited_groups
21
21
  end
22
22
 
23
+ # this is regrettably expensive
23
24
  def cache?
24
25
  self.permitted_groups.empty?
25
26
  end
@@ -1,5 +1,5 @@
1
1
  module RadiantReaderExtension
2
- VERSION = '2.0.0.rc4'
2
+ VERSION = '3.0.0.rc3'
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"
@@ -3,16 +3,18 @@ module ReaderAdminUI
3
3
  def self.included(base)
4
4
  base.class_eval do
5
5
 
6
- attr_accessor :reader, :message, :group, :reader_configuration
6
+ attr_accessor :reader, :message, :group, :reader_configuration, :account
7
7
  alias_method :readers, :reader
8
8
  alias_method :messages, :message
9
9
  alias_method :groups, :group
10
+ alias_method :accounts, :account #note to self: plurals are called by region_helper
10
11
 
11
12
  def load_reader_extension_regions
12
13
  @reader = load_default_reader_regions
13
14
  @message = load_default_message_regions
14
15
  @group = load_default_group_regions
15
16
  @reader_configuration = load_default_reader_configuration_regions
17
+ @account = load_default_account_regions
16
18
  end
17
19
 
18
20
  def load_default_regions_with_reader
@@ -97,6 +99,35 @@ module ReaderAdminUI
97
99
  end
98
100
  end
99
101
  end
102
+
103
+ def load_default_account_regions
104
+ OpenStruct.new.tap do |account|
105
+ account.dashboard = Radiant::AdminUI::RegionSet.new do |dashboard|
106
+ dashboard.main.concat %w{dashboard/welcome dashboard/groups dashboard/description}
107
+ dashboard.sidebar.concat %w{dashboard/profile dashboard/messages dashboard/directory}
108
+ end
109
+ account.index = Radiant::AdminUI::RegionSet.new do |index|
110
+ index.main.concat %w{list}
111
+ index.sidebar.concat %w{groups/all}
112
+ end
113
+ account.show = Radiant::AdminUI::RegionSet.new do |show|
114
+ show.main.concat %w{groups description}
115
+ show.sidebar.concat %w{profile}
116
+ end
117
+ account.edit = Radiant::AdminUI::RegionSet.new do |edit|
118
+ edit.main.concat %w{preamble form gravatar}
119
+ edit.form.concat %w{edit_name edit_email edit_username edit_password}
120
+ edit.form_bottom.concat %w{edit_buttons}
121
+ end
122
+ account.edit_profile = Radiant::AdminUI::RegionSet.new do |edit_profile|
123
+ edit_profile.main.concat %w{edit_header edit_form}
124
+ edit_profile.form.concat %w{edit_honorific edit_name edit_email edit_phone edit_mobile edit_address edit_shareability}
125
+ edit_profile.form_bottom.concat %w{edit_buttons}
126
+ end
127
+ account.new = account.edit
128
+ end
129
+ end
130
+
100
131
  end
101
132
  end
102
133