radiant-shop-extension 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. data/README.md +5 -1
  2. data/VERSION +1 -1
  3. data/app/controllers/admin/shop/categories_controller.rb +32 -65
  4. data/app/controllers/admin/shop/customers_controller.rb +8 -7
  5. data/app/controllers/admin/shop/orders_controller.rb +37 -159
  6. data/app/controllers/admin/shop/packages/packings_controller.rb +90 -0
  7. data/app/controllers/admin/shop/packages_controller.rb +65 -0
  8. data/app/controllers/admin/shop/products/images_controller.rb +5 -8
  9. data/app/controllers/admin/shop/products/variant_templates_controller.rb +27 -0
  10. data/app/controllers/admin/shop/products/variants_controller.rb +60 -0
  11. data/app/controllers/admin/shop/products_controller.rb +67 -64
  12. data/app/controllers/admin/shop/variants_controller.rb +49 -0
  13. data/app/helpers/shop_helper.rb +5 -0
  14. data/app/models/form_address.rb +144 -0
  15. data/app/models/form_checkout.rb +200 -307
  16. data/app/models/form_line_item.rb +60 -0
  17. data/app/models/shop_address.rb +2 -2
  18. data/app/models/shop_category.rb +48 -51
  19. data/app/models/shop_customer.rb +25 -5
  20. data/app/models/shop_group.rb +15 -0
  21. data/app/models/shop_grouping.rb +6 -0
  22. data/app/models/shop_line_item.rb +7 -6
  23. data/app/models/shop_order.rb +44 -16
  24. data/app/models/shop_package.rb +74 -0
  25. data/app/models/shop_packing.rb +22 -0
  26. data/app/models/shop_page.rb +7 -0
  27. data/app/models/shop_payment.rb +5 -1
  28. data/app/models/shop_product.rb +86 -48
  29. data/app/models/shop_product_attachment.rb +5 -2
  30. data/app/models/shop_product_variant.rb +31 -0
  31. data/app/models/shop_variant.rb +25 -0
  32. data/app/views/admin/shop/categories/edit.html.haml +9 -10
  33. data/app/views/admin/shop/categories/edit/_foot.html.haml +9 -0
  34. data/app/views/admin/shop/categories/edit/_form.html.haml +14 -0
  35. data/app/views/admin/shop/categories/edit/_head.html.haml +4 -2
  36. data/app/views/admin/shop/categories/edit/_inputs.html.haml +2 -0
  37. data/app/views/admin/shop/categories/edit/_meta.html.haml +8 -7
  38. data/app/views/admin/shop/categories/edit/_parts.html.haml +9 -0
  39. data/app/views/admin/shop/categories/edit/_popups.html.haml +4 -0
  40. data/app/views/admin/shop/categories/edit/inputs/_name.html.haml +4 -0
  41. data/app/views/admin/shop/categories/edit/meta/_handle.html.haml +6 -5
  42. data/app/views/admin/shop/categories/edit/meta/_layouts.html.haml +6 -5
  43. data/app/views/admin/shop/categories/edit/meta/_page.html.haml +3 -0
  44. data/app/views/admin/shop/categories/edit/parts/_description.html.haml +4 -1
  45. data/app/views/admin/shop/categories/index/_category.html.haml +11 -10
  46. data/app/views/admin/shop/categories/new.html.haml +10 -9
  47. data/app/views/admin/shop/customers/edit.html.haml +8 -10
  48. data/app/views/admin/shop/customers/edit/_foot.html.haml +9 -0
  49. data/app/views/admin/shop/customers/edit/_form.html.haml +13 -0
  50. data/app/views/admin/shop/customers/edit/_head.html.haml +4 -2
  51. data/app/views/admin/shop/customers/edit/_inputs.html.haml +2 -0
  52. data/app/views/admin/shop/customers/edit/_parts.html.haml +9 -4
  53. data/app/views/admin/shop/customers/edit/inputs/_email.html.haml +3 -0
  54. data/app/views/admin/shop/customers/edit/inputs/_name.html.haml +3 -0
  55. data/app/views/admin/shop/customers/edit/parts/_orders.html.haml +10 -6
  56. data/app/views/admin/shop/customers/index.html.haml +4 -1
  57. data/app/views/admin/shop/customers/index/_customer.html.haml +3 -3
  58. data/app/views/admin/shop/customers/index/_foot.html.haml +4 -0
  59. data/app/views/admin/shop/customers/index/_head.html.haml +4 -0
  60. data/app/views/admin/shop/customers/new.html.haml +9 -9
  61. data/app/views/admin/shop/orders/edit.html.haml +11 -0
  62. data/app/views/admin/shop/orders/edit/_foot.html.haml +9 -0
  63. data/app/views/admin/shop/orders/edit/_form.html.haml +13 -0
  64. data/app/views/admin/shop/orders/edit/_head.html.haml +4 -0
  65. data/app/views/admin/shop/orders/edit/_inputs.html.haml +2 -0
  66. data/app/views/admin/shop/orders/edit/_meta.html.haml +8 -0
  67. data/app/views/admin/shop/orders/edit/_parts.html.haml +9 -0
  68. data/app/views/admin/shop/orders/edit/_popups.html.haml +4 -0
  69. data/app/views/admin/shop/orders/edit/parts/_address.html.haml +7 -0
  70. data/app/views/admin/shop/orders/edit/parts/_addresses.html.haml +9 -0
  71. data/app/views/admin/shop/orders/edit/parts/_customer.html.haml +3 -0
  72. data/app/views/admin/shop/orders/edit/parts/_items.html.haml +8 -0
  73. data/app/views/admin/shop/orders/index.html.haml +10 -30
  74. data/app/views/admin/shop/orders/index/_foot.html.haml +3 -0
  75. data/app/views/admin/shop/orders/index/_head.html.haml +4 -0
  76. data/app/views/admin/shop/orders/index/_order.html.haml +13 -0
  77. data/app/views/admin/shop/orders/index/buttons/_all.html.haml +1 -0
  78. data/app/views/admin/shop/orders/index/buttons/_new.html.haml +1 -0
  79. data/app/views/admin/shop/orders/index/buttons/_paid.html.haml +1 -0
  80. data/app/views/admin/shop/orders/index/buttons/_shipped.html.haml +1 -0
  81. data/app/views/admin/shop/packages/edit.html.haml +11 -0
  82. data/app/views/admin/shop/packages/edit/_foot.html.haml +17 -0
  83. data/app/views/admin/shop/packages/edit/_form.html.haml +15 -0
  84. data/app/views/admin/shop/packages/edit/_head.html.haml +4 -0
  85. data/app/views/admin/shop/packages/edit/_inputs.html.haml +2 -0
  86. data/app/views/admin/shop/packages/edit/_meta.html.haml +8 -0
  87. data/app/views/admin/shop/packages/edit/_parts.html.haml +9 -0
  88. data/app/views/admin/shop/packages/edit/_popups.html.haml +4 -0
  89. data/app/views/admin/shop/packages/edit/buttons/_browse_products.html.haml +1 -0
  90. data/app/views/admin/shop/packages/edit/inputs/_name.html.haml +3 -0
  91. data/app/views/admin/shop/packages/edit/inputs/_price.html.haml +3 -0
  92. data/app/views/admin/shop/packages/edit/meta/_sku.html.haml +5 -0
  93. data/app/views/admin/shop/packages/edit/parts/_description.html.haml +1 -0
  94. data/app/views/admin/shop/packages/edit/parts/_products.html.haml +3 -0
  95. data/app/views/admin/shop/packages/edit/popups/_browse_products.html.haml +7 -0
  96. data/app/views/admin/shop/packages/edit/shared/_product.html.haml +8 -0
  97. data/app/views/admin/shop/packages/index.html.haml +13 -0
  98. data/app/views/admin/shop/packages/index/_foot.html.haml +7 -0
  99. data/app/views/admin/shop/packages/index/_head.html.haml +4 -0
  100. data/app/views/admin/shop/packages/index/_package.html.haml +9 -0
  101. data/app/views/admin/shop/packages/new.html.haml +11 -0
  102. data/app/views/admin/shop/packages/remove.html.haml +12 -0
  103. data/app/views/admin/shop/products/edit.html.haml +9 -12
  104. data/app/views/admin/shop/products/edit/_foot.html.haml +19 -0
  105. data/app/views/admin/shop/products/edit/_form.html.haml +15 -0
  106. data/app/views/admin/shop/products/edit/_head.html.haml +4 -2
  107. data/app/views/admin/shop/products/edit/_inputs.html.haml +2 -0
  108. data/app/views/admin/shop/products/edit/_meta.html.haml +8 -8
  109. data/app/views/admin/shop/products/edit/_parts.html.haml +9 -0
  110. data/app/views/admin/shop/products/edit/_popups.html.haml +4 -0
  111. data/app/views/admin/shop/products/edit/buttons/_browse_images.html.haml +1 -1
  112. data/app/views/admin/shop/products/edit/buttons/_browse_templates.html.haml +1 -0
  113. data/app/views/admin/shop/products/edit/buttons/_new_image.html.haml +1 -1
  114. data/app/views/admin/shop/products/edit/buttons/_new_variant.html.haml +1 -0
  115. data/app/views/admin/shop/products/edit/inputs/_name.html.haml +4 -0
  116. data/app/views/admin/shop/products/edit/inputs/_price.html.haml +3 -0
  117. data/app/views/admin/shop/products/edit/meta/_category.html.haml +6 -5
  118. data/app/views/admin/shop/products/edit/meta/_page.html.haml +2 -0
  119. data/app/views/admin/shop/products/edit/meta/_sku.html.haml +6 -5
  120. data/app/views/admin/shop/products/edit/parts/_customers.html.haml +5 -0
  121. data/app/views/admin/shop/products/edit/parts/_description.html.haml +4 -1
  122. data/app/views/admin/shop/products/edit/parts/_images.html.haml +1 -1
  123. data/app/views/admin/shop/products/edit/parts/_variants.html.haml +3 -0
  124. data/app/views/admin/shop/products/edit/popups/_browse_images.html.haml +1 -1
  125. data/app/views/admin/shop/products/edit/popups/_browse_templates.html.haml +6 -0
  126. data/app/views/admin/shop/products/edit/popups/_new_image.html.haml +4 -4
  127. data/app/views/admin/shop/products/edit/popups/_new_variant.html.haml +16 -0
  128. data/app/views/admin/shop/products/edit/{_image.html.haml → shared/_image.html.haml} +0 -0
  129. data/app/views/admin/shop/products/edit/shared/_template.html.haml +6 -0
  130. data/app/views/admin/shop/products/edit/shared/_variant.html.haml +10 -0
  131. data/app/views/admin/shop/products/index.html.haml +6 -3
  132. data/app/views/admin/shop/products/index/_foot.html.haml +10 -0
  133. data/app/views/admin/shop/products/index/_head.html.haml +4 -0
  134. data/app/views/admin/shop/products/index/_product.html.haml +18 -10
  135. data/app/views/admin/shop/products/index/buttons/_discounts.html.haml +1 -0
  136. data/app/views/admin/shop/products/index/buttons/_packages.html.haml +1 -0
  137. data/app/views/admin/shop/products/index/buttons/_variants.html.haml +1 -0
  138. data/app/views/admin/shop/products/new.html.haml +10 -9
  139. data/app/views/admin/shop/variants/edit.html.haml +11 -0
  140. data/app/views/admin/shop/variants/edit/_foot.html.haml +9 -0
  141. data/app/views/admin/shop/variants/edit/_form.html.haml +13 -0
  142. data/app/views/admin/shop/variants/edit/_head.html.haml +4 -0
  143. data/app/views/admin/shop/variants/edit/_inputs.html.haml +2 -0
  144. data/app/views/admin/shop/variants/edit/_meta.html.haml +8 -0
  145. data/app/views/admin/shop/variants/edit/_parts.html.haml +9 -0
  146. data/app/views/admin/shop/variants/edit/_popups.html.haml +4 -0
  147. data/app/views/admin/shop/variants/edit/inputs/_name.html.haml +3 -0
  148. data/app/views/admin/shop/variants/edit/inputs/_options.html.haml +3 -0
  149. data/app/views/admin/shop/variants/index.html.haml +13 -0
  150. data/app/views/admin/shop/variants/index/_foot.html.haml +4 -0
  151. data/app/views/admin/shop/variants/index/_head.html.haml +4 -0
  152. data/app/views/admin/shop/variants/index/_variant.html.haml +9 -0
  153. data/app/views/admin/shop/variants/new.html.haml +11 -0
  154. data/app/views/admin/shop/variants/remove.html.haml +12 -0
  155. data/config/locales/en.yml +8 -1
  156. data/config/routes.rb +11 -22
  157. data/db/migrate/20100929011106_fix_relationship_foreign_keys.rb +101 -0
  158. data/db/migrate/20100929011607_drop_shop_addressables.rb +25 -0
  159. data/db/migrate/20100929030510_create_shop_groups.rb +19 -0
  160. data/db/migrate/20100929080301_shop_groups_change_add_description.rb +11 -0
  161. data/db/migrate/20100929081200_create_variants.rb +20 -0
  162. data/db/migrate/20100929143531_change_variants_add_updated_by.rb +25 -0
  163. data/db/migrate/20100929145641_change_created_by_to_id.rb +75 -0
  164. data/db/migrate/20100929235221_change_category_add_variant_id.rb +9 -0
  165. data/db/migrate/20100930235221_create_packages.rb +31 -0
  166. data/db/migrate/20101005231713_create_page_ids.rb +11 -0
  167. data/db/migrate/20101006051214_create_pages_for_products_and_categories.rb +73 -0
  168. data/db/migrate/20101007111845_add_default_position_to_attachment.rb +9 -0
  169. data/lib/shop/controllers/application_controller.rb +1 -1
  170. data/lib/shop/interface/categories.rb +29 -0
  171. data/lib/shop/interface/customers.rb +15 -15
  172. data/lib/shop/interface/orders.rb +34 -0
  173. data/lib/shop/interface/packages.rb +34 -0
  174. data/lib/shop/interface/products.rb +18 -31
  175. data/lib/shop/interface/variants.rb +34 -0
  176. data/lib/shop/models/form_extension.rb +23 -0
  177. data/lib/shop/models/page.rb +3 -2
  178. data/lib/shop/tags/address.rb +3 -3
  179. data/lib/shop/tags/cart.rb +12 -16
  180. data/lib/shop/tags/category.rb +4 -6
  181. data/lib/shop/tags/helpers.rb +131 -30
  182. data/lib/shop/tags/item.rb +16 -33
  183. data/lib/shop/tags/package.rb +95 -0
  184. data/lib/shop/tags/product.rb +11 -16
  185. data/lib/shop/tags/product_variant.rb +52 -0
  186. data/mockups/discounts/new-edit.bmml +492 -0
  187. data/public/javascripts/admin/extensions/shop/edit.js +20 -0
  188. data/public/javascripts/admin/extensions/shop/packages/edit.js +109 -0
  189. data/public/javascripts/admin/extensions/shop/products/edit.js +64 -65
  190. data/public/javascripts/admin/extensions/shop/products/index.js +31 -36
  191. data/public/stylesheets/sass/admin/extensions/shop/edit.sass +58 -11
  192. data/public/stylesheets/sass/admin/extensions/shop/index.sass +104 -53
  193. data/public/stylesheets/sass/admin/extensions/shop/packages/edit.sass +162 -0
  194. data/public/stylesheets/sass/admin/extensions/shop/products/edit.sass +115 -36
  195. data/public/stylesheets/sass/admin/extensions/shop/products/index.sass +12 -20
  196. data/radiant-shop-extension.gemspec +182 -38
  197. data/shop_extension.rb +29 -25
  198. data/spec/controllers/admin/shop/categories_controller_spec.rb +76 -191
  199. data/spec/controllers/admin/shop/customers_controller_spec.rb +67 -0
  200. data/spec/controllers/admin/shop/orders_controller_spec.rb +85 -0
  201. data/spec/controllers/admin/shop/packages/packings_controller_spec.rb +188 -0
  202. data/spec/controllers/admin/shop/packages_controller_spec.rb +32 -0
  203. data/spec/controllers/admin/shop/products/images_controller_spec.rb +10 -15
  204. data/spec/controllers/admin/shop/products/variant_templates_controller_spec.rb +53 -0
  205. data/spec/controllers/admin/shop/products/variants_controller_spec.rb +116 -0
  206. data/spec/controllers/admin/shop/products_controller_spec.rb +80 -148
  207. data/spec/controllers/admin/shop/variants_controller_spec.rb +67 -0
  208. data/spec/datasets/forms.rb +23 -8
  209. data/spec/datasets/shop_addresses.rb +1 -4
  210. data/spec/datasets/shop_categories.rb +25 -4
  211. data/spec/datasets/shop_groups.rb +15 -0
  212. data/spec/datasets/shop_line_items.rb +4 -3
  213. data/spec/datasets/shop_orders.rb +6 -15
  214. data/spec/datasets/shop_packages.rb +25 -0
  215. data/spec/datasets/shop_payments.rb +12 -0
  216. data/spec/datasets/{images.rb → shop_product_attachments.rb} +9 -1
  217. data/spec/datasets/shop_product_variants.rb +22 -0
  218. data/spec/datasets/shop_products.rb +28 -18
  219. data/spec/datasets/shop_variants.rb +17 -0
  220. data/spec/lib/shop/models/image_spec.rb +4 -4
  221. data/spec/lib/shop/tags/address_spec.rb +3 -3
  222. data/spec/lib/shop/tags/cart_spec.rb +32 -43
  223. data/spec/lib/shop/tags/category_spec.rb +58 -93
  224. data/spec/lib/shop/tags/helpers_spec.rb +162 -69
  225. data/spec/lib/shop/tags/item_spec.rb +116 -158
  226. data/spec/lib/shop/tags/package_spec.rb +342 -0
  227. data/spec/lib/shop/tags/product_spec.rb +29 -26
  228. data/spec/lib/shop/tags/product_variant_spec.rb +175 -0
  229. data/spec/models/form_address_spec.rb +166 -0
  230. data/spec/models/form_checkout_spec.rb +27 -157
  231. data/spec/models/shop_address_spec.rb +81 -0
  232. data/spec/models/shop_category_spec.rb +114 -31
  233. data/spec/models/shop_customer_spec.rb +105 -0
  234. data/spec/models/shop_group_spec.rb +38 -0
  235. data/spec/models/shop_line_item_spec.rb +5 -5
  236. data/spec/models/shop_order_spec.rb +89 -83
  237. data/spec/models/shop_package_spec.rb +117 -0
  238. data/spec/models/shop_packing_spec.rb +67 -0
  239. data/spec/models/shop_payment_spec.rb +19 -0
  240. data/spec/models/shop_product_attachment_spec.rb +4 -3
  241. data/spec/models/shop_product_spec.rb +171 -92
  242. data/spec/models/shop_product_variant_spec.rb +92 -0
  243. data/spec/models/shop_variant_spec.rb +47 -0
  244. metadata +183 -39
  245. data/app/controllers/shop/categories_controller.rb +0 -45
  246. data/app/controllers/shop/line_items_controller.rb +0 -165
  247. data/app/controllers/shop/orders_controller.rb +0 -16
  248. data/app/controllers/shop/products_controller.rb +0 -48
  249. data/app/models/shop_addressable.rb +0 -11
  250. data/app/views/admin/shop/categories/edit/_fields.html.haml +0 -28
  251. data/app/views/admin/shop/categories/edit/_part.html.haml +0 -3
  252. data/app/views/admin/shop/categories/edit/_popup.html.haml +0 -3
  253. data/app/views/admin/shop/customers/edit/_fields.html.haml +0 -33
  254. data/app/views/admin/shop/customers/index/_bottom.html.haml +0 -4
  255. data/app/views/admin/shop/products/edit/_fields.html.haml +0 -38
  256. data/app/views/admin/shop/products/edit/_part.html.haml +0 -3
  257. data/app/views/admin/shop/products/edit/_popup.html.haml +0 -3
  258. data/app/views/admin/shop/products/index/_bottom.html.haml +0 -5
  259. data/spec/controllers/shop/categories_controller_spec.rb +0 -42
  260. data/spec/controllers/shop/line_items_controller_spec.rb +0 -256
  261. data/spec/controllers/shop/orders_controller_specs.rb +0 -37
  262. data/spec/controllers/shop/products_controller_spec.rb +0 -51
  263. data/vendor/plugins/json_fields/.gitignore +0 -3
  264. data/vendor/plugins/json_fields/MIT-LICENSE +0 -20
  265. data/vendor/plugins/json_fields/README.rdoc +0 -65
  266. data/vendor/plugins/json_fields/Rakefile +0 -55
  267. data/vendor/plugins/json_fields/init.rb +0 -2
  268. data/vendor/plugins/json_fields/lib/json_fields.rb +0 -99
  269. data/vendor/plugins/json_fields/spec/lib/json_fields_spec.rb +0 -124
  270. data/vendor/plugins/json_fields/spec/spec.opts +0 -6
  271. data/vendor/plugins/json_fields/spec/spec_helper.rb +0 -29
  272. data/vendor/plugins/json_fields/spec/test_models.rb +0 -12
@@ -0,0 +1,47 @@
1
+ require 'spec/spec_helper'
2
+
3
+ describe ShopVariant do
4
+
5
+ dataset :shop_variants, :shop_categories
6
+
7
+ describe 'relationships' do
8
+ before :each do
9
+ @variant = shop_variants(:bread_states)
10
+ end
11
+ context 'categories' do
12
+ before :each do
13
+ @breads = shop_categories(:bread)
14
+ end
15
+ it 'should have many' do
16
+ @variant.categories << @breads
17
+ @variant.categories.include?(@breads).should === true
18
+ end
19
+ end
20
+ end
21
+
22
+ describe 'validations' do
23
+ before :each do
24
+ @variant = shop_variants(:bread_states)
25
+ end
26
+
27
+ context 'name' do
28
+ it 'should require' do
29
+ @variant.name = nil
30
+ @variant.valid?.should === false
31
+ end
32
+ it 'should be unique' do
33
+ @other = shop_variants(:milk_states)
34
+ @other.name = @variant.name
35
+ @other.valid?.should === false
36
+ end
37
+ end
38
+
39
+ context 'options' do
40
+ it 'should require' do
41
+ @variant.options_json = nil
42
+ @variant.valid?.should === false
43
+ end
44
+ end
45
+ end
46
+
47
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-shop-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 10
8
+ - 11
9
9
  - 0
10
- version: 0.10.0
10
+ version: 0.11.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dirk Kelly
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-28 00:00:00 +08:00
19
+ date: 2010-10-08 00:00:00 +08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -120,47 +120,65 @@ files:
120
120
  - app/controllers/admin/shop/categories_controller.rb
121
121
  - app/controllers/admin/shop/customers_controller.rb
122
122
  - app/controllers/admin/shop/orders_controller.rb
123
+ - app/controllers/admin/shop/packages/packings_controller.rb
124
+ - app/controllers/admin/shop/packages_controller.rb
123
125
  - app/controllers/admin/shop/products/images_controller.rb
126
+ - app/controllers/admin/shop/products/variant_templates_controller.rb
127
+ - app/controllers/admin/shop/products/variants_controller.rb
124
128
  - app/controllers/admin/shop/products_controller.rb
129
+ - app/controllers/admin/shop/variants_controller.rb
125
130
  - app/controllers/admin/shops_controller.rb
126
- - app/controllers/shop/categories_controller.rb
127
- - app/controllers/shop/line_items_controller.rb
128
- - app/controllers/shop/orders_controller.rb
129
- - app/controllers/shop/products_controller.rb
131
+ - app/helpers/shop_helper.rb
132
+ - app/models/form_address.rb
130
133
  - app/models/form_checkout.rb
134
+ - app/models/form_line_item.rb
131
135
  - app/models/shop_address.rb
132
- - app/models/shop_addressable.rb
133
136
  - app/models/shop_category.rb
134
137
  - app/models/shop_category_page.rb
135
138
  - app/models/shop_customer.rb
139
+ - app/models/shop_group.rb
140
+ - app/models/shop_grouping.rb
136
141
  - app/models/shop_line_item.rb
137
142
  - app/models/shop_order.rb
143
+ - app/models/shop_package.rb
144
+ - app/models/shop_packing.rb
145
+ - app/models/shop_page.rb
138
146
  - app/models/shop_payment.rb
139
147
  - app/models/shop_product.rb
140
148
  - app/models/shop_product_attachment.rb
141
149
  - app/models/shop_product_page.rb
150
+ - app/models/shop_product_variant.rb
151
+ - app/models/shop_variant.rb
142
152
  - app/views/.DS_Store
143
153
  - app/views/admin/.DS_Store
144
154
  - app/views/admin/pages/_shop_category.html.haml
145
155
  - app/views/admin/pages/_shop_product.html.haml
146
156
  - app/views/admin/shop/categories/edit.html.haml
147
- - app/views/admin/shop/categories/edit/_fields.html.haml
157
+ - app/views/admin/shop/categories/edit/_foot.html.haml
158
+ - app/views/admin/shop/categories/edit/_form.html.haml
148
159
  - app/views/admin/shop/categories/edit/_head.html.haml
160
+ - app/views/admin/shop/categories/edit/_inputs.html.haml
149
161
  - app/views/admin/shop/categories/edit/_meta.html.haml
150
- - app/views/admin/shop/categories/edit/_part.html.haml
151
- - app/views/admin/shop/categories/edit/_popup.html.haml
162
+ - app/views/admin/shop/categories/edit/_parts.html.haml
163
+ - app/views/admin/shop/categories/edit/_popups.html.haml
164
+ - app/views/admin/shop/categories/edit/inputs/_name.html.haml
152
165
  - app/views/admin/shop/categories/edit/meta/_handle.html.haml
153
166
  - app/views/admin/shop/categories/edit/meta/_layouts.html.haml
167
+ - app/views/admin/shop/categories/edit/meta/_page.html.haml
154
168
  - app/views/admin/shop/categories/edit/parts/_description.html.haml
155
169
  - app/views/admin/shop/categories/index/_category.html.haml
156
170
  - app/views/admin/shop/categories/new.html.haml
157
171
  - app/views/admin/shop/categories/remove.html.haml
158
172
  - app/views/admin/shop/customers/edit.html.haml
159
- - app/views/admin/shop/customers/edit/_fields.html.haml
173
+ - app/views/admin/shop/customers/edit/_foot.html.haml
174
+ - app/views/admin/shop/customers/edit/_form.html.haml
160
175
  - app/views/admin/shop/customers/edit/_head.html.haml
176
+ - app/views/admin/shop/customers/edit/_inputs.html.haml
161
177
  - app/views/admin/shop/customers/edit/_meta.html.haml
162
178
  - app/views/admin/shop/customers/edit/_parts.html.haml
163
179
  - app/views/admin/shop/customers/edit/_popups.html.haml
180
+ - app/views/admin/shop/customers/edit/inputs/_email.html.haml
181
+ - app/views/admin/shop/customers/edit/inputs/_name.html.haml
164
182
  - app/views/admin/shop/customers/edit/meta/_login.html.haml
165
183
  - app/views/admin/shop/customers/edit/meta/_password.html.haml
166
184
  - app/views/admin/shop/customers/edit/meta/_password_confirmation.html.haml
@@ -168,31 +186,106 @@ files:
168
186
  - app/views/admin/shop/customers/edit/parts/_addresses.html.haml
169
187
  - app/views/admin/shop/customers/edit/parts/_orders.html.haml
170
188
  - app/views/admin/shop/customers/index.html.haml
171
- - app/views/admin/shop/customers/index/_bottom.html.haml
172
189
  - app/views/admin/shop/customers/index/_customer.html.haml
190
+ - app/views/admin/shop/customers/index/_foot.html.haml
191
+ - app/views/admin/shop/customers/index/_head.html.haml
173
192
  - app/views/admin/shop/customers/new.html.haml
174
193
  - app/views/admin/shop/customers/remove.html.haml
194
+ - app/views/admin/shop/orders/edit.html.haml
195
+ - app/views/admin/shop/orders/edit/_foot.html.haml
196
+ - app/views/admin/shop/orders/edit/_form.html.haml
197
+ - app/views/admin/shop/orders/edit/_head.html.haml
198
+ - app/views/admin/shop/orders/edit/_inputs.html.haml
199
+ - app/views/admin/shop/orders/edit/_meta.html.haml
200
+ - app/views/admin/shop/orders/edit/_parts.html.haml
201
+ - app/views/admin/shop/orders/edit/_popups.html.haml
202
+ - app/views/admin/shop/orders/edit/parts/_address.html.haml
203
+ - app/views/admin/shop/orders/edit/parts/_addresses.html.haml
204
+ - app/views/admin/shop/orders/edit/parts/_customer.html.haml
205
+ - app/views/admin/shop/orders/edit/parts/_items.html.haml
175
206
  - app/views/admin/shop/orders/index.html.haml
207
+ - app/views/admin/shop/orders/index/_foot.html.haml
208
+ - app/views/admin/shop/orders/index/_head.html.haml
209
+ - app/views/admin/shop/orders/index/_order.html.haml
210
+ - app/views/admin/shop/orders/index/buttons/_all.html.haml
211
+ - app/views/admin/shop/orders/index/buttons/_new.html.haml
212
+ - app/views/admin/shop/orders/index/buttons/_paid.html.haml
213
+ - app/views/admin/shop/orders/index/buttons/_shipped.html.haml
214
+ - app/views/admin/shop/packages/edit.html.haml
215
+ - app/views/admin/shop/packages/edit/_foot.html.haml
216
+ - app/views/admin/shop/packages/edit/_form.html.haml
217
+ - app/views/admin/shop/packages/edit/_head.html.haml
218
+ - app/views/admin/shop/packages/edit/_inputs.html.haml
219
+ - app/views/admin/shop/packages/edit/_meta.html.haml
220
+ - app/views/admin/shop/packages/edit/_parts.html.haml
221
+ - app/views/admin/shop/packages/edit/_popups.html.haml
222
+ - app/views/admin/shop/packages/edit/buttons/_browse_products.html.haml
223
+ - app/views/admin/shop/packages/edit/inputs/_name.html.haml
224
+ - app/views/admin/shop/packages/edit/inputs/_price.html.haml
225
+ - app/views/admin/shop/packages/edit/meta/_sku.html.haml
226
+ - app/views/admin/shop/packages/edit/parts/_description.html.haml
227
+ - app/views/admin/shop/packages/edit/parts/_products.html.haml
228
+ - app/views/admin/shop/packages/edit/popups/_browse_products.html.haml
229
+ - app/views/admin/shop/packages/edit/shared/_product.html.haml
230
+ - app/views/admin/shop/packages/index.html.haml
231
+ - app/views/admin/shop/packages/index/_foot.html.haml
232
+ - app/views/admin/shop/packages/index/_head.html.haml
233
+ - app/views/admin/shop/packages/index/_package.html.haml
234
+ - app/views/admin/shop/packages/new.html.haml
235
+ - app/views/admin/shop/packages/remove.html.haml
176
236
  - app/views/admin/shop/products/edit.html.haml
177
- - app/views/admin/shop/products/edit/_fields.html.haml
237
+ - app/views/admin/shop/products/edit/_foot.html.haml
238
+ - app/views/admin/shop/products/edit/_form.html.haml
178
239
  - app/views/admin/shop/products/edit/_head.html.haml
179
- - app/views/admin/shop/products/edit/_image.html.haml
240
+ - app/views/admin/shop/products/edit/_inputs.html.haml
180
241
  - app/views/admin/shop/products/edit/_meta.html.haml
181
- - app/views/admin/shop/products/edit/_part.html.haml
182
- - app/views/admin/shop/products/edit/_popup.html.haml
242
+ - app/views/admin/shop/products/edit/_parts.html.haml
243
+ - app/views/admin/shop/products/edit/_popups.html.haml
183
244
  - app/views/admin/shop/products/edit/buttons/_browse_images.html.haml
245
+ - app/views/admin/shop/products/edit/buttons/_browse_templates.html.haml
184
246
  - app/views/admin/shop/products/edit/buttons/_new_image.html.haml
247
+ - app/views/admin/shop/products/edit/buttons/_new_variant.html.haml
248
+ - app/views/admin/shop/products/edit/inputs/_name.html.haml
249
+ - app/views/admin/shop/products/edit/inputs/_price.html.haml
185
250
  - app/views/admin/shop/products/edit/meta/_category.html.haml
251
+ - app/views/admin/shop/products/edit/meta/_page.html.haml
186
252
  - app/views/admin/shop/products/edit/meta/_sku.html.haml
253
+ - app/views/admin/shop/products/edit/parts/_customers.html.haml
187
254
  - app/views/admin/shop/products/edit/parts/_description.html.haml
188
255
  - app/views/admin/shop/products/edit/parts/_images.html.haml
256
+ - app/views/admin/shop/products/edit/parts/_variants.html.haml
189
257
  - app/views/admin/shop/products/edit/popups/_browse_images.html.haml
258
+ - app/views/admin/shop/products/edit/popups/_browse_templates.html.haml
190
259
  - app/views/admin/shop/products/edit/popups/_new_image.html.haml
260
+ - app/views/admin/shop/products/edit/popups/_new_variant.html.haml
261
+ - app/views/admin/shop/products/edit/shared/_image.html.haml
262
+ - app/views/admin/shop/products/edit/shared/_template.html.haml
263
+ - app/views/admin/shop/products/edit/shared/_variant.html.haml
191
264
  - app/views/admin/shop/products/index.html.haml
192
- - app/views/admin/shop/products/index/_bottom.html.haml
265
+ - app/views/admin/shop/products/index/_foot.html.haml
266
+ - app/views/admin/shop/products/index/_head.html.haml
193
267
  - app/views/admin/shop/products/index/_product.html.haml
268
+ - app/views/admin/shop/products/index/buttons/_discounts.html.haml
269
+ - app/views/admin/shop/products/index/buttons/_packages.html.haml
270
+ - app/views/admin/shop/products/index/buttons/_variants.html.haml
194
271
  - app/views/admin/shop/products/new.html.haml
195
272
  - app/views/admin/shop/products/remove.html.haml
273
+ - app/views/admin/shop/variants/edit.html.haml
274
+ - app/views/admin/shop/variants/edit/_foot.html.haml
275
+ - app/views/admin/shop/variants/edit/_form.html.haml
276
+ - app/views/admin/shop/variants/edit/_head.html.haml
277
+ - app/views/admin/shop/variants/edit/_inputs.html.haml
278
+ - app/views/admin/shop/variants/edit/_meta.html.haml
279
+ - app/views/admin/shop/variants/edit/_parts.html.haml
280
+ - app/views/admin/shop/variants/edit/_popups.html.haml
281
+ - app/views/admin/shop/variants/edit/inputs/_name.html.haml
282
+ - app/views/admin/shop/variants/edit/inputs/_options.html.haml
283
+ - app/views/admin/shop/variants/index.html.haml
284
+ - app/views/admin/shop/variants/index/_foot.html.haml
285
+ - app/views/admin/shop/variants/index/_head.html.haml
286
+ - app/views/admin/shop/variants/index/_variant.html.haml
287
+ - app/views/admin/shop/variants/new.html.haml
288
+ - app/views/admin/shop/variants/remove.html.haml
196
289
  - app/views/shop/categories/show.html.haml
197
290
  - app/views/shop/orders/show.html.haml
198
291
  - app/views/shop/products/index.html.haml
@@ -205,6 +298,18 @@ files:
205
298
  - db/migrate/20100927041219_remove_payment_methods.rb
206
299
  - db/migrate/20100927041624_change_payments_add_gateway.rb
207
300
  - db/migrate/20100927140446_change_payment_add_card_type_card_number.rb
301
+ - db/migrate/20100929011106_fix_relationship_foreign_keys.rb
302
+ - db/migrate/20100929011607_drop_shop_addressables.rb
303
+ - db/migrate/20100929030510_create_shop_groups.rb
304
+ - db/migrate/20100929080301_shop_groups_change_add_description.rb
305
+ - db/migrate/20100929081200_create_variants.rb
306
+ - db/migrate/20100929143531_change_variants_add_updated_by.rb
307
+ - db/migrate/20100929145641_change_created_by_to_id.rb
308
+ - db/migrate/20100929235221_change_category_add_variant_id.rb
309
+ - db/migrate/20100930235221_create_packages.rb
310
+ - db/migrate/20101005231713_create_page_ids.rb
311
+ - db/migrate/20101006051214_create_pages_for_products_and_categories.rb
312
+ - db/migrate/20101007111845_add_default_position_to_attachment.rb
208
313
  - db/seed.rb
209
314
  - db/seeds/forms.rb
210
315
  - db/seeds/layouts.rb
@@ -213,8 +318,13 @@ files:
213
318
  - features/support/paths.rb
214
319
  - lib/shop/controllers/application_controller.rb
215
320
  - lib/shop/controllers/site_controller.rb
321
+ - lib/shop/interface/categories.rb
216
322
  - lib/shop/interface/customers.rb
323
+ - lib/shop/interface/orders.rb
324
+ - lib/shop/interface/packages.rb
217
325
  - lib/shop/interface/products.rb
326
+ - lib/shop/interface/variants.rb
327
+ - lib/shop/models/form_extension.rb
218
328
  - lib/shop/models/image.rb
219
329
  - lib/shop/models/page.rb
220
330
  - lib/shop/tags/address.rb
@@ -224,36 +334,50 @@ files:
224
334
  - lib/shop/tags/core.rb
225
335
  - lib/shop/tags/helpers.rb
226
336
  - lib/shop/tags/item.rb
337
+ - lib/shop/tags/package.rb
227
338
  - lib/shop/tags/product.rb
339
+ - lib/shop/tags/product_variant.rb
228
340
  - lib/shop/tags/responses.rb
229
341
  - lib/tasks/shop_extension_tasks.rake
230
342
  - mockups/balsamiq/products-retro_fun_tshirt-more.bmml
231
343
  - mockups/balsamiq/products-retro_fun_tshirt.bmml
344
+ - mockups/discounts/new-edit.bmml
232
345
  - public/images/admin/extensions/shop/products/sort.png
346
+ - public/javascripts/admin/extensions/shop/edit.js
347
+ - public/javascripts/admin/extensions/shop/packages/edit.js
233
348
  - public/javascripts/admin/extensions/shop/products/edit.js
234
349
  - public/javascripts/admin/extensions/shop/products/index.js
235
350
  - public/stylesheets/sass/admin/extensions/shop/edit.sass
236
351
  - public/stylesheets/sass/admin/extensions/shop/index.sass
352
+ - public/stylesheets/sass/admin/extensions/shop/packages/edit.sass
237
353
  - public/stylesheets/sass/admin/extensions/shop/products/edit.sass
238
354
  - public/stylesheets/sass/admin/extensions/shop/products/index.sass
239
355
  - radiant-shop-extension.gemspec
240
356
  - shop_extension.rb
241
357
  - spec/controllers/admin/shop/categories_controller_spec.rb
358
+ - spec/controllers/admin/shop/customers_controller_spec.rb
359
+ - spec/controllers/admin/shop/orders_controller_spec.rb
360
+ - spec/controllers/admin/shop/packages/packings_controller_spec.rb
361
+ - spec/controllers/admin/shop/packages_controller_spec.rb
242
362
  - spec/controllers/admin/shop/products/images_controller_spec.rb
363
+ - spec/controllers/admin/shop/products/variant_templates_controller_spec.rb
364
+ - spec/controllers/admin/shop/products/variants_controller_spec.rb
243
365
  - spec/controllers/admin/shop/products_controller_spec.rb
366
+ - spec/controllers/admin/shop/variants_controller_spec.rb
244
367
  - spec/controllers/admin/shops_controller_spec.rb
245
- - spec/controllers/shop/categories_controller_spec.rb
246
- - spec/controllers/shop/line_items_controller_spec.rb
247
- - spec/controllers/shop/orders_controller_specs.rb
248
- - spec/controllers/shop/products_controller_spec.rb
249
368
  - spec/datasets/forms.rb
250
- - spec/datasets/images.rb
251
369
  - spec/datasets/shop_addresses.rb
252
370
  - spec/datasets/shop_categories.rb
253
371
  - spec/datasets/shop_customers.rb
372
+ - spec/datasets/shop_groups.rb
254
373
  - spec/datasets/shop_line_items.rb
255
374
  - spec/datasets/shop_orders.rb
375
+ - spec/datasets/shop_packages.rb
376
+ - spec/datasets/shop_payments.rb
377
+ - spec/datasets/shop_product_attachments.rb
378
+ - spec/datasets/shop_product_variants.rb
256
379
  - spec/datasets/shop_products.rb
380
+ - spec/datasets/shop_variants.rb
257
381
  - spec/helpers/nested_tag_helper.rb
258
382
  - spec/lib/shop/models/image_spec.rb
259
383
  - spec/lib/shop/models/page_spec.rb
@@ -264,34 +388,35 @@ files:
264
388
  - spec/lib/shop/tags/core_spec.rb
265
389
  - spec/lib/shop/tags/helpers_spec.rb
266
390
  - spec/lib/shop/tags/item_spec.rb
391
+ - spec/lib/shop/tags/package_spec.rb
267
392
  - spec/lib/shop/tags/product_spec.rb
393
+ - spec/lib/shop/tags/product_variant_spec.rb
268
394
  - spec/lib/shop/tags/responses_spec.rb
269
395
  - spec/matchers/comparison.rb
270
396
  - spec/matchers/render_matcher.rb
397
+ - spec/models/form_address_spec.rb
271
398
  - spec/models/form_checkout_spec.rb
399
+ - spec/models/shop_address_spec.rb
272
400
  - spec/models/shop_category_page_spec.rb
273
401
  - spec/models/shop_category_spec.rb
402
+ - spec/models/shop_customer_spec.rb
403
+ - spec/models/shop_group_spec.rb
274
404
  - spec/models/shop_line_item_spec.rb
275
405
  - spec/models/shop_order_spec.rb
406
+ - spec/models/shop_package_spec.rb
407
+ - spec/models/shop_packing_spec.rb
408
+ - spec/models/shop_payment_spec.rb
276
409
  - spec/models/shop_product_attachment_spec.rb
277
410
  - spec/models/shop_product_page_spec.rb
278
411
  - spec/models/shop_product_spec.rb
412
+ - spec/models/shop_product_variant_spec.rb
413
+ - spec/models/shop_variant_spec.rb
279
414
  - spec/spec.opts
280
415
  - spec/spec_helper.rb
281
416
  - vendor/plugins/acts_as_list/README
282
417
  - vendor/plugins/acts_as_list/init.rb
283
418
  - vendor/plugins/acts_as_list/lib/active_record/acts/list.rb
284
419
  - vendor/plugins/acts_as_list/test/list_test.rb
285
- - vendor/plugins/json_fields/.gitignore
286
- - vendor/plugins/json_fields/MIT-LICENSE
287
- - vendor/plugins/json_fields/README.rdoc
288
- - vendor/plugins/json_fields/Rakefile
289
- - vendor/plugins/json_fields/init.rb
290
- - vendor/plugins/json_fields/lib/json_fields.rb
291
- - vendor/plugins/json_fields/spec/lib/json_fields_spec.rb
292
- - vendor/plugins/json_fields/spec/spec.opts
293
- - vendor/plugins/json_fields/spec/spec_helper.rb
294
- - vendor/plugins/json_fields/spec/test_models.rb
295
420
  has_rdoc: true
296
421
  homepage: http://github.com/squaretalent/radiant-shop-extension
297
422
  licenses: []
@@ -328,21 +453,29 @@ specification_version: 3
328
453
  summary: Shop Extension for Radiant CMS
329
454
  test_files:
330
455
  - spec/controllers/admin/shop/categories_controller_spec.rb
456
+ - spec/controllers/admin/shop/customers_controller_spec.rb
457
+ - spec/controllers/admin/shop/orders_controller_spec.rb
458
+ - spec/controllers/admin/shop/packages/packings_controller_spec.rb
459
+ - spec/controllers/admin/shop/packages_controller_spec.rb
331
460
  - spec/controllers/admin/shop/products/images_controller_spec.rb
461
+ - spec/controllers/admin/shop/products/variant_templates_controller_spec.rb
462
+ - spec/controllers/admin/shop/products/variants_controller_spec.rb
332
463
  - spec/controllers/admin/shop/products_controller_spec.rb
464
+ - spec/controllers/admin/shop/variants_controller_spec.rb
333
465
  - spec/controllers/admin/shops_controller_spec.rb
334
- - spec/controllers/shop/categories_controller_spec.rb
335
- - spec/controllers/shop/line_items_controller_spec.rb
336
- - spec/controllers/shop/orders_controller_specs.rb
337
- - spec/controllers/shop/products_controller_spec.rb
338
466
  - spec/datasets/forms.rb
339
- - spec/datasets/images.rb
340
467
  - spec/datasets/shop_addresses.rb
341
468
  - spec/datasets/shop_categories.rb
342
469
  - spec/datasets/shop_customers.rb
470
+ - spec/datasets/shop_groups.rb
343
471
  - spec/datasets/shop_line_items.rb
344
472
  - spec/datasets/shop_orders.rb
473
+ - spec/datasets/shop_packages.rb
474
+ - spec/datasets/shop_payments.rb
475
+ - spec/datasets/shop_product_attachments.rb
476
+ - spec/datasets/shop_product_variants.rb
345
477
  - spec/datasets/shop_products.rb
478
+ - spec/datasets/shop_variants.rb
346
479
  - spec/helpers/nested_tag_helper.rb
347
480
  - spec/lib/shop/models/image_spec.rb
348
481
  - spec/lib/shop/models/page_spec.rb
@@ -353,16 +486,27 @@ test_files:
353
486
  - spec/lib/shop/tags/core_spec.rb
354
487
  - spec/lib/shop/tags/helpers_spec.rb
355
488
  - spec/lib/shop/tags/item_spec.rb
489
+ - spec/lib/shop/tags/package_spec.rb
356
490
  - spec/lib/shop/tags/product_spec.rb
491
+ - spec/lib/shop/tags/product_variant_spec.rb
357
492
  - spec/lib/shop/tags/responses_spec.rb
358
493
  - spec/matchers/comparison.rb
359
494
  - spec/matchers/render_matcher.rb
495
+ - spec/models/form_address_spec.rb
360
496
  - spec/models/form_checkout_spec.rb
497
+ - spec/models/shop_address_spec.rb
361
498
  - spec/models/shop_category_page_spec.rb
362
499
  - spec/models/shop_category_spec.rb
500
+ - spec/models/shop_customer_spec.rb
501
+ - spec/models/shop_group_spec.rb
363
502
  - spec/models/shop_line_item_spec.rb
364
503
  - spec/models/shop_order_spec.rb
504
+ - spec/models/shop_package_spec.rb
505
+ - spec/models/shop_packing_spec.rb
506
+ - spec/models/shop_payment_spec.rb
365
507
  - spec/models/shop_product_attachment_spec.rb
366
508
  - spec/models/shop_product_page_spec.rb
367
509
  - spec/models/shop_product_spec.rb
510
+ - spec/models/shop_product_variant_spec.rb
511
+ - spec/models/shop_variant_spec.rb
368
512
  - spec/spec_helper.rb