caboose-cms 0.5.64 → 0.5.66

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/javascripts/caboose/admin.js +1 -1
  3. data/app/assets/javascripts/caboose/admin_edit_order.js +724 -0
  4. data/app/assets/javascripts/caboose/cart2.js +4 -4
  5. data/app/assets/javascripts/caboose/model/index_table.js +122 -80
  6. data/app/assets/stylesheets/caboose/admin_main.css +8 -0
  7. data/app/controllers/caboose/application_controller.rb +1 -1
  8. data/app/controllers/caboose/block_type_sources_controller.rb +1 -1
  9. data/app/controllers/caboose/block_types_controller.rb +1 -1
  10. data/app/controllers/caboose/calendars_controller.rb +1 -1
  11. data/app/controllers/caboose/cart_controller.rb +8 -1
  12. data/app/controllers/caboose/checkout_controller.rb +17 -9
  13. data/app/controllers/caboose/line_items_controller.rb +135 -0
  14. data/app/controllers/caboose/order_packages_controller.rb +304 -0
  15. data/app/controllers/caboose/orders_controller.rb +31 -74
  16. data/app/controllers/caboose/pages_controller.rb +2 -1
  17. data/app/controllers/caboose/product_images_controller.rb +11 -0
  18. data/app/controllers/caboose/products_controller.rb +25 -8
  19. data/app/controllers/caboose/shipping_addresses_controller.rb +46 -0
  20. data/app/controllers/caboose/shipping_packages_controller.rb +125 -54
  21. data/app/controllers/caboose/sites_controller.rb +2 -79
  22. data/app/controllers/caboose/smtp_controller.rb +52 -0
  23. data/app/controllers/caboose/store_controller.rb +94 -0
  24. data/app/controllers/caboose/vendors_controller.rb +25 -4
  25. data/app/models/caboose/address.rb +1 -3
  26. data/app/models/caboose/caboose_plugin.rb +1 -1
  27. data/app/models/caboose/category.rb +18 -0
  28. data/app/models/caboose/core_plugin.rb +21 -19
  29. data/app/models/caboose/order.rb +12 -7
  30. data/app/models/caboose/order_package.rb +5 -2
  31. data/app/models/caboose/order_transaction.rb +25 -0
  32. data/app/models/caboose/page.rb +1 -1
  33. data/app/models/caboose/schema.rb +50 -22
  34. data/app/models/caboose/shipping_calculator.rb +26 -30
  35. data/app/models/caboose/shipping_package.rb +45 -5
  36. data/app/models/caboose/store_config.rb +18 -6
  37. data/app/models/caboose/tax_calculator.rb +6 -5
  38. data/app/views/caboose/blocks/admin_edit.html.erb +1 -1
  39. data/app/views/caboose/line_items/admin_new.html.erb +100 -0
  40. data/app/views/caboose/orders/admin_edit.html.erb +21 -247
  41. data/app/views/caboose/orders/admin_edit_old.html.erb +155 -0
  42. data/app/views/caboose/orders/admin_new.html.erb +8 -23
  43. data/app/views/caboose/products/#Untitled-1# +0 -0
  44. data/app/views/caboose/products/admin_edit_images.html.erb +20 -4
  45. data/app/views/caboose/products/admin_index.html.erb +9 -3
  46. data/app/views/caboose/products/admin_sort.html.erb +138 -142
  47. data/app/views/caboose/roles/index.html.erb +1 -1
  48. data/app/views/caboose/shipping_packages/admin_edit.html.erb +52 -137
  49. data/app/views/caboose/shipping_packages/admin_index.html.erb +56 -19
  50. data/app/views/caboose/sites/_admin_header.html.erb +3 -5
  51. data/app/views/caboose/sites/admin_edit.html.erb +5 -3
  52. data/app/views/caboose/smtp/admin_edit.html.erb +41 -0
  53. data/app/views/caboose/station/index.html.erb +1 -1
  54. data/app/views/caboose/store/admin_edit.html.erb +96 -0
  55. data/app/views/caboose/vendors/admin_edit.html.erb +7 -3
  56. data/app/views/layouts/caboose/_station.html.erb +1 -1
  57. data/config/routes.rb +67 -25
  58. data/lib/caboose/engine.rb +1 -1
  59. data/lib/caboose/version.rb +1 -1
  60. metadata +28 -5
  61. data/app/views/caboose/shipping_packages/admin_new.html.erb +0 -33
  62. data/app/views/caboose/sites/admin_edit_smtp_config.html.erb +0 -51
  63. data/app/views/caboose/sites/admin_edit_store_config.html.erb +0 -77
@@ -1,6 +1,8 @@
1
1
  <h1>Edit Vendor</h1>
2
2
  <p><div id="vendor_<%= @vendor.id %>_name"></div></p>
3
3
  <p><div id="vendor_<%= @vendor.id %>_status"></div></p>
4
+ <p><div id="vendor_<%= @vendor.id %>_featured"></div></p>
5
+ <p><div id="vendor_<%= @vendor.id %>_image"></div></p>
4
6
  <div id='message'></div>
5
7
  <input type="button" value="< Back" onclick="window.location='/admin/vendors';" />
6
8
  <input type="button" value="Delete" onclick="delete_vendor(<%= @vendor.id %>);" />
@@ -12,11 +14,13 @@ $(document).ready(function() {
12
14
  m = new ModelBinder({
13
15
  id: <%= @vendor.id %>,
14
16
  name: 'Vendor',
15
- update_url: '/admin/vendors/<%= @vendor.id %>/update',
17
+ update_url: '/admin/vendors/<%= @vendor.id %>',
16
18
  authenticity_token: '<%= form_authenticity_token %>',
17
19
  attributes: [
18
- { name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= Caboose.json(@vendor.name).html_safe %>, width: 500 },
19
- { name: 'status' , nice_name: 'Status' , type: 'select' , text: <%= raw Caboose.json(@vendor.status).html_safe %>, value: <%= Caboose.json(@vendor.status).html_safe %>, width: 500, options_url: '/admin/vendors/status-options' }
20
+ { name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(@vendor.name) %>, width: 500 },
21
+ { name: 'status' , nice_name: 'Status' , type: 'select' , value: <%= raw Caboose.json(@vendor.status) %>, width: 500, options_url: '/admin/vendors/status-options' },
22
+ { name: 'featured' , nice_name: 'Featured' , type: 'checkbox' , value: <%= @vendor.featured ? 1 : 0 %>, width: 500 },
23
+ { name: 'image' , nice_name: 'Image' , type: 'image' , value: <%= raw Caboose.json(@vendor.image.url(:thumb)) %>, width: 500 , update_url: '/admin/vendors/<%= @vendor.id %>/image' }
20
24
  ]
21
25
  })
22
26
  });
@@ -1,6 +1,6 @@
1
1
  <%
2
2
 
3
- @nav = Caboose.plugin_hook('admin_nav', [], @user, @page)
3
+ @nav = Caboose.plugin_hook('admin_nav', [], @user, @page, @site)
4
4
 
5
5
  initial_state = session[:caboose_station_state].nil? ? 'min' : session[:caboose_station_state]
6
6
  open_tabs = session[:caboose_station_open_tabs].nil? ? [] : session[:caboose_station_open_tabs]
@@ -26,12 +26,8 @@ Caboose::Engine.routes.draw do
26
26
  # Sites
27
27
  #=============================================================================
28
28
 
29
- get "admin/sites/options" => "sites#options"
30
- get "admin/sites/payment-processor-options" => "sites#payment_processor_options"
31
- get "admin/sites/smtp-auth-options" => "sites#smtp_auth_options"
32
- get "admin/sites/new" => "sites#admin_new"
33
- get "admin/sites/:id/store" => "sites#admin_edit_store_config"
34
- get "admin/sites/:id/smtp" => "sites#admin_edit_smtp_config"
29
+ get "admin/sites/options" => "sites#options"
30
+ get "admin/sites/new" => "sites#admin_new"
35
31
  get "admin/sites/:id/block-types" => "sites#admin_edit_block_types"
36
32
  get "admin/sites/:id/delete" => "sites#admin_delete_form"
37
33
  get "admin/sites/:id" => "sites#admin_edit"
@@ -47,6 +43,46 @@ Caboose::Engine.routes.draw do
47
43
  put "admin/sites/:site_id/domains/:id" => "domains#admin_update"
48
44
  delete "admin/sites/:site_id/domains/:id" => "domains#admin_delete"
49
45
 
46
+ #=============================================================================
47
+ # Store
48
+ #=============================================================================
49
+
50
+ get "admin/store/shipping-method-options" => "store#shipping_method_options"
51
+ get "admin/store/payment-processor-options" => "store#payment_processor_options"
52
+ get "admin/store/length-unit-options" => "store#length_unit_options"
53
+ get "admin/store/weight-unit-options" => "store#weight_unit_options"
54
+ get "admin/store/payment-processor" => "store#admin_edit_payment_processor"
55
+ get "admin/store/shipping" => "store#admin_edit_shipping"
56
+ get "admin/store" => "store#admin_edit"
57
+ put "admin/store" => "store#admin_update"
58
+
59
+ #=============================================================================
60
+ # SMTP
61
+ #=============================================================================
62
+
63
+ get "admin/smtp/auth-options" => "smtp#auth_options"
64
+ get "admin/smtp" => "smtp#admin_edit"
65
+ put "admin/smtp" => "smtp#admin_update"
66
+
67
+ #=============================================================================
68
+ # Shipping Packages
69
+ #=============================================================================
70
+
71
+ get "admin/shipping-packages/options" => "shipping_packages#admin_options"
72
+ get "admin/shipping-packages/json" => "shipping_packages#admin_json"
73
+ get "admin/shipping-packages/:id/json" => "shipping_packages#admin_json_single"
74
+ get "admin/shipping-packages/:id/shipping-method-options" => "shipping_packages#admin_shipping_method_options"
75
+ get "admin/shipping-packages/package-method-options" => "shipping_packages#admin_package_method_options"
76
+ get "admin/shipping-packages/:id" => "shipping_packages#admin_edit"
77
+ get "admin/shipping-packages" => "shipping_packages#admin_index"
78
+ put "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_update"
79
+ put "admin/shipping-packages/:id" => "shipping_packages#admin_update"
80
+ post "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_add"
81
+ post "admin/shipping-packages" => "shipping_packages#admin_add"
82
+ delete "admin/shipping-packages/bulk" => "shipping_packages#admin_bulk_delete"
83
+ delete "admin/shipping-packages/:id" => "shipping_packages#admin_delete"
84
+ get "admin/shipping-methods/options" => "shipping_packages#admin_shipping_method_options"
85
+
50
86
  #=============================================================================
51
87
  # 301 Redirects
52
88
  #=============================================================================
@@ -388,6 +424,7 @@ Caboose::Engine.routes.draw do
388
424
  delete "/admin/products/:id" => "products#admin_delete"
389
425
  put "/admin/products/:id/update-vendor" => "products#admin_update_vendor"
390
426
 
427
+ put "/admin/product-images/sort-order" => "product_images#admin_update_sort_order"
391
428
  get "/admin/product-images/:id/variant-ids" => "product_images#admin_variant_ids"
392
429
  get "/admin/product-images/:id/variants" => "product_images#admin_variants"
393
430
  delete "/admin/product-images/:id" => "product_images#admin_delete"
@@ -404,21 +441,7 @@ Caboose::Engine.routes.draw do
404
441
  put "/admin/stackable-groups/:id" => "stackable_groups#admin_update"
405
442
  post "/admin/stackable-groups" => "stackable_groups#admin_add"
406
443
  delete "/admin/stackable-groups/bulk" => "stackable_groups#admin_bulk_delete"
407
- delete "/admin/stackable-groups/:id" => "stackable_groups#admin_delete"
408
-
409
- #=============================================================================
410
- # Shipping Packages
411
- #=============================================================================
412
-
413
- get "/admin/sites/:site_id/shipping-packages/options" => "shipping_packages#admin_options"
414
- get "/admin/sites/:site_id/shipping-packages/shipping-method-options" => "shipping_packages#admin_shipping_method_options"
415
- get "/admin/sites/:site_id/shipping-packages/json" => "shipping_packages#admin_json"
416
- get "/admin/sites/:site_id/shipping-packages/:id/json" => "shipping_packages#admin_json_single"
417
- get "/admin/sites/:site_id/shipping-packages" => "shipping_packages#admin_index"
418
- put "/admin/sites/:site_id/shipping-packages/:id" => "shipping_packages#admin_update"
419
- post "/admin/sites/:site_id/shipping-packages" => "shipping_packages#admin_add"
420
- delete "/admin/sites/:site_id/shipping-packages/bulk" => "shipping_packages#admin_bulk_delete"
421
- delete "/admin/sites/:site_id/shipping-packages/:id" => "shipping_packages#admin_delete"
444
+ delete "/admin/stackable-groups/:id" => "stackable_groups#admin_delete"
422
445
 
423
446
  #=============================================================================
424
447
  # Categories
@@ -440,8 +463,7 @@ Caboose::Engine.routes.draw do
440
463
 
441
464
  get "/admin/orders" => "orders#admin_index"
442
465
  get "/admin/orders/test-info" => "orders#admin_mail_test_info"
443
- get "/admin/orders/test-gmail" => "orders#admin_mail_test_gmail"
444
- get "/admin/orders/line-item-status-options" => "orders#admin_line_item_status_options"
466
+ get "/admin/orders/test-gmail" => "orders#admin_mail_test_gmail"
445
467
  get "/admin/orders/status-options" => "orders#admin_status_options"
446
468
  get "/admin/orders/new" => "orders#admin_new"
447
469
  get "/admin/orders/:id/capture" => "orders#capture_funds"
@@ -450,12 +472,32 @@ Caboose::Engine.routes.draw do
450
472
  get "/admin/orders/:id/send-to-quickbooks" => "orders#admin_send_to_quickbooks"
451
473
  get "/admin/orders/:id" => "orders#admin_edit"
452
474
  put "/admin/orders/:id" => "orders#admin_update"
453
- put "/admin/orders/:order_id/line-items/:id" => "orders#admin_update_line_item"
454
475
  delete "/admin/orders/:id" => "orders#admin_delete"
455
-
456
476
  get '/admin/orders/:id/void' => 'orders#admin_void'
457
477
  get '/admin/orders/:id/refund' => 'orders#admin_refund'
458
478
  post '/admin/orders/:id/resend-confirmation' => 'orders#admin_resend_confirmation'
479
+ post '/admin/orders' => 'orders#admin_add'
480
+
481
+ get "/admin/orders/line-items/status-options" => "line_items#admin_status_options"
482
+ get "/admin/orders/line-items/product-stubs" => "line_items#admin_product_stubs"
483
+ get "/admin/orders/:order_id/line-items/new" => "line_items#admin_new"
484
+ get "/admin/orders/:order_id/line-items/json" => "line_items#admin_json"
485
+ post "/admin/orders/:order_id/line-items" => "line_items#admin_add"
486
+ get "/admin/orders/:order_id/line-items/:id/highlight" => "line_items#admin_highlight"
487
+ put "/admin/orders/:order_id/line-items/:id" => "line_items#admin_update"
488
+ delete "/admin/orders/:order_id/line-items/:id" => "line_items#admin_delete"
489
+
490
+ get "admin/orders/:order_id/packages/json" => "order_packages#admin_json"
491
+ put "admin/orders/:order_id/packages/:id" => "order_packages#admin_update"
492
+ post "admin/orders/:order_id/packages" => "order_packages#admin_add"
493
+ delete "admin/orders/:order_id/packages/:id" => "order_packages#admin_delete"
494
+
495
+ get "/admin/orders/:order_id/packages/json" => "line_items#admin_json"
496
+ put "/admin/orders/:order_id/line-items/:id" => "line_items#admin_update"
497
+ delete "/admin/orders/:order_id/line-items/:id" => "line_items#admin_delete"
498
+
499
+ get "admin/orders/:order_id/shipping-address/json" => "shipping_addresses#admin_json"
500
+ put "admin/orders/:order_id/shipping-address" => "shipping_addresses#admin_update"
459
501
 
460
502
  #=============================================================================
461
503
  # Vendors
@@ -66,7 +66,7 @@ module Caboose
66
66
  end
67
67
  return str2
68
68
  end
69
-
69
+
70
70
  class Engine < ::Rails::Engine
71
71
  isolate_namespace Caboose
72
72
  require 'jquery-rails'
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.64'
2
+ VERSION = '0.5.66'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.64
4
+ version: 0.5.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2015-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -248,6 +248,20 @@ dependencies:
248
248
  - - ! '>='
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: authorizenet
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ! '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ! '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
251
265
  - !ruby/object:Gem::Dependency
252
266
  name: rspec-rails
253
267
  requirement: !ruby/object:Gem::Requirement
@@ -366,6 +380,7 @@ files:
366
380
  - app/assets/images/caboose/search.png
367
381
  - app/assets/javascripts/caboose/admin.js
368
382
  - app/assets/javascripts/caboose/admin_block_edit.js
383
+ - app/assets/javascripts/caboose/admin_edit_order.js
369
384
  - app/assets/javascripts/caboose/admin_images_index.js
370
385
  - app/assets/javascripts/caboose/admin_page_edit_content.js
371
386
  - app/assets/javascripts/caboose/admin_page_new_blocks.js
@@ -483,10 +498,12 @@ files:
483
498
  - app/controllers/caboose/event_groups_controller.rb
484
499
  - app/controllers/caboose/events_controller.rb
485
500
  - app/controllers/caboose/images_controller.rb
501
+ - app/controllers/caboose/line_items_controller.rb
486
502
  - app/controllers/caboose/login_controller.rb
487
503
  - app/controllers/caboose/logout_controller.rb
488
504
  - app/controllers/caboose/media_categories_controller.rb
489
505
  - app/controllers/caboose/modal_controller.rb
506
+ - app/controllers/caboose/order_packages_controller.rb
490
507
  - app/controllers/caboose/orders_controller.rb
491
508
  - app/controllers/caboose/page_permissions_controller.rb
492
509
  - app/controllers/caboose/pages_controller.rb
@@ -499,10 +516,13 @@ files:
499
516
  - app/controllers/caboose/reviews_controller.rb
500
517
  - app/controllers/caboose/roles_controller.rb
501
518
  - app/controllers/caboose/settings_controller.rb
519
+ - app/controllers/caboose/shipping_addresses_controller.rb
502
520
  - app/controllers/caboose/shipping_packages_controller.rb
503
521
  - app/controllers/caboose/sites_controller.rb
522
+ - app/controllers/caboose/smtp_controller.rb
504
523
  - app/controllers/caboose/stackable_groups_controller.rb
505
524
  - app/controllers/caboose/station_controller.rb
525
+ - app/controllers/caboose/store_controller.rb
506
526
  - app/controllers/caboose/users_controller.rb
507
527
  - app/controllers/caboose/variants_controller.rb
508
528
  - app/controllers/caboose/vendors_controller.rb
@@ -555,6 +575,7 @@ files:
555
575
  - app/models/caboose/order_discount.rb
556
576
  - app/models/caboose/order_package.rb
557
577
  - app/models/caboose/order_pdf.rb
578
+ - app/models/caboose/order_transaction.rb
558
579
  - app/models/caboose/page.rb
559
580
  - app/models/caboose/page_bar_generator.rb
560
581
  - app/models/caboose/page_cache.rb
@@ -705,6 +726,7 @@ files:
705
726
  - app/views/caboose/images/admin_index.html.erb
706
727
  - app/views/caboose/images/admin_new.html.erb
707
728
  - app/views/caboose/images/admin_s3_result.html.erb
729
+ - app/views/caboose/line_items/admin_new.html.erb
708
730
  - app/views/caboose/login/forgot_password_form.html.erb
709
731
  - app/views/caboose/login/index.html.erb
710
732
  - app/views/caboose/login/reset_password_form.html.erb
@@ -715,6 +737,7 @@ files:
715
737
  - app/views/caboose/orders/_quickbooks_order.html.erb
716
738
  - app/views/caboose/orders/admin_delete_form.html.erb
717
739
  - app/views/caboose/orders/admin_edit.html.erb
740
+ - app/views/caboose/orders/admin_edit_old.html.erb
718
741
  - app/views/caboose/orders/admin_index.html.erb
719
742
  - app/views/caboose/orders/admin_new.html.erb
720
743
  - app/views/caboose/orders/admin_print.html.erb
@@ -755,6 +778,7 @@ files:
755
778
  - app/views/caboose/posts/admin_new.html.erb
756
779
  - app/views/caboose/posts/detail.html.erb
757
780
  - app/views/caboose/posts/index.html.erb
781
+ - app/views/caboose/products/#Untitled-1#
758
782
  - app/views/caboose/products/_admin_footer.html.erb
759
783
  - app/views/caboose/products/_admin_header.html.erb
760
784
  - app/views/caboose/products/_sort_options.html.erb
@@ -787,18 +811,17 @@ files:
787
811
  - app/views/caboose/settings/new.html.erb
788
812
  - app/views/caboose/shipping_packages/admin_edit.html.erb
789
813
  - app/views/caboose/shipping_packages/admin_index.html.erb
790
- - app/views/caboose/shipping_packages/admin_new.html.erb
791
814
  - app/views/caboose/sites/_admin_footer.html.erb
792
815
  - app/views/caboose/sites/_admin_header.html.erb
793
816
  - app/views/caboose/sites/admin_delete_form.html.erb
794
817
  - app/views/caboose/sites/admin_edit.html.erb
795
818
  - app/views/caboose/sites/admin_edit_block_types.html.erb
796
- - app/views/caboose/sites/admin_edit_smtp_config.html.erb
797
- - app/views/caboose/sites/admin_edit_store_config.html.erb
798
819
  - app/views/caboose/sites/admin_index.html.erb
799
820
  - app/views/caboose/sites/admin_new.html.erb
821
+ - app/views/caboose/smtp/admin_edit.html.erb
800
822
  - app/views/caboose/stackable_groups/admin_index.html.erb
801
823
  - app/views/caboose/station/index.html.erb
824
+ - app/views/caboose/store/admin_edit.html.erb
802
825
  - app/views/caboose/users/edit.html.erb
803
826
  - app/views/caboose/users/edit_password.html.erb
804
827
  - app/views/caboose/users/import_form.html.erb
@@ -1,33 +0,0 @@
1
-
2
- <h1>New Site</h1>
3
-
4
- <form action='/admin/sites' method='post' id='new_site_form'>
5
- <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
6
- <p><input type='text' name='name' id='name' placeholder='Name' value='' style='width: 400px;' /></p>
7
- <div id='message'></div>
8
- <p><input type='submit' value='Add Site' /></p>
9
- </form>
10
-
11
- <% content_for :caboose_js do %>
12
- <script type='text/javascript'>
13
-
14
- $(document).ready(function() {
15
- $('#new_site_form').submit(function() { add_site(); return false; });
16
- });
17
-
18
- function add_site()
19
- {
20
- $('#message').html("<p class='loading'>Adding site...</p>");
21
- $.ajax({
22
- url: '/admin/sites',
23
- type: 'post',
24
- data: $('#new_site_form').serialize(),
25
- success: function(resp) {
26
- if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
27
- if (resp.redirect) window.location = resp.redirect;
28
- }
29
- });
30
- }
31
-
32
- </script>
33
- <% end %>
@@ -1,51 +0,0 @@
1
- <%
2
- s = @site
3
- smtp_config = s.smtp_config
4
- %>
5
- <%= render :partial => 'caboose/sites/admin_header' %>
6
-
7
- <h2>SMTP Config</h2>
8
- <p><div id='smtpconfig_<%= smtp_config.id %>_address' ></div></p>
9
- <p><div id='smtpconfig_<%= smtp_config.id %>_port' ></div></p>
10
- <p><div id='smtpconfig_<%= smtp_config.id %>_domain' ></div></p>
11
- <p><div id='smtpconfig_<%= smtp_config.id %>_user_name' ></div></p>
12
- <p><div id='smtpconfig_<%= smtp_config.id %>_password' ></div></p>
13
- <p><div id='smtpconfig_<%= smtp_config.id %>_authentication' ></div></p>
14
- <p><div id='smtpconfig_<%= smtp_config.id %>_enable_starttls_auto' ></div></p>
15
-
16
- <div id='message'></div>
17
-
18
- <%= render :partial => 'caboose/sites/admin_footer' %>
19
-
20
- <% content_for :caboose_css do %>
21
- <style type='text/css'>
22
- #content input[type=checkbox] { position: relative; }
23
- #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
24
- </style>
25
- <% end %>
26
- <% content_for :caboose_js do %>
27
- <%= javascript_include_tag "caboose/model/all" %>
28
- <script type="text/javascript">
29
-
30
- $(document).ready(function() {
31
-
32
- new ModelBinder({
33
- name: 'SmtpConfig',
34
- id: <%= smtp_config.id %>,
35
- update_url: '/admin/sites/<%= @site.id %>/smtp',
36
- authenticity_token: '<%= form_authenticity_token %>',
37
- attributes: [
38
- { name: 'address' , nice_name: 'Address' , type: 'text' , value: <%= raw Caboose.json(smtp_config.address ) %>, width: 400 },
39
- { name: 'port' , nice_name: 'Port' , type: 'text' , value: <%= raw Caboose.json(smtp_config.port ) %>, width: 400 },
40
- { name: 'domain' , nice_name: 'Domain' , type: 'text' , value: <%= raw Caboose.json(smtp_config.domain ) %>, width: 400 },
41
- { name: 'user_name' , nice_name: 'Username' , type: 'text' , value: <%= raw Caboose.json(smtp_config.user_name ) %>, width: 400 },
42
- { name: 'password' , nice_name: 'Password' , type: 'text' , value: <%= raw Caboose.json(smtp_config.password ) %>, width: 400 },
43
- { name: 'authentication' , nice_name: 'Authentication' , type: 'select' , value: <%= raw Caboose.json(smtp_config.authentication ) %>, width: 400 , options_url: '/admin/sites/smtp-auth-options' },
44
- { name: 'enable_starttls_auto' , nice_name: 'Enable Start TLS Auto' , type: 'checkbox' , value: <%= raw smtp_config.enable_starttls_auto ? 1 : 0 %>, width: 400 }
45
- ]
46
- });
47
-
48
- });
49
-
50
- </script>
51
- <% end %>
@@ -1,77 +0,0 @@
1
- <%
2
- s = @site
3
- store_config = s.store_config
4
- StoreConfig.create(:site_id => @site.id) if @site.store_config.nil?
5
- store_config = s.store_config
6
- %>
7
- <%= render :partial => 'caboose/sites/admin_header' %>
8
-
9
- <h2>Payment Processor</h2>
10
- <p><div id='storeconfig_<%= store_config.id %>_pp_name' ></div></p>
11
- <p><div id='storeconfig_<%= store_config.id %>_pp_username' ></div></p>
12
- <p><div id='storeconfig_<%= store_config.id %>_pp_password' ></div></p>
13
-
14
- <h2>Other</h2>
15
- <p><div id='storeconfig_<%= store_config.id %>_fulfillment_email' ></div></p>
16
- <p><div id='storeconfig_<%= store_config.id %>_shipping_email' ></div></p>
17
- <p><div id='storeconfig_<%= store_config.id %>_handling_percentage' ></div></p>
18
-
19
- <h2>Shipping</h2>
20
- <p><div id='storeconfig_<%= store_config.id %>_allowed_shipping_codes' ></div></p>
21
- <p><div id='storeconfig_<%= store_config.id %>_default_shipping_code' ></div></p>
22
-
23
- <h3>Origin</h3>
24
- <p><div id='storeconfig_<%= store_config.id %>_origin_country' ></div></p>
25
- <p><div id='storeconfig_<%= store_config.id %>_origin_state' ></div></p>
26
- <p><div id='storeconfig_<%= store_config.id %>_origin_city' ></div></p>
27
- <p><div id='storeconfig_<%= store_config.id %>_origin_zip' ></div></p>
28
-
29
- <h3>USPS</h3>
30
- <p><div id='storeconfig_<%= store_config.id %>_use_usps' ></div></p>
31
- <p><div id='storeconfig_<%= store_config.id %>_usps_secret_key' ></div></p>
32
- <p><div id='storeconfig_<%= store_config.id %>_usps_publishable_key' ></div></p>
33
-
34
- <div id='message'></div>
35
-
36
- <%= render :partial => 'caboose/sites/admin_footer' %>
37
-
38
- <% content_for :caboose_css do %>
39
- <style type='text/css'>
40
- #content input[type=checkbox] { position: relative; }
41
- #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
42
- </style>
43
- <% end %>
44
- <% content_for :caboose_js do %>
45
- <%= javascript_include_tag "caboose/model/all" %>
46
- <script type="text/javascript">
47
-
48
- $(document).ready(function() {
49
-
50
- new ModelBinder({
51
- name: 'StoreConfig',
52
- id: <%= store_config.id %>,
53
- update_url: '/admin/sites/<%= @site.id %>/store',
54
- authenticity_token: '<%= form_authenticity_token %>',
55
- attributes: [
56
- { name: 'pp_name' , nice_name: 'Type' , type: 'select' , value: <%= raw Caboose.json(store_config.pp_name ) %>, width: 400 , options_url: '/admin/sites/payment-processor-options' },
57
- { name: 'pp_username' , nice_name: 'Username' , type: 'text' , value: <%= raw Caboose.json(store_config.pp_username ) %>, width: 400 },
58
- { name: 'pp_password' , nice_name: 'Password' , type: 'text' , value: <%= raw Caboose.json(store_config.pp_password ) %>, width: 400 },
59
- { name: 'use_usps' , nice_name: 'Use USPS' , type: 'checkbox' , value: <%= raw Caboose.json(store_config.use_usps ? 1 : 0 ) %>, width: 400 },
60
- { name: 'usps_secret_key' , nice_name: 'USPS Secret Key' , type: 'text' , value: <%= raw Caboose.json(store_config.usps_secret_key ) %>, width: 400 },
61
- { name: 'usps_publishable_key' , nice_name: 'USPS Publishable Key' , type: 'text' , value: <%= raw Caboose.json(store_config.usps_publishable_key ) %>, width: 400 },
62
- { name: 'allowed_shipping_codes' , nice_name: 'Allowed Shipping Codes' , type: 'text' , value: <%= raw Caboose.json(store_config.allowed_shipping_codes ) %>, width: 400 },
63
- { name: 'default_shipping_code' , nice_name: 'Default Shipping Code' , type: 'text' , value: <%= raw Caboose.json(store_config.default_shipping_code ) %>, width: 400 },
64
- { name: 'origin_country' , nice_name: 'Country' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_country ) %>, width: 400 },
65
- { name: 'origin_state' , nice_name: 'State' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_state ) %>, width: 400 },
66
- { name: 'origin_city' , nice_name: 'City' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_city ) %>, width: 400 },
67
- { name: 'origin_zip' , nice_name: 'Zip' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_zip ) %>, width: 400 },
68
- { name: 'fulfillment_email' , nice_name: 'Fulfillment Email' , type: 'text' , value: <%= raw Caboose.json(store_config.fulfillment_email ) %>, width: 400 },
69
- { name: 'shipping_email' , nice_name: 'Shipping Email' , type: 'text' , value: <%= raw Caboose.json(store_config.shipping_email ) %>, width: 400 },
70
- { name: 'handling_percentage' , nice_name: 'Handling Percentage' , type: 'text' , value: <%= raw Caboose.json(store_config.handling_percentage ) %>, width: 400 }
71
- ]
72
- });
73
-
74
- });
75
-
76
- </script>
77
- <% end %>