refinerycms-stores 0.0.16 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/Gemfile +2 -0
  2. data/VERSION +1 -1
  3. data/app/assets/images/Excel.png +0 -0
  4. data/app/assets/images/PowerPoint.png +0 -0
  5. data/app/assets/images/Word.png +0 -0
  6. data/app/assets/images/audio-icon.png +0 -0
  7. data/app/assets/images/camera-icon.png +0 -0
  8. data/app/assets/images/html-icon.png +0 -0
  9. data/app/assets/images/muku-doc-font-128.png +0 -0
  10. data/app/assets/images/pdf-icon.png +0 -0
  11. data/app/assets/images/print-icon.png +0 -0
  12. data/app/assets/images/video-icon.png +0 -0
  13. data/app/assets/images/warning-icon.png +0 -0
  14. data/app/assets/images/zip_thumb.png +0 -0
  15. data/app/assets/stylesheets/refinery/refinerycms-stores.sass +66 -0
  16. data/app/controllers/refinery/customers/customers_controller.rb +35 -17
  17. data/app/controllers/refinery/orders/admin/orders_controller.rb +2 -1
  18. data/app/controllers/refinery/orders/orders_controller.rb +14 -9
  19. data/app/controllers/refinery/products/admin/digidownloads_controller.rb +39 -0
  20. data/app/controllers/refinery/products/admin/products_controller.rb +54 -4
  21. data/app/controllers/refinery/products/digidownloads_controller.rb +32 -0
  22. data/app/controllers/refinery/products/products_controller.rb +3 -0
  23. data/app/controllers/refinery/stores/stores_controller.rb +3 -2
  24. data/app/controllers/refinery/stores_application_controller.rb +6 -1
  25. data/app/helpers/refinery/stores/stores_helper.rb +4 -3
  26. data/app/models/refinery/addresses/address.rb +42 -0
  27. data/app/models/refinery/customers/customer.rb +7 -1
  28. data/app/models/refinery/orders/line_item.rb +10 -0
  29. data/app/models/refinery/orders/order.rb +59 -47
  30. data/app/models/refinery/products/digidownload.rb +181 -0
  31. data/app/models/refinery/products/product.rb +21 -1
  32. data/app/views/refinery/customers/customers/edit.html.haml +54 -0
  33. data/app/views/refinery/customers/{new.html.haml → customers/new.html.haml} +10 -3
  34. data/app/views/refinery/orders/admin/orders/_actions.html.haml +4 -0
  35. data/app/views/refinery/orders/admin/orders/_order.html.haml +13 -0
  36. data/app/views/refinery/orders/admin/orders/_orders.html.haml +2 -0
  37. data/app/views/refinery/orders/admin/orders/_records.html.haml +12 -0
  38. data/app/views/refinery/orders/admin/orders/_sortable_list.html.haml +4 -0
  39. data/app/views/refinery/orders/admin/orders/index.html.haml +5 -0
  40. data/app/views/refinery/orders/admin/orders/show.html.haml +80 -0
  41. data/app/views/refinery/orders/orders/edit.html.haml +2 -2
  42. data/app/views/refinery/orders/orders/index.html.haml +19 -4
  43. data/app/views/refinery/orders/orders/show.html.haml +68 -25
  44. data/app/views/refinery/products/admin/digidownloads/_actions.html.haml +19 -0
  45. data/app/views/refinery/products/admin/digidownloads/_digidownload.html.haml +13 -0
  46. data/app/views/refinery/products/admin/digidownloads/_digidownloads.html.haml +2 -0
  47. data/app/views/refinery/products/admin/digidownloads/_form.html.haml +41 -0
  48. data/app/views/refinery/products/admin/digidownloads/_records.html.haml +12 -0
  49. data/app/views/refinery/products/admin/digidownloads/_sortable_list.html.haml +4 -0
  50. data/app/views/refinery/products/admin/digidownloads/edit.html.haml +2 -0
  51. data/app/views/refinery/products/admin/digidownloads/index.html.haml +6 -0
  52. data/app/views/refinery/products/admin/digidownloads/new.html.haml +2 -0
  53. data/app/views/refinery/products/admin/products/_form.html.haml +98 -0
  54. data/app/views/refinery/products/digidownloads/index.html.haml +28 -0
  55. data/app/views/refinery/products/digidownloads/show.html.haml +39 -0
  56. data/app/views/refinery/products/products/show.html.haml +10 -9
  57. data/app/views/refinery/shared/_address.html.haml +18 -0
  58. data/app/views/refinery/{orders/orders → shared}/_address_form.html.haml +0 -0
  59. data/app/views/refinery/{stores/stores → shared}/_cart.html.haml +2 -2
  60. data/app/views/refinery/{stores/stores → shared}/_cart_item.html.haml +0 -0
  61. data/app/views/refinery/shared/_customer_head.html.haml +20 -0
  62. data/app/views/refinery/stores/admin/stores/_actions.html.haml +46 -0
  63. data/app/views/refinery/stores/stores/show.html.haml +1 -1
  64. data/config/locales/en.yml +17 -0
  65. data/config/routes.rb +24 -9
  66. data/db/migrate/3_create_orders_orders.rb +2 -0
  67. data/db/migrate/7_create_products_digidownloads.rb +33 -0
  68. data/lib/refinery/addresses.rb +11 -11
  69. data/lib/refinery/addresses/engine.rb +3 -3
  70. data/lib/refinery/auth_key.rb +44 -0
  71. data/lib/refinery/customers.rb +11 -11
  72. data/lib/refinery/customers/engine.rb +3 -3
  73. data/lib/refinery/orders.rb +1 -1
  74. data/lib/refinery/products.rb +2 -2
  75. data/lib/refinery/products/engine.rb +2 -2
  76. data/lib/refinery/stores.rb +1 -0
  77. data/lib/refinery/stores/authenticated_system.rb +25 -0
  78. data/lib/refinery/stores/engine.rb +19 -0
  79. data/lib/refinerycms-stores.rb +5 -2
  80. data/readme.md +32 -1
  81. data/refinerycms-stores.gemspec +54 -20
  82. metadata +87 -37
  83. data/app/views/refinery/customers/edit.html.haml +0 -17
  84. data/app/views/refinery/orders/admin/orders/_actions.html.erb +0 -25
  85. data/app/views/refinery/orders/admin/orders/_form.html.erb +0 -122
  86. data/app/views/refinery/orders/admin/orders/_order.html.erb +0 -20
  87. data/app/views/refinery/orders/admin/orders/_orders.html.erb +0 -2
  88. data/app/views/refinery/orders/admin/orders/_records.html.erb +0 -18
  89. data/app/views/refinery/orders/admin/orders/_sortable_list.html.erb +0 -5
  90. data/app/views/refinery/orders/admin/orders/edit.html.erb +0 -1
  91. data/app/views/refinery/orders/admin/orders/index.html.erb +0 -7
  92. data/app/views/refinery/orders/admin/orders/new.html.erb +0 -1
  93. data/app/views/refinery/products/admin/products/_form.html.erb +0 -127
  94. data/app/views/refinery/stores/admin/stores/_actions.html.erb +0 -57
  95. data/app/views/refinery/stores/stores/_customer_head.html.haml +0 -12
@@ -0,0 +1,12 @@
1
+ - if searching?
2
+ %h2= t('results_for', :scope => 'refinery.admin.search', :query => params[:search])
3
+ .pagination_container
4
+ - if @digidownloads.any?
5
+ = render 'digidownloads'
6
+ - else
7
+ %p
8
+ - unless searching?
9
+ %strong
10
+ = t('.no_items_yet')
11
+ - else
12
+ = t('no_results', :scope => 'refinery.admin.search')
@@ -0,0 +1,4 @@
1
+ %ul#sortable_list
2
+ = render :partial => 'digidownload', :collection => @digidownloads
3
+ = render '/refinery/admin/sortable_list', |
4
+ :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true |
@@ -0,0 +1,2 @@
1
+ - content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')
2
+ = render :partial => 'form', :locals => { :form_title => "Edit digital download" }
@@ -0,0 +1,6 @@
1
+ - content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')
2
+ %section#records
3
+ = render 'records'
4
+ %aside#actions
5
+ = render 'actions'
6
+ = render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::Products::Admin::ProductsController.sortable? and ::Refinery::Products::Product.count > 1
@@ -0,0 +1,2 @@
1
+ - content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')
2
+ = render( :partial => 'form', :locals => { :form_title => "Create new digital download" } )
@@ -0,0 +1,98 @@
1
+ - no_digidownload = @product.digidownload.nil?
2
+
3
+ = form_for [refinery, :products_admin, @product] do |f|
4
+ = render '/refinery/admin/error_messages', |
5
+ :object => @product, |
6
+ :include_object_name => true |
7
+
8
+ %table.product-header{:width => "100%"}
9
+ %tr
10
+ %td{:style => "vertical-align: top;"}
11
+ .field
12
+ = f.label 'choose a store'
13
+ = f.select :store_id, ::Refinery::Stores::Store.select_list
14
+ .field
15
+ = f.label :name
16
+ = f.text_field :name, :size => 80
17
+ .field
18
+ = f.label :date_available
19
+ = f.datetime_select :date_available
20
+ .field.form-lines
21
+ = f.label :inactive
22
+ = f.check_box :inactive
23
+ - unless no_digidownload
24
+ .download-documents.clearfix
25
+ %dl
26
+ %dt
27
+ = link_to( raw( image_tag( ::Refinery::Products::Digidownload.category_to_icon( @product.digidownload.to_category ), { :alt => @product.digidownload.doc_file_name, :class => 'icon_image' } ) ), @product.digidownload.doc.url, {:title => @product.digidownload.doc_file_name, :target => 'popup', :onclick => "return popup(this.href,this.title)"} )
28
+
29
+ %dd
30
+ %i
31
+ = @product.digidownload.doc_file_name
32
+ = link_to( "change", refinery.edit_products_admin_digidownload_path( @product.digidownload ), { :title => "click save first before changing the download here!" } )
33
+ = @product.digidownload.to_player.html_safe
34
+
35
+
36
+ - else
37
+ .field.form-lines
38
+ = f.label "digital download?", {:title => "check to specify a digital download; invokes upon save"}
39
+ = check_box_tag :digi_download
40
+
41
+
42
+ %td.mainpic
43
+ .field
44
+ = f.label :main_pic
45
+ = render :partial => "/refinery/admin/image_picker", :locals => { |
46
+ :f => f, |
47
+ :field => :main_pic_id, |
48
+ :image => @product.main_pic, |
49
+ :toggle_image_display => false |
50
+ } |
51
+ .clearfix
52
+ .field.float-field
53
+ = f.label :code
54
+ = f.text_field :code
55
+ .field.float-field
56
+ = f.label :price
57
+ = f.text_field :price
58
+
59
+ - if no_digidownload
60
+ .field.float-field
61
+ = f.label :quantity
62
+ = f.text_field :quantity
63
+ .field.float-field
64
+ = f.label :weight
65
+ = f.text_field :weight
66
+ .field.float-field
67
+ = f.label :size_width
68
+ = f.text_field :size_width
69
+ .field.float-field
70
+ = f.label :size_height
71
+ = f.text_field :size_height
72
+ .field.float-field
73
+ = f.label :size_depth
74
+ = f.text_field :size_depth
75
+ .field.float-field
76
+ - #= f.label :tax_type
77
+ - #= f.text_field :tax_type
78
+
79
+ .field
80
+ #page-tabs.clearfix.ui-tabs.ui-widget.ui-widget-content.ui-corner-all
81
+ %ul#page_parts
82
+ - [:description].each_with_index do |part, part_index|
83
+ <li class='ui-state-default#{' ui-state-active' if part_index == 0}'>
84
+ \#{link_to t("#{part}", :scope => "activerecord.attributes.refinery/products/product", :default => part.to_s.titleize), "##{part}"}
85
+ #page_part_editors
86
+ - [:description].each do |part|
87
+ .page_part{:id => part}
88
+ = f.text_area part, :rows => 20, :class => 'wymeditor widest'
89
+ = render '/refinery/admin/form_actions', :f => f, |
90
+ :continue_editing => false, |
91
+ :delete_title => t('delete', :scope => 'refinery.products.admin.products.product'), |
92
+ :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @product.name) |
93
+ - content_for :javascripts do
94
+ :javascript
95
+ $(document).ready(function(){
96
+ page_options.init(false, '', '');
97
+ });
98
+
@@ -0,0 +1,28 @@
1
+ - content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')
2
+
3
+ - content_for :body_content_title do
4
+ Your Digital Downloads
5
+
6
+ - content_for :body_content_left do
7
+ %section
8
+ %h1 Your Digital Downloads
9
+ %p
10
+ %i click name to access download
11
+
12
+ %section.catalog-brief-list
13
+ %dl
14
+ - @digidownloads.each do |digi|
15
+ %dt
16
+ - if digi.product.main_pic_id
17
+ = image_fu digi.product.main_pic, Refinery::Images.user_image_sizes[:small], :class => "catalog-pic", :alt => digi.product.name
18
+ - else
19
+ \&nbsp;
20
+ %dd
21
+ = link_to( ( truncate( digi.product.name, :length => 60 ) + " &raquo;" ).html_safe, refinery.products_digidownload_path( digi ) )
22
+
23
+ - content_for :body_content_right do
24
+ %aside
25
+ &nbsp;
26
+
27
+
28
+ = render "/refinery/content_page"
@@ -0,0 +1,39 @@
1
+ - content_for :body_content_title do
2
+ = @digidownload.product.name
3
+
4
+ - content_for :body_content_left do
5
+ %section#product
6
+ .product_show
7
+ .product_photo
8
+ - if @digidownload.product.main_pic_id
9
+ = image_fu @digidownload.product.main_pic, Refinery::Images.user_image_sizes[:large], :class => "product-pic", :alt => @digidownload.product.name
10
+ - else
11
+ \&nbsp;
12
+ .product_text
13
+ %h1
14
+ = @digidownload.product.name
15
+ %p
16
+ = raw @digidownload.product.description
17
+
18
+ .download-documents.clearfix
19
+ %h2 How to download
20
+ %ul
21
+ %li To download to your computer: right-click the icon below, select SAVE-AS.
22
+ %li To open immediately: click the icon below.
23
+ %li To play media: click the start button in the player.
24
+ %dl
25
+ %dt
26
+ = link_to( raw( image_tag( ::Refinery::Products::Digidownload.category_to_icon( @digidownload.to_category ), { :alt => @digidownload.doc_file_name, :class => 'icon_image' } ) ), refinery.download_products_digidownload_path( @digidownload ), {:title => @digidownload.doc_file_name, :target => 'popup', :onclick => "return popup(this.href,this.title)"} )
27
+
28
+ %dd
29
+ %i= @digidownload.doc_file_name
30
+ %br
31
+ = @digidownload.to_player.html_safe
32
+
33
+
34
+ - content_for :body_content_right do
35
+ %aside
36
+ &nbsp;
37
+
38
+ = render '/refinery/content_page'
39
+
@@ -18,14 +18,15 @@
18
18
  %p
19
19
  code: #{@product.code}
20
20
  %br/
21
- size:
22
- \#{number_with_precision(@product.size_width, :precision => 1)} x
23
- \#{number_with_precision(@product.size_height, :precision => 1)} x
24
- \#{number_with_precision(@product.size_depth, :precision => 1)}
25
- %br/
26
- weight:
27
- \#{number_with_precision(@product.weight, :precision => 1)} lbs
28
- - unless @product.digital_download_id.blank?
21
+ - if @product.digidownload.nil?
22
+ %br/
23
+ size:
24
+ \#{number_with_precision(@product.size_width, :precision => 1)} x
25
+ \#{number_with_precision(@product.size_height, :precision => 1)} x
26
+ \#{number_with_precision(@product.size_depth, :precision => 1)}
27
+ weight:
28
+ \#{number_with_precision(@product.weight, :precision => 1)} lbs
29
+ - else
29
30
  %i digital download
30
31
  .product_pricebuy
31
32
  %h2
@@ -34,5 +35,5 @@
34
35
  = button_to( "add to cart", refinery.add_to_cart_stores_stores_path(:id => @product), :class => "add-to-cart" )
35
36
  - content_for :body_content_right do
36
37
  %aside
37
- = render( :partial => "refinery/stores/stores/cart", :object => @cart )
38
+ = render( :partial => "refinery/shared/cart", :object => @cart )
38
39
  = render '/refinery/content_page'
@@ -0,0 +1,18 @@
1
+ %div( class = 'address-block' id = '#{as_name.to_s}' )
2
+ %h3= as_name.to_s.gsub(/_/,' ')
3
+ = address.first_name
4
+ = address.last_name
5
+ %br
6
+ = address.address1
7
+ = address.address2
8
+ %br
9
+ = address.city
10
+ = address.state
11
+ = address.zip
12
+ %br
13
+ = address.country
14
+ %br
15
+ = number_to_phone address.phone
16
+ &emsp;
17
+ = mail_to( address.email , address.email )
18
+
@@ -1,4 +1,4 @@
1
- = render "refinery/stores/stores/customer_head"
1
+ = render "refinery/shared/customer_head"
2
2
 
3
3
  #cart
4
4
  .cart-title
@@ -9,7 +9,7 @@
9
9
  %p
10
10
  %i Your cart is empty; click add-to-cart to add products.
11
11
  %table
12
- = render(:partial => "refinery/stores/stores/cart_item", :collection => cart.items)
12
+ = render(:partial => "refinery/shared/cart_item", :collection => cart.items)
13
13
  %tr.total-line
14
14
  %td{:colspan => "2"} Total
15
15
  %td.total-cell= number_to_currency(cart.total_price)
@@ -0,0 +1,20 @@
1
+ #customer-profile
2
+ .customer-actions
3
+ %p
4
+ = pretty_customer_name( )
5
+ &ensp;
6
+ - if refinery_user_signed_in?
7
+ - unless current_refinery_user.orders.empty?
8
+ = link_to( "my&nbsp;orders".html_safe, refinery.orders_orders_path, :title => "view your orders" )
9
+ &nbsp;
10
+ - if ::Refinery::Orders::Order.any_digidownloads?( current_refinery_user.id )
11
+ = link_to( "my&nbsp;downloads".html_safe, refinery.products_digidownloads_path( ), :title => "access your digital downloads" )
12
+ &nbsp;
13
+ = link_to( "profile", refinery.edit_customers_customer_path( current_refinery_user ), :title => "update your profile information" )
14
+ &nbsp;
15
+ = link_to( "sign out", refinery.destroy_refinery_user_session_path, :title => "switch customer profile" )
16
+
17
+ -else
18
+ = link_to( "sign up", refinery.new_customers_customer_path, :title => "create a new customer profile" )
19
+ &nbsp;
20
+ = link_to( "sign in", refinery.new_refinery_user_session_path, :title => "sign into your customer profile" )
@@ -0,0 +1,46 @@
1
+ %ul
2
+ - if ::Refinery::Stores::Admin::StoresController.searchable?
3
+ %li
4
+ = render '/refinery/admin/search', :url => refinery.stores_admin_stores_path
5
+
6
+ -# ************ STORES ACTIONS **********************************
7
+ %ul.collapsible_menu
8
+ %li.not_a_link
9
+ = link_to t('.title'), '#', :class => 'page_icon'
10
+ %li
11
+ = link_to t('.manage'), refinery.stores_admin_stores_path, :class => 'page_icon'
12
+ %li
13
+ = link_to t('.create_new'), refinery.new_stores_admin_store_path, :class => "add_icon"
14
+
15
+ - if !searching? && ::Refinery::Stores::Admin::StoresController.sortable? && ::Refinery::Stores::Store.any?
16
+ %li
17
+ = link_to t('.reorder', :what => "Stores"), refinery.stores_admin_stores_path, :id => "reorder_action", :class => "reorder_icon"
18
+ = link_to t('.reorder_done', :what => "Stores"), refinery.stores_admin_stores_path, :id => "reorder_action_done", :style => "display: none;", :class => "reorder_icon"
19
+
20
+ -# ************ PRODUCTS ACTIONS **********************************
21
+ %ul.collapsible_menu
22
+ %li.not_a_link
23
+ = link_to t('refinery.products.admin.products.actions.title'), '#', :class => 'folder_icon'
24
+ %li
25
+ = link_to t('refinery.products.admin.products.actions.manage'), refinery.products_admin_products_path, :class => 'folder_icon'
26
+ %li
27
+ = link_to t('refinery.products.admin.products.actions.create_new'), refinery.new_products_admin_product_path(), :class => 'add_icon'
28
+
29
+ -# ************ DIGIDOWNLOADS ACTIONS **********************************
30
+ %ul.collapsible_menu
31
+ %li.not_a_link
32
+ = link_to t('refinery.products.admin.digidownloads.actions.title'), '#', :class => 'folder_icon'
33
+ %li
34
+ = link_to t('refinery.products.admin.digidownloads.actions.manage'), refinery.products_admin_digidownloads_path, :class => 'folder_icon'
35
+ %li
36
+ = link_to t('refinery.products.admin.digidownloads.actions.create_new'), refinery.new_products_admin_digidownload_path(), :class => 'add_icon'
37
+
38
+
39
+ -# ************ ORDERS ACTIONS **********************************
40
+ %ul.collapsible_menu
41
+ %li.not_a_link
42
+ = link_to t('refinery.orders.admin.orders.actions.title'), '#', :class => 'folder_icon'
43
+ %li
44
+ = link_to t('refinery.orders.admin.orders.actions.manage'), refinery.orders_admin_orders_path, :class => 'folder_icon'
45
+
46
+
@@ -10,5 +10,5 @@
10
10
  = render :partial => "list_product", :collection => @store.active_products
11
11
  - content_for :body_content_right do
12
12
  %aside
13
- = render( :partial => "cart", :object => @cart )
13
+ = render( :partial => "refinery/shared/cart", :object => @cart )
14
14
  = render "/refinery/content_page"
@@ -56,6 +56,8 @@ en:
56
56
  create_new: Add New Order
57
57
  reorder: Reorder Orders
58
58
  reorder_done: Done Reordering Orders
59
+ title: Store Orders
60
+ manage: View Orders
59
61
  records:
60
62
  title: Orders
61
63
  sorry_no_results: Sorry! There are no results found.
@@ -86,6 +88,21 @@ en:
86
88
  view_live_html: View this product live <br/><em>(opens in a new window)</em>
87
89
  edit: Edit this product
88
90
  delete: Remove this product forever
91
+ digidownloads:
92
+ actions:
93
+ title: Digital Downloads
94
+ manage: Manage Digital Downloads
95
+ create_new: Add New Digital Download
96
+ records:
97
+ title: Digital Downloads
98
+ sorry_no_results: Sorry! There are no results found.
99
+ no_items_yet: There are no Digital Downloads yet. Click "Add New Digital Download" to add your
100
+ first Digital Download.
101
+ download:
102
+ view_live_html: View this Digital Download live <br/><em>(opens in a new window)</em>
103
+ edit: Edit this Digital Download
104
+ delete: Remove this Digital Download forever
105
+
89
106
  products:
90
107
  show:
91
108
  other: Other Products
@@ -4,6 +4,7 @@ Refinery::Core::Engine.routes.draw do
4
4
  # Frontend routes
5
5
  # ###################################################################
6
6
  namespace :stores do
7
+ root :to => 'stores#index'
7
8
  resources :stores, :only => [:index, :show] do
8
9
  collection do
9
10
  post :add_to_cart
@@ -14,6 +15,7 @@ Refinery::Core::Engine.routes.draw do
14
15
 
15
16
  end
16
17
 
18
+
17
19
  namespace :orders do
18
20
  resources :orders, :only => [:index, :show, :update, :edit] do
19
21
  member do
@@ -27,6 +29,11 @@ Refinery::Core::Engine.routes.draw do
27
29
 
28
30
  namespace :products do
29
31
  resources :products, :only => [:show]
32
+ resources :digidownloads, :only => [:index, :show] do
33
+ member do
34
+ get :download
35
+ end
36
+ end
30
37
  end
31
38
 
32
39
 
@@ -55,27 +62,25 @@ Refinery::Core::Engine.routes.draw do
55
62
 
56
63
  namespace :products, :path => '' do
57
64
  namespace :admin, :path => 'refinery' do
65
+
58
66
  resources :products, :except => :show do
59
67
  collection do
60
68
  post :update_positions
61
69
  end
62
70
  end
63
- end
64
- end
65
71
 
66
- namespace :orders, :path => '' do
67
- namespace :admin, :path => 'refinery' do
68
- resources :orders, :except => :show do
72
+ resources :digidownloads do
69
73
  collection do
70
74
  post :update_positions
71
75
  end
72
76
  end
73
- end
74
- end
75
77
 
76
- namespace :addresses, :path => '' do
78
+ end # admin
79
+ end # products
80
+
81
+ namespace :orders, :path => '' do
77
82
  namespace :admin, :path => 'refinery' do
78
- resources :addresses, :except => :show do
83
+ resources :orders, :only => [:show, :index] do
79
84
  collection do
80
85
  post :update_positions
81
86
  end
@@ -83,5 +88,15 @@ Refinery::Core::Engine.routes.draw do
83
88
  end
84
89
  end
85
90
 
91
+ # namespace :addresses, :path => '' do
92
+ # namespace :admin, :path => 'refinery' do
93
+ # resources :addresses, :except => :show do
94
+ # collection do
95
+ # post :update_positions
96
+ # end
97
+ # end
98
+ # end
99
+ # end
100
+
86
101
 
87
102
  end # do namespace routes