caboose-cms 0.5.201 → 0.5.202

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/javascripts/caboose/admin_block_edit.js +20 -10
  3. data/app/assets/javascripts/caboose/admin_post_edit_content.js +313 -0
  4. data/app/assets/stylesheets/caboose/admin_post_edit_content.css +46 -0
  5. data/app/controllers/caboose/admin_controller.rb +4 -4
  6. data/app/controllers/caboose/application_controller.rb +35 -0
  7. data/app/controllers/caboose/blocks_controller.rb +120 -78
  8. data/app/controllers/caboose/checkout_controller.rb +6 -0
  9. data/app/controllers/caboose/posts_controller.rb +87 -21
  10. data/app/controllers/caboose/sites_controller.rb +13 -1
  11. data/app/models/caboose/block.rb +14 -4
  12. data/app/models/caboose/caboose_plugin.rb +4 -0
  13. data/app/models/caboose/core_plugin.rb +1 -1
  14. data/app/models/caboose/post.rb +51 -7
  15. data/app/models/caboose/schema.rb +10 -3
  16. data/app/models/caboose/site.rb +5 -0
  17. data/app/views/caboose/admin/index.html.erb +43 -30
  18. data/app/views/caboose/application/show.html.erb +1 -1
  19. data/app/views/caboose/blocks/_layout_basic.html.erb +1 -1
  20. data/app/views/caboose/blocks/_layout_basic_content.html.erb +1 -1
  21. data/app/views/caboose/blocks/_layout_post.html.erb +28 -0
  22. data/app/views/caboose/blocks/_layout_post_content.html.erb +10 -0
  23. data/app/views/caboose/blocks/_layout_post_footer.html.erb +3 -0
  24. data/app/views/caboose/blocks/_layout_post_header.html.erb +3 -0
  25. data/app/views/caboose/blocks/_post.html.erb +30 -0
  26. data/app/views/caboose/blocks/admin_edit.html.erb +6 -7
  27. data/app/views/caboose/blocks/admin_new.html.erb +4 -3
  28. data/app/views/caboose/posts/_admin_header.html.erb +1 -0
  29. data/app/views/caboose/posts/admin_edit_content.html.erb +14 -21
  30. data/app/views/caboose/posts/admin_edit_content_old.html.erb +32 -0
  31. data/app/views/caboose/posts/admin_edit_general.html.erb +25 -12
  32. data/app/views/caboose/posts/admin_edit_layout.html.erb +48 -0
  33. data/app/views/caboose/posts/admin_edit_preview.html.erb +27 -0
  34. data/app/views/caboose/posts/show.html.erb +16 -0
  35. data/app/views/caboose/sites/admin_edit.html.erb +7 -5
  36. data/app/views/caboose/social/admin_edit.html.erb +1 -1
  37. data/app/views/layouts/caboose/application.html.erb +12 -6
  38. data/config/routes.rb +299 -278
  39. data/lib/caboose/version.rb +1 -1
  40. data/lib/tasks/caboose.rake +15 -1
  41. metadata +13 -2
@@ -19,17 +19,24 @@
19
19
  <%= yield :caboose_css %>
20
20
  <% end %>
21
21
  <%
22
- b = @page.block
22
+ b = @post ? @post.block : @page.block
23
+ #Caboose.log(@post)
23
24
  #Caboose.log(@page.block.inspect)
24
25
  if b.nil?
25
- bt = Caboose::BlockType.where(:name => 'layout_basic').first
26
- Caboose::Block.create(:page_id => @page.id, :block_type_id => bt.id)
27
- b = @page.block
26
+ bt = @site.default_layout
27
+ if @post
28
+ Caboose::Block.create(:post_id => @post.id, :block_type_id => bt.id)
29
+ b = @post.block
30
+ else
31
+ Caboose::Block.create(:page_id => @page.id, :block_type_id => bt.id)
32
+ b = @page.block
33
+ end
28
34
  b.create_children
29
35
  end
30
36
  #b.log_helper
31
37
  options = {
32
- :request => @request,
38
+ :request => @request,
39
+ :post => @post,
33
40
  :page => @page,
34
41
  :view => self,
35
42
  :controller_view_content => yield,
@@ -87,6 +94,5 @@
87
94
  str.gsub!('|CABOOSE_CSRF|' , csrf_meta_tags)
88
95
 
89
96
  %><%= raw str %><%
90
-
91
97
  end
92
98
  %>
@@ -4,388 +4,409 @@ Caboose::Engine.routes.draw do
4
4
  # Front end
5
5
  #=============================================================================
6
6
 
7
- get "admin" => "admin#index"
8
- put "admin/station" => "station#index_admin"
9
- get "station" => "station#index"
10
- get "station/plugin-count" => "station#plugin_count"
11
- get "modal" => "modal#layout"
12
- get "modal/:url" => "modal#index", :constraints => {:url => /.*/}
13
- get "login/forgot-password" => "login#forgot_password_form"
14
- post "login/forgot-password" => "login#send_reset_email"
15
- get "login/reset-password/:reset_id" => "login#reset_password_form"
16
- post "login/reset-password" => "login#reset_password"
17
- get "login" => "login#index"
18
- post "login" => "login#login"
19
- get "logout" => "logout#index"
20
- get "register" => "register#index"
21
- post "register" => "register#register"
7
+ get "/admin" => "admin#index"
8
+ put "/admin/station" => "station#index_admin"
9
+ get "/station" => "station#index"
10
+ get "/station/plugin-count" => "station#plugin_count"
11
+ get "/modal" => "modal#layout"
12
+ get "/modal/:url" => "modal#index", :constraints => {:url => /.*/}
13
+ get "/login/forgot-password" => "login#forgot_password_form"
14
+ post "/login/forgot-password" => "login#send_reset_email"
15
+ get "/login/reset-password/:reset_id" => "login#reset_password_form"
16
+ post "/login/reset-password" => "login#reset_password"
17
+ get "/login" => "login#index"
18
+ post "/login" => "login#login"
19
+ get "/logout" => "logout#index"
20
+ get "/register" => "register#index"
21
+ post "/register" => "register#register"
22
22
 
23
23
  #=============================================================================
24
24
  # My Account
25
25
  #=============================================================================
26
-
27
- #get "my-account" => "users#my_account"
28
- #put "my-account" => "users#update_my_account"
29
26
 
30
- get "my-account/orders/:order_id/line-items/:id/download" => "my_account_line_items#download"
31
- get "my-account/orders/:order_id/line-items/:id" => "my_account_line_items#edit"
32
- get "my-account/orders/:order_id/line-items" => "my_account_line_items#index"
27
+ get "/my-account/orders/:order_id/line-items/:id/download" => "my_account_line_items#download"
28
+ get "/my-account/orders/:order_id/line-items/:id" => "my_account_line_items#edit"
29
+ get "/my-account/orders/:order_id/line-items" => "my_account_line_items#index"
33
30
 
34
- get "my-account/orders/:order_id/billing-address/json" => "billing_addresses#my_account_json"
35
- put "my-account/orders/:order_id/billing-address" => "billing_addresses#my_account_update"
36
- get "my-account/orders/:order_id/shipping-address/json" => "shipping_addresses#my_account_json"
37
- put "my-account/orders/:order_id/shipping-address" => "shipping_addresses#my_account_update"
31
+ get "/my-account/orders/:order_id/billing-address/json" => "billing_addresses#my_account_json"
32
+ put "/my-account/orders/:order_id/billing-address" => "billing_addresses#my_account_update"
33
+ get "/my-account/orders/:order_id/shipping-address/json" => "shipping_addresses#my_account_json"
34
+ put "/my-account/orders/:order_id/shipping-address" => "shipping_addresses#my_account_update"
38
35
 
39
- get "my-account/orders/authnet-relay" => "my_account_orders#authnet_relay"
40
- post "my-account/orders/authnet-relay" => "my_account_orders#authnet_relay"
41
- get "my-account/orders/:id/authnet-response" => "my_account_orders#authnet_response"
42
- post "my-account/orders/:id/authnet-response" => "my_account_orders#authnet_response"
43
- get "my-account/orders/:id/payment-form" => "my_account_orders#payment_form"
44
- get "my-account/orders/:id/json" => "my_account_orders#order_json"
45
- get "my-account/orders/:id/json" => "my_account_orders#order_json"
46
- get "my-account/orders/:id" => "my_account_orders#edit"
47
- get "my-account/orders" => "my_account_orders#index"
36
+ get "/my-account/orders/authnet-relay" => "my_account_orders#authnet_relay"
37
+ post "/my-account/orders/authnet-relay" => "my_account_orders#authnet_relay"
38
+ get "/my-account/orders/:id/authnet-response" => "my_account_orders#authnet_response"
39
+ post "/my-account/orders/:id/authnet-response" => "my_account_orders#authnet_response"
40
+ get "/my-account/orders/:id/payment-form" => "my_account_orders#payment_form"
41
+ get "/my-account/orders/:id/json" => "my_account_orders#order_json"
42
+ get "/my-account/orders/:id/json" => "my_account_orders#order_json"
43
+ get "/my-account/orders/:id" => "my_account_orders#edit"
44
+ get "/my-account/orders" => "my_account_orders#index"
48
45
 
49
- get "my-account" => "my_account#index"
50
- put "my-account" => "my_account#update"
46
+ get "/my-account" => "my_account#index"
47
+ put "/my-account" => "my_account#update"
51
48
 
52
49
  #=============================================================================
53
50
  # Retargeting
54
51
  #=============================================================================
55
-
56
- #get "admin/sites/:site_id/retargeting/fb-auth" => "retargeting#admin_fb_auth"
57
- #get "admin/sites/:site_id/retargeting/fb-audiences" => "retargeting#admin_fb_audiences"
58
- #get "admin/sites/:site_id/retargeting/fb-audiences/:custom_audience_id" => "retargeting#admin_fb_audience_members"
59
-
60
- get "admin/sites/:site_id/retargeting" => "retargeting#admin_edit"
61
- put "admin/sites/:site_id/retargeting" => "retargeting#admin_update"
52
+
53
+ get "/admin/sites/:site_id/retargeting" => "retargeting#admin_edit"
54
+ put "/admin/sites/:site_id/retargeting" => "retargeting#admin_update"
62
55
 
63
56
  #=============================================================================
64
57
  # Sites
65
58
  #=============================================================================
66
-
67
- get "admin/sites/options" => "sites#options"
68
- get "admin/sites/new" => "sites#admin_new"
69
- get "admin/sites/:id/css" => "sites#admin_edit_css"
70
- get "admin/sites/:id/js" => "sites#admin_edit_js"
71
- get "admin/sites/:id/block-types" => "sites#admin_edit_block_types"
72
- get "admin/sites/:id/delete" => "sites#admin_delete_form"
73
- get "admin/sites/:id" => "sites#admin_edit"
74
- get "admin/sites" => "sites#admin_index"
75
-
76
- post "admin/sites" => "sites#admin_add"
77
- post "admin/sites/:id/logo" => "sites#admin_update_logo"
78
- put "admin/sites/:id" => "sites#admin_update"
79
- delete "admin/sites/:id" => "sites#admin_delete"
80
- post "admin/sites/:id/members" => "sites#admin_add_member"
81
- delete "admin/sites/:id/members/:user_id" => "sites#admin_remove_member"
82
-
83
- post "admin/sites/:site_id/domains" => "domains#admin_add"
84
- put "admin/sites/:site_id/domains/:id" => "domains#admin_update"
85
- delete "admin/sites/:site_id/domains/:id" => "domains#admin_delete"
86
- put "admin/sites/:site_id/domains/:id/set-primary" => "domains#admin_set_primary"
59
+
60
+ get "/admin/sites/options" => "sites#options"
61
+ get "/admin/sites/new" => "sites#admin_new"
62
+ get "/admin/sites/:id/default-layout-options" => "sites#admin_default_layout_options"
63
+ get "/admin/sites/:id/css" => "sites#admin_edit_css"
64
+ get "/admin/sites/:id/js" => "sites#admin_edit_js"
65
+ get "/admin/sites/:id/block-types" => "sites#admin_edit_block_types"
66
+ get "/admin/sites/:id/delete" => "sites#admin_delete_form"
67
+ get "/admin/sites/:id" => "sites#admin_edit"
68
+ get "/admin/sites" => "sites#admin_index"
69
+
70
+ post "/admin/sites" => "sites#admin_add"
71
+ post "/admin/sites/:id/logo" => "sites#admin_update_logo"
72
+ put "/admin/sites/:id" => "sites#admin_update"
73
+ delete "/admin/sites/:id" => "sites#admin_delete"
74
+ post "/admin/sites/:id/members" => "sites#admin_add_member"
75
+ delete "/admin/sites/:id/members/:user_id" => "sites#admin_remove_member"
76
+
77
+ post "/admin/sites/:site_id/domains" => "domains#admin_add"
78
+ put "/admin/sites/:site_id/domains/:id" => "domains#admin_update"
79
+ delete "/admin/sites/:site_id/domains/:id" => "domains#admin_delete"
80
+ put "/admin/sites/:site_id/domains/:id/set-primary" => "domains#admin_set_primary"
87
81
 
88
82
  #=============================================================================
89
83
  # Store
90
84
  #=============================================================================
91
85
 
92
- get "admin/store/shipping-method-options" => "store#shipping_method_options"
93
- get "admin/store/payment-processor-options" => "store#payment_processor_options"
94
- get "admin/store/length-unit-options" => "store#length_unit_options"
95
- get "admin/store/weight-unit-options" => "store#weight_unit_options"
96
- get "admin/store/payment" => "store#admin_edit_payment"
97
- get "admin/store/shipping" => "store#admin_edit_shipping"
98
- get "admin/store/tax" => "store#admin_edit_tax"
99
- get "admin/store/packages" => "store#admin_edit_packages"
100
- get "admin/store" => "store#admin_edit_general"
101
- put "admin/store" => "store#admin_update"
86
+ get "/admin/store/shipping-method-options" => "store#shipping_method_options"
87
+ get "/admin/store/payment-processor-options" => "store#payment_processor_options"
88
+ get "/admin/store/length-unit-options" => "store#length_unit_options"
89
+ get "/admin/store/weight-unit-options" => "store#weight_unit_options"
90
+ get "/admin/store/payment" => "store#admin_edit_payment"
91
+ get "/admin/store/shipping" => "store#admin_edit_shipping"
92
+ get "/admin/store/tax" => "store#admin_edit_tax"
93
+ get "/admin/store/packages" => "store#admin_edit_packages"
94
+ get "/admin/store" => "store#admin_edit_general"
95
+ put "/admin/store" => "store#admin_update"
102
96
 
103
97
  #=============================================================================
104
98
  # SMTP
105
99
  #=============================================================================
106
100
 
107
- get "admin/smtp/auth-options" => "smtp#auth_options"
108
- get "admin/smtp" => "smtp#admin_edit"
109
- put "admin/smtp" => "smtp#admin_update"
101
+ get "/admin/smtp/auth-options" => "smtp#auth_options"
102
+ get "/admin/smtp" => "smtp#admin_edit"
103
+ put "/admin/smtp" => "smtp#admin_update"
110
104
 
111
105
  #=============================================================================
112
106
  # Social
113
107
  #=============================================================================
114
108
 
115
- get "admin/social" => "social#admin_edit"
116
- put "admin/social" => "social#admin_update"
117
- get "admin/analytics" => "social#analytics"
109
+ get "/admin/social" => "social#admin_edit"
110
+ put "/admin/social" => "social#admin_update"
111
+ get "/admin/analytics" => "social#analytics"
118
112
 
119
113
 
120
114
  #=============================================================================
121
115
  # Shipping Packages
122
116
  #=============================================================================
123
117
 
124
- get "admin/shipping-packages/options" => "shipping_packages#admin_options"
125
- get "admin/shipping-packages/json" => "shipping_packages#admin_json"
126
- get "admin/shipping-packages/:id/json" => "shipping_packages#admin_json_single"
127
- get "admin/shipping-packages/:id/shipping-method-options" => "shipping_packages#admin_shipping_method_options"
128
- get "admin/shipping-packages/package-method-options" => "shipping_packages#admin_package_method_options"
129
- get "admin/shipping-packages/:id" => "shipping_packages#admin_edit"
130
- get "admin/shipping-packages" => "shipping_packages#admin_index"
131
- put "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_update"
132
- put "admin/shipping-packages/:id" => "shipping_packages#admin_update"
133
- post "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_add"
134
- post "admin/shipping-packages" => "shipping_packages#admin_add"
135
- delete "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_delete"
136
- delete "admin/shipping-packages/:id" => "shipping_packages#admin_delete"
137
- get "admin/shipping-methods/options" => "shipping_packages#admin_shipping_method_options"
118
+ get "/admin/shipping-packages/options" => "shipping_packages#admin_options"
119
+ get "/admin/shipping-packages/json" => "shipping_packages#admin_json"
120
+ get "/admin/shipping-packages/:id/json" => "shipping_packages#admin_json_single"
121
+ get "/admin/shipping-packages/:id/shipping-method-options" => "shipping_packages#admin_shipping_method_options"
122
+ get "/admin/shipping-packages/package-method-options" => "shipping_packages#admin_package_method_options"
123
+ get "/admin/shipping-packages/:id" => "shipping_packages#admin_edit"
124
+ get "/admin/shipping-packages" => "shipping_packages#admin_index"
125
+ put "/admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_update"
126
+ put "/admin/shipping-packages/:id" => "shipping_packages#admin_update"
127
+ post "/admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_add"
128
+ post "/admin/shipping-packages" => "shipping_packages#admin_add"
129
+ delete "/admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_delete"
130
+ delete "/admin/shipping-packages/:id" => "shipping_packages#admin_delete"
131
+ get "/admin/shipping-methods/options" => "shipping_packages#admin_shipping_method_options"
138
132
 
139
133
  #=============================================================================
140
134
  # 301 Redirects
141
135
  #=============================================================================
142
136
 
143
- get "admin/redirects" => "redirects#admin_index"
144
- get "admin/redirects/new" => "redirects#admin_new"
145
- get "admin/redirects/:id" => "redirects#admin_edit"
146
- put "admin/redirects/:id" => "redirects#admin_update"
147
- post "admin/redirects" => "redirects#admin_add"
148
- delete "admin/redirects/:id" => "redirects#admin_delete"
137
+ get "/admin/redirects" => "redirects#admin_index"
138
+ get "/admin/redirects/new" => "redirects#admin_new"
139
+ get "/admin/redirects/:id" => "redirects#admin_edit"
140
+ put "/admin/redirects/:id" => "redirects#admin_update"
141
+ post "/admin/redirects" => "redirects#admin_add"
142
+ delete "/admin/redirects/:id" => "redirects#admin_delete"
149
143
 
150
144
  #=============================================================================
151
145
  # Users
152
146
  #=============================================================================
153
147
 
154
- get "admin/users" => "users#index"
155
- get "admin/users/options" => "users#options"
156
- get "admin/users/new" => "users#new"
157
- get "admin/users/import" => "users#import_form"
158
- post "admin/users/import" => "users#import"
159
- get "admin/users/:id/su" => "users#admin_su"
160
- get "admin/users/:id/edit-password" => "users#edit_password"
161
- get "admin/users/:id" => "users#edit"
162
- put "admin/users/:id" => "users#update"
163
- post "admin/users" => "users#create"
164
- delete "admin/users/:id" => "users#destroy"
148
+ get "/admin/users" => "users#index"
149
+ get "/admin/users/options" => "users#options"
150
+ get "/admin/users/new" => "users#new"
151
+ get "/admin/users/import" => "users#import_form"
152
+ post "/admin/users/import" => "users#import"
153
+ get "/admin/users/:id/su" => "users#admin_su"
154
+ get "/admin/users/:id/edit-password" => "users#edit_password"
155
+ get "/admin/users/:id" => "users#edit"
156
+ put "/admin/users/:id" => "users#update"
157
+ post "/admin/users" => "users#create"
158
+ delete "/admin/users/:id" => "users#destroy"
165
159
 
166
- post "admin/users/:id/roles/:role_id" => "users#add_to_role"
167
- delete "admin/users/:id/roles/:role_id" => "users#remove_from_role"
160
+ post "/admin/users/:id/roles/:role_id" => "users#add_to_role"
161
+ delete "/admin/users/:id/roles/:role_id" => "users#remove_from_role"
168
162
 
169
163
  #=============================================================================
170
164
  # Roles
171
165
  #=============================================================================
172
166
 
173
- get "admin/roles" => "roles#index"
174
- get "admin/roles/options" => "roles#options"
175
- get "admin/roles/new" => "roles#new"
176
- get "admin/roles/:id" => "roles#edit"
177
- put "admin/roles/:id" => "roles#update"
178
- post "admin/roles" => "roles#create"
179
- delete "admin/roles/:id" => "roles#destroy"
167
+ get "/admin/roles" => "roles#index"
168
+ get "/admin/roles/options" => "roles#options"
169
+ get "/admin/roles/new" => "roles#new"
170
+ get "/admin/roles/:id" => "roles#edit"
171
+ put "/admin/roles/:id" => "roles#update"
172
+ post "/admin/roles" => "roles#create"
173
+ delete "/admin/roles/:id" => "roles#destroy"
180
174
 
181
- post "admin/roles/:id/permissions/:permission_id" => "roles#add_permission"
182
- delete "admin/roles/:id/permissions/:permission_id" => "roles#remove_permission"
175
+ post "/admin/roles/:id/permissions/:permission_id" => "roles#add_permission"
176
+ delete "/admin/roles/:id/permissions/:permission_id" => "roles#remove_permission"
183
177
 
184
178
  #=============================================================================
185
179
  # Permissions
186
180
  #=============================================================================
187
181
 
188
- get "admin/permissions" => "permissions#index"
189
- get "admin/permissions/options" => "permissions#options"
190
- get "admin/permissions/new" => "permissions#new"
191
- get "admin/permissions/:id" => "permissions#edit"
192
- put "admin/permissions/:id" => "permissions#update"
193
- post "admin/permissions" => "permissions#create"
194
- delete "admin/permissions/:id" => "permissions#destroy"
182
+ get "/admin/permissions" => "permissions#index"
183
+ get "/admin/permissions/options" => "permissions#options"
184
+ get "/admin/permissions/new" => "permissions#new"
185
+ get "/admin/permissions/:id" => "permissions#edit"
186
+ put "/admin/permissions/:id" => "permissions#update"
187
+ post "/admin/permissions" => "permissions#create"
188
+ delete "/admin/permissions/:id" => "permissions#destroy"
195
189
 
196
190
  #=============================================================================
197
191
  # Images
198
192
  #=============================================================================
199
193
 
200
- get "admin/images" => "images#admin_index"
201
- get "admin/images/s3" => "images#admin_sign_s3"
202
- get "admin/images/s3-result" => "images#admin_s3_result"
203
- get "admin/images/new" => "images#admin_new"
204
- get "admin/images/json" => "images#admin_json"
205
- get "admin/images/:id/process" => "images#admin_process"
206
- get "admin/images/:id/finished" => "images#admin_process_finished"
207
- get "admin/images/:id" => "images#admin_edit"
208
- put "admin/images/:id" => "images#admin_update"
209
- post "admin/images/:id/image" => "images#admin_update_image"
210
- post "admin/images" => "images#admin_add"
211
- delete "admin/images/:id" => "images#admin_delete"
194
+ get "/admin/images" => "images#admin_index"
195
+ get "/admin/images/s3" => "images#admin_sign_s3"
196
+ get "/admin/images/s3-result" => "images#admin_s3_result"
197
+ get "/admin/images/new" => "images#admin_new"
198
+ get "/admin/images/json" => "images#admin_json"
199
+ get "/admin/images/:id/process" => "images#admin_process"
200
+ get "/admin/images/:id/finished" => "images#admin_process_finished"
201
+ get "/admin/images/:id" => "images#admin_edit"
202
+ put "/admin/images/:id" => "images#admin_update"
203
+ post "/admin/images/:id/image" => "images#admin_update_image"
204
+ post "/admin/images" => "images#admin_add"
205
+ delete "/admin/images/:id" => "images#admin_delete"
212
206
 
213
- post "admin/media-categories" => "media_categories#admin_add"
214
- put "admin/media-categories/:id" => "media_categories#admin_update"
215
- delete "admin/media-categories/:id" => "media_categories#admin_delete"
207
+ post "/admin/media-categories" => "media_categories#admin_add"
208
+ put "/admin/media-categories/:id" => "media_categories#admin_update"
209
+ delete "/admin/media-categories/:id" => "media_categories#admin_delete"
216
210
 
217
211
  #=============================================================================
218
212
  # Settings
219
213
  #=============================================================================
220
214
 
221
- get "admin/settings" => "settings#index"
222
- get "admin/settings/options" => "settings#options"
223
- get "admin/settings/new" => "settings#new"
224
- get "admin/settings/:id" => "settings#edit"
225
- put "admin/settings/:id" => "settings#update"
226
- post "admin/settings" => "settings#create"
227
- delete "admin/settings/:id" => "settings#destroy"
215
+ get "/admin/settings" => "settings#index"
216
+ get "/admin/settings/options" => "settings#options"
217
+ get "/admin/settings/new" => "settings#new"
218
+ get "/admin/settings/:id" => "settings#edit"
219
+ put "/admin/settings/:id" => "settings#update"
220
+ post "/admin/settings" => "settings#create"
221
+ delete "/admin/settings/:id" => "settings#destroy"
228
222
 
229
223
  #=============================================================================
230
224
  # Pages
231
225
  #=============================================================================
232
226
 
233
- get "pages/:id" => "pages#show"
234
- get "pages/:id/redirect" => "pages#redirect"
235
- get "admin/pages/sitemap-options" => "pages#admin_sitemap_options"
236
- get "admin/pages/robots-options" => "pages#admin_robots_options"
237
- get "admin/pages/format-options" => "pages#admin_content_format_options"
238
- get "admin/pages/new" => "pages#admin_new"
239
- get "admin/pages/:id/block-options" => "pages#admin_block_options"
240
- get "admin/pages/:id/uri" => "pages#admin_page_uri"
241
- get "admin/pages/:id/delete" => "pages#admin_delete_form"
242
- get "admin/pages/:id/sitemap" => "pages#admin_sitemap"
243
- get "admin/pages/:id/permissions" => "pages#admin_edit_permissions"
244
- get "admin/pages/:id/css" => "pages#admin_edit_css"
245
- get "admin/pages/:id/js" => "pages#admin_edit_js"
246
- get "admin/pages/:id/seo" => "pages#admin_edit_seo"
247
- get "admin/pages/:id/block-order" => "pages#admin_edit_block_order"
248
- put "admin/pages/:id/block-order" => "pages#admin_update_block_order"
249
- get "admin/pages/:id/child-order" => "pages#admin_edit_child_sort_order"
250
- put "admin/pages/:id/child-order" => "pages#admin_update_child_sort_order"
251
- get "admin/pages/:id/new-blocks" => "pages#admin_new_blocks"
252
- get "admin/pages/:id/content" => "pages#admin_edit_content"
253
- get "admin/pages/:id/layout" => "pages#admin_edit_layout"
254
- put "admin/pages/:id/layout" => "pages#admin_update_layout"
255
- put "admin/pages/:id/viewers" => "pages#admin_update_viewers"
256
- put "admin/pages/:id/editors" => "pages#admin_update_editors"
257
- get "admin/pages/:id" => "pages#admin_edit_general"
258
- put "admin/pages/:id" => "pages#admin_update"
259
- get "admin/pages" => "pages#admin_index"
260
- post "admin/pages" => "pages#admin_create"
261
- delete "admin/pages/:id" => "pages#admin_delete"
262
-
263
- post "admin/page-permissions" => "page_permissions#admin_add"
264
- delete "admin/page-permissions" => "page_permissions#admin_delete"
265
- delete "admin/page-permissions/:id" => "page_permissions#admin_delete"
227
+ get "/pages/:id" => "pages#show"
228
+ get "/pages/:id/redirect" => "pages#redirect"
229
+ get "/admin/pages/sitemap-options" => "pages#admin_sitemap_options"
230
+ get "/admin/pages/robots-options" => "pages#admin_robots_options"
231
+ get "/admin/pages/format-options" => "pages#admin_content_format_options"
232
+ get "/admin/pages/new" => "pages#admin_new"
233
+ get "/admin/pages/:id/block-options" => "pages#admin_block_options"
234
+ get "/admin/pages/:id/uri" => "pages#admin_page_uri"
235
+ get "/admin/pages/:id/delete" => "pages#admin_delete_form"
236
+ get "/admin/pages/:id/sitemap" => "pages#admin_sitemap"
237
+ get "/admin/pages/:id/permissions" => "pages#admin_edit_permissions"
238
+ get "/admin/pages/:id/css" => "pages#admin_edit_css"
239
+ get "/admin/pages/:id/js" => "pages#admin_edit_js"
240
+ get "/admin/pages/:id/seo" => "pages#admin_edit_seo"
241
+ get "/admin/pages/:id/block-order" => "pages#admin_edit_block_order"
242
+ put "/admin/pages/:id/block-order" => "pages#admin_update_block_order"
243
+ get "/admin/pages/:id/child-order" => "pages#admin_edit_child_sort_order"
244
+ put "/admin/pages/:id/child-order" => "pages#admin_update_child_sort_order"
245
+ get "/admin/pages/:id/new-blocks" => "pages#admin_new_blocks"
246
+ get "/admin/pages/:id/content" => "pages#admin_edit_content"
247
+ get "/admin/pages/:id/layout" => "pages#admin_edit_layout"
248
+ put "/admin/pages/:id/layout" => "pages#admin_update_layout"
249
+ put "/admin/pages/:id/viewers" => "pages#admin_update_viewers"
250
+ put "/admin/pages/:id/editors" => "pages#admin_update_editors"
251
+ get "/admin/pages/:id" => "pages#admin_edit_general"
252
+ put "/admin/pages/:id" => "pages#admin_update"
253
+ get "/admin/pages" => "pages#admin_index"
254
+ post "/admin/pages" => "pages#admin_create"
255
+ delete "/admin/pages/:id" => "pages#admin_delete"
256
+
257
+ post "/admin/page-permissions" => "page_permissions#admin_add"
258
+ delete "/admin/page-permissions" => "page_permissions#admin_delete"
259
+ delete "/admin/page-permissions/:id" => "page_permissions#admin_delete"
266
260
 
267
- get "admin/pages/:page_id/blocks/new" => "blocks#admin_new"
268
- get "admin/pages/:page_id/blocks/tree" => "blocks#admin_tree"
269
- get "admin/pages/:page_id/blocks/render" => "blocks#admin_render_all"
270
- get "admin/pages/:page_id/blocks/render-second-level" => "blocks#admin_render_second_level"
271
- get "admin/pages/:page_id/blocks/:id/render" => "blocks#admin_render"
272
- get "admin/pages/:page_id/blocks/:id/tree" => "blocks#admin_tree"
273
- get "admin/pages/:page_id/blocks/:id/render" => "blocks#admin_render"
274
- get "admin/pages/:page_id/blocks/:id/edit" => "blocks#admin_edit"
275
- get "admin/pages/:page_id/blocks/:id/advanced" => "blocks#admin_edit_advanced"
276
- put "admin/pages/:page_id/blocks/:id/move-up" => "blocks#admin_move_up"
277
- put "admin/pages/:page_id/blocks/:id/move-down" => "blocks#admin_move_down"
278
- get "admin/pages/:page_id/blocks/:id" => "blocks#admin_show"
279
- get "admin/pages/:page_id/blocks" => "blocks#admin_index"
280
- post "admin/pages/:page_id/blocks" => "blocks#admin_create"
281
- get "admin/pages/:page_id/blocks/:id/new" => "blocks#admin_new"
282
- post "admin/pages/:page_id/blocks/:id" => "blocks#admin_create"
283
- put "admin/pages/:page_id/blocks/:id" => "blocks#admin_update"
284
- delete "admin/pages/:page_id/blocks/:id" => "blocks#admin_delete"
285
-
286
- put "admin/pages/:page_id/blocks/:id" => "blocks#admin_update"
287
- post "admin/pages/:page_id/blocks/:id/image" => "blocks#admin_update_image"
288
- post "admin/pages/:page_id/blocks/:id/file" => "blocks#admin_update_file"
261
+ get "/admin/pages/:page_id/blocks/new" => "blocks#admin_new"
262
+ get "/admin/pages/:page_id/blocks/tree" => "blocks#admin_tree"
263
+ get "/admin/pages/:page_id/blocks/render" => "blocks#admin_render_all"
264
+ get "/admin/pages/:page_id/blocks/render-second-level" => "blocks#admin_render_second_level"
265
+ get "/admin/pages/:page_id/blocks/:id/render" => "blocks#admin_render"
266
+ get "/admin/pages/:page_id/blocks/:id/tree" => "blocks#admin_tree"
267
+ get "/admin/pages/:page_id/blocks/:id/render" => "blocks#admin_render"
268
+ get "/admin/pages/:page_id/blocks/:id/edit" => "blocks#admin_edit"
269
+ get "/admin/pages/:page_id/blocks/:id/advanced" => "blocks#admin_edit_advanced"
270
+ put "/admin/pages/:page_id/blocks/:id/move-up" => "blocks#admin_move_up"
271
+ put "/admin/pages/:page_id/blocks/:id/move-down" => "blocks#admin_move_down"
272
+ get "/admin/pages/:page_id/blocks/:id" => "blocks#admin_show"
273
+ get "/admin/pages/:page_id/blocks" => "blocks#admin_index"
274
+ post "/admin/pages/:page_id/blocks" => "blocks#admin_create"
275
+ get "/admin/pages/:page_id/blocks/:id/new" => "blocks#admin_new"
276
+ post "/admin/pages/:page_id/blocks/:id" => "blocks#admin_create"
277
+ put "/admin/pages/:page_id/blocks/:id" => "blocks#admin_update"
278
+ delete "/admin/pages/:page_id/blocks/:id" => "blocks#admin_delete"
279
+ put "/admin/pages/:page_id/blocks/:id" => "blocks#admin_update"
280
+ post "/admin/pages/:page_id/blocks/:id/image" => "blocks#admin_update_image"
281
+ post "/admin/pages/:page_id/blocks/:id/file" => "blocks#admin_update_file"
282
+
283
+ get "/admin/posts/:post_id/blocks/new" => "blocks#admin_new"
284
+ get "/admin/posts/:post_id/blocks/tree" => "blocks#admin_tree"
285
+ get "/admin/posts/:post_id/blocks/render" => "blocks#admin_render_all"
286
+ get "/admin/posts/:post_id/blocks/render-second-level" => "blocks#admin_render_second_level"
287
+ get "/admin/posts/:post_id/blocks/:id/render" => "blocks#admin_render"
288
+ get "/admin/posts/:post_id/blocks/:id/tree" => "blocks#admin_tree"
289
+ get "/admin/posts/:post_id/blocks/:id/render" => "blocks#admin_render"
290
+ get "/admin/posts/:post_id/blocks/:id/edit" => "blocks#admin_edit"
291
+ get "/admin/posts/:post_id/blocks/:id/advanced" => "blocks#admin_edit_advanced"
292
+ put "/admin/posts/:post_id/blocks/:id/move-up" => "blocks#admin_move_up"
293
+ put "/admin/posts/:post_id/blocks/:id/move-down" => "blocks#admin_move_down"
294
+ get "/admin/posts/:post_id/blocks/:id" => "blocks#admin_show"
295
+ get "/admin/posts/:post_id/blocks" => "blocks#admin_index"
296
+ post "/admin/posts/:post_id/blocks" => "blocks#admin_create"
297
+ get "/admin/posts/:post_id/blocks/:id/new" => "blocks#admin_new"
298
+ post "/admin/posts/:post_id/blocks/:id" => "blocks#admin_create"
299
+ put "/admin/posts/:post_id/blocks/:id" => "blocks#admin_update"
300
+ delete "/admin/posts/:post_id/blocks/:id" => "blocks#admin_delete"
301
+ put "/admin/posts/:post_id/blocks/:id" => "blocks#admin_update"
302
+ post "/admin/posts/:post_id/blocks/:id/image" => "blocks#admin_update_image"
303
+ post "/admin/posts/:post_id/blocks/:id/file" => "blocks#admin_update_file"
289
304
 
290
305
  #=============================================================================
291
306
  # Block types
292
307
  #=============================================================================
293
308
 
294
- get "admin/block-types/store/sources" => "block_type_sources#admin_index"
295
- get "admin/block-types/store/sources/new" => "block_type_sources#admin_new"
296
- get "admin/block-types/store/sources/options" => "block_type_sources#admin_options"
297
- get "admin/block-types/store/sources/:id/edit" => "block_type_sources#admin_edit"
298
- get "admin/block-types/store/sources/:id/refresh" => "block_type_sources#admin_refresh"
299
- post "admin/block-types/store/sources" => "block_type_sources#admin_create"
300
- put "admin/block-types/store/sources/:id" => "block_type_sources#admin_update"
301
- delete "admin/block-types/store/sources/:id" => "block_type_sources#admin_delete"
309
+ get "/admin/block-types/store/sources" => "block_type_sources#admin_index"
310
+ get "/admin/block-types/store/sources/new" => "block_type_sources#admin_new"
311
+ get "/admin/block-types/store/sources/options" => "block_type_sources#admin_options"
312
+ get "/admin/block-types/store/sources/:id/edit" => "block_type_sources#admin_edit"
313
+ get "/admin/block-types/store/sources/:id/refresh" => "block_type_sources#admin_refresh"
314
+ post "/admin/block-types/store/sources" => "block_type_sources#admin_create"
315
+ put "/admin/block-types/store/sources/:id" => "block_type_sources#admin_update"
316
+ delete "/admin/block-types/store/sources/:id" => "block_type_sources#admin_delete"
302
317
 
303
- get "admin/block-types/store/:block_type_summary_id/download" => "block_type_store#admin_download"
304
- get "admin/block-types/store/:block_type_summary_id" => "block_type_store#admin_details"
305
- get "admin/block-types/store" => "block_type_store#admin_index"
318
+ get "/admin/block-types/store/:block_type_summary_id/download" => "block_type_store#admin_download"
319
+ get "/admin/block-types/store/:block_type_summary_id" => "block_type_store#admin_details"
320
+ get "/admin/block-types/store" => "block_type_store#admin_index"
321
+
322
+ get "/admin/block-types/site-options" => "block_types#admin_site_options"
323
+ get "/admin/block-types/field-type-options" => "block_types#admin_field_type_options"
324
+ get "/admin/block-types/tree-options" => "block_types#admin_tree_options"
325
+ get "/admin/block-types/options" => "block_types#admin_options"
326
+ get "/admin/block-types/new" => "block_types#admin_new"
327
+ get "/admin/block-types/json" => "block_types#admin_json"
328
+ get "/admin/block-types/:id/json" => "block_types#admin_json_single"
329
+ get "/admin/block-types/:id/new" => "block_types#admin_new"
330
+ get "/admin/block-types/:id/options" => "block_types#admin_value_options"
331
+ get "/admin/block-types/:id/icon" => "block_types#admin_edit_icon"
332
+ get "/admin/block-types/:id" => "block_types#admin_edit"
333
+ put "/admin/block-types/:id" => "block_types#admin_update"
334
+ delete "/admin/block-types/:id" => "block_types#admin_delete"
335
+ get "/admin/block-types" => "block_types#admin_index"
336
+ post "/admin/block-types" => "block_types#admin_create"
337
+
338
+ get "/admin/block-type-categories/tree-options" => "block_type_categories#admin_tree_options"
306
339
 
307
- get "admin/block-types/site-options" => "block_types#admin_site_options"
308
- get "admin/block-types/field-type-options" => "block_types#admin_field_type_options"
309
- get "admin/block-types/tree-options" => "block_types#admin_tree_options"
310
- get "admin/block-types/options" => "block_types#admin_options"
311
- get "admin/block-types/new" => "block_types#admin_new"
312
- get "admin/block-types/json" => "block_types#admin_json"
313
- get "admin/block-types/:id/json" => "block_types#admin_json_single"
314
- get "admin/block-types/:id/new" => "block_types#admin_new"
315
- get "admin/block-types/:id/options" => "block_types#admin_value_options"
316
- get "admin/block-types/:id/icon" => "block_types#admin_edit_icon"
317
- get "admin/block-types/:id" => "block_types#admin_edit"
318
- put "admin/block-types/:id" => "block_types#admin_update"
319
- delete "admin/block-types/:id" => "block_types#admin_delete"
320
- get "admin/block-types" => "block_types#admin_index"
321
- post "admin/block-types" => "block_types#admin_create"
322
-
323
- get "admin/block-type-categories/tree-options" => "block_type_categories#admin_tree_options"
324
-
325
340
  #=============================================================================
326
341
  # Posts
327
342
  #=============================================================================
328
343
 
329
- get "posts" => "posts#index"
330
- get "posts/:id" => "posts#detail"
331
- get "admin/posts/category-options" => "posts#admin_category_options"
332
- get "admin/posts/new" => "posts#admin_new"
333
- get "admin/posts/:id/delete" => "posts#admin_delete_form"
334
- get "admin/posts/:id/edit" => "posts#admin_edit_general"
335
- get "admin/posts/:id/content" => "posts#admin_edit_content"
336
- get "admin/posts/:id/categories" => "posts#admin_edit_categories"
337
- get "admin/posts/:id/add-to-category" => "posts#admin_add_to_category"
338
- get "admin/posts/:id/remove-from-category" => "posts#admin_remove_from_category"
339
- get "admin/posts/:id/delete" => "posts#admin_delete_form"
340
- put "admin/posts/:id" => "posts#admin_update"
341
- post "admin/posts/:id/image" => "posts#admin_update_image"
342
- get "admin/posts" => "posts#admin_index"
343
- post "admin/posts" => "posts#admin_add"
344
- delete "admin/posts/:id" => "posts#admin_delete"
345
-
344
+ get "/posts" => "posts#index"
345
+ get "/posts/:id" => "posts#show"
346
+ get "/posts/:year/:month/:day/:slug" => "posts#show"
347
+ get "/admin/posts/category-options" => "posts#admin_category_options"
348
+ get "/admin/posts/new" => "posts#admin_new"
349
+ get "/admin/posts/:id/json" => "posts#admin_json_single"
350
+ get "/admin/posts/:id/edit" => "posts#admin_edit_general"
351
+ get "/admin/posts/:id/delete" => "posts#admin_delete_form"
352
+ get "/admin/posts/:id/preview" => "posts#admin_edit_preview"
353
+ get "/admin/posts/:id/content" => "posts#admin_edit_content"
354
+ get "/admin/posts/:id/layout" => "posts#admin_edit_layout"
355
+ put "/admin/posts/:id/layout" => "posts#admin_update_layout"
356
+ get "/admin/posts/:id/categories" => "posts#admin_edit_categories"
357
+ get "/admin/posts/:id/add-to-category" => "posts#admin_add_to_category"
358
+ get "/admin/posts/:id/remove-from-category" => "posts#admin_remove_from_category"
359
+ get "/admin/posts/:id/delete" => "posts#admin_delete_form"
360
+ get "/admin/posts/:id" => "posts#admin_edit_general"
361
+ put "/admin/posts/:id" => "posts#admin_update"
362
+ post "/admin/posts/:id/image" => "posts#admin_update_image"
363
+ get "/admin/posts" => "posts#admin_index"
364
+ post "/admin/posts" => "posts#admin_add"
365
+ delete "/admin/posts/:id" => "posts#admin_delete"
366
+
346
367
  #=============================================================================
347
368
  # Google Spreadsheets
348
369
  #=============================================================================
349
370
 
350
- get "google-spreadsheets/:spreadsheet_id/csv" => "google_spreadsheets#csv_data"
371
+ get "/google-spreadsheets/:spreadsheet_id/csv" => "google_spreadsheets#csv_data"
351
372
 
352
373
  #=============================================================================
353
374
  # Calendar
354
375
  #=============================================================================
355
376
 
356
- get "admin/calendars" => "calendars#admin_index"
357
- get "admin/calendars/:id" => "calendars#admin_edit"
358
- put "admin/calendars/:id" => "calendars#admin_update"
359
- post "admin/calendars" => "calendars#admin_add"
360
- delete "admin/calendars" => "calendars#admin_delete"
377
+ get "/admin/calendars" => "calendars#admin_index"
378
+ get "/admin/calendars/:id" => "calendars#admin_edit"
379
+ put "/admin/calendars/:id" => "calendars#admin_update"
380
+ post "/admin/calendars" => "calendars#admin_add"
381
+ delete "/admin/calendars" => "calendars#admin_delete"
361
382
 
362
- get "admin/calendars/:calendar_id/events" => "events#admin_index"
363
- get "admin/calendars/:calendar_id/events/new" => "events#admin_new"
364
- get "admin/calendars/:calendar_id/events/:id" => "events#admin_edit"
365
- put "admin/calendars/:calendar_id/events/:id" => "events#admin_update"
366
- post "admin/calendars/:calendar_id/events" => "events#admin_add"
367
- delete "admin/calendars/:calendar_id/events/:id" => "events#admin_delete"
383
+ get "/admin/calendars/:calendar_id/events" => "events#admin_index"
384
+ get "/admin/calendars/:calendar_id/events/new" => "events#admin_new"
385
+ get "/admin/calendars/:calendar_id/events/:id" => "events#admin_edit"
386
+ put "/admin/calendars/:calendar_id/events/:id" => "events#admin_update"
387
+ post "/admin/calendars/:calendar_id/events" => "events#admin_add"
388
+ delete "/admin/calendars/:calendar_id/events/:id" => "events#admin_delete"
368
389
 
369
- put "admin/calendars/:calendar_id/event-groups/:id" => "event_groups#admin_update"
370
- get "admin/event-groups/period-options" => "event_groups#admin_period_options"
371
- get "admin/event-groups/frequency-options" => "event_groups#admin_frequency_options"
372
- get "admin/event-groups/repeat-by-options" => "event_groups#admin_repeat_by_options"
390
+ put "/admin/calendars/:calendar_id/event-groups/:id" => "event_groups#admin_update"
391
+ get "/admin/event-groups/period-options" => "event_groups#admin_period_options"
392
+ get "/admin/event-groups/frequency-options" => "event_groups#admin_frequency_options"
393
+ get "/admin/event-groups/repeat-by-options" => "event_groups#admin_repeat_by_options"
373
394
 
374
395
  #=============================================================================
375
396
  # AB Testing
376
397
  #=============================================================================
377
398
 
378
- get "admin/ab-variants" => "ab_variants#admin_index"
379
- get "admin/ab-variants/new" => "ab_variants#admin_new"
380
- get "admin/ab-variants/:id" => "ab_variants#admin_edit"
381
- put "admin/ab-variants/:id" => "ab_variants#admin_update"
382
- post "admin/ab-variants" => "ab_variants#admin_create"
383
- delete "admin/ab-variants/:id" => "ab_variants#admin_delete"
399
+ get "/admin/ab-variants" => "ab_variants#admin_index"
400
+ get "/admin/ab-variants/new" => "ab_variants#admin_new"
401
+ get "/admin/ab-variants/:id" => "ab_variants#admin_edit"
402
+ put "/admin/ab-variants/:id" => "ab_variants#admin_update"
403
+ post "/admin/ab-variants" => "ab_variants#admin_create"
404
+ delete "/admin/ab-variants/:id" => "ab_variants#admin_delete"
384
405
 
385
- get "admin/ab-variants/:variant_id/options" => "ab_options#admin_index"
386
- put "admin/ab-options/:id" => "ab_options#admin_update"
387
- post "admin/ab-variants/:variant_id/options" => "ab_options#admin_create"
388
- delete "admin/ab-options/:id" => "ab_options#admin_delete"
406
+ get "/admin/ab-variants/:variant_id/options" => "ab_options#admin_index"
407
+ put "/admin/ab-options/:id" => "ab_options#admin_update"
408
+ post "/admin/ab-variants/:variant_id/options" => "ab_options#admin_create"
409
+ delete "/admin/ab-options/:id" => "ab_options#admin_delete"
389
410
 
390
411
  #=============================================================================
391
412
  # Reviews