spree_backend 3.1.14 → 3.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/admin/logo.png +0 -0
  3. data/app/assets/javascripts/spree/backend/admin.js +2 -25
  4. data/app/assets/javascripts/spree/backend/checkouts/edit.js +2 -1
  5. data/app/assets/javascripts/spree/backend/line_items.js.coffee +2 -2
  6. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +5 -2
  7. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +2 -2
  8. data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -2
  9. data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +10 -8
  10. data/app/assets/javascripts/spree/backend/product_picker.js +3 -2
  11. data/app/assets/javascripts/spree/backend/{shipments.js.erb → shipments.js} +1 -1
  12. data/app/assets/javascripts/spree/backend/states.js +9 -7
  13. data/app/assets/javascripts/spree/backend/stock_location.js +3 -0
  14. data/app/assets/javascripts/spree/backend/tag_picker.js +52 -0
  15. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +2 -2
  16. data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +12 -0
  17. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +2 -2
  18. data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
  19. data/app/assets/javascripts/spree/backend/user_picker.js +4 -3
  20. data/app/assets/javascripts/spree/backend.js +8 -7
  21. data/app/assets/stylesheets/spree/backend/components/_main.scss +5 -1
  22. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +7 -0
  23. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
  24. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +0 -1
  25. data/app/controllers/spree/admin/base_controller.rb +0 -11
  26. data/app/controllers/spree/admin/option_types_controller.rb +2 -14
  27. data/app/controllers/spree/admin/option_values_controller.rb +1 -1
  28. data/app/controllers/spree/admin/orders_controller.rb +7 -7
  29. data/app/controllers/spree/admin/payment_methods_controller.rb +4 -0
  30. data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
  31. data/app/controllers/spree/admin/products_controller.rb +1 -1
  32. data/app/controllers/spree/admin/promotion_actions_controller.rb +5 -5
  33. data/app/controllers/spree/admin/promotion_rules_controller.rb +6 -6
  34. data/app/controllers/spree/admin/promotions_controller.rb +2 -2
  35. data/app/controllers/spree/admin/properties_controller.rb +1 -1
  36. data/app/controllers/spree/admin/prototypes_controller.rb +2 -2
  37. data/app/controllers/spree/admin/refunds_controller.rb +1 -1
  38. data/app/controllers/spree/admin/reimbursement_types_controller.rb +26 -0
  39. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  40. data/app/controllers/spree/admin/reports_controller.rb +1 -1
  41. data/app/controllers/spree/admin/resource_controller.rb +8 -8
  42. data/app/controllers/spree/admin/return_authorizations_controller.rb +3 -3
  43. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  44. data/app/controllers/spree/admin/shipping_methods_controller.rb +2 -2
  45. data/app/controllers/spree/admin/states_controller.rb +1 -1
  46. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  47. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -5
  48. data/app/controllers/spree/admin/store_credits_controller.rb +1 -1
  49. data/app/controllers/spree/admin/taxons_controller.rb +1 -10
  50. data/app/controllers/spree/admin/users_controller.rb +5 -41
  51. data/app/controllers/spree/admin/variants_controller.rb +3 -1
  52. data/app/helpers/spree/admin/base_helper.rb +1 -6
  53. data/app/helpers/spree/admin/navigation_helper.rb +9 -31
  54. data/app/helpers/spree/admin/promotion_rules_helper.rb +12 -0
  55. data/app/views/kaminari/_first_page.html.erb +1 -1
  56. data/app/views/kaminari/_last_page.html.erb +1 -1
  57. data/app/views/kaminari/_next_page.html.erb +1 -1
  58. data/app/views/kaminari/_page.html.erb +1 -1
  59. data/app/views/kaminari/_paginator.html.erb +2 -4
  60. data/app/views/kaminari/_prev_page.html.erb +1 -1
  61. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
  62. data/app/views/spree/admin/adjustments/_form.html.erb +4 -4
  63. data/app/views/spree/admin/countries/_form.html.erb +2 -2
  64. data/app/views/spree/admin/countries/edit.html.erb +3 -3
  65. data/app/views/spree/admin/countries/index.html.erb +3 -3
  66. data/app/views/spree/admin/countries/new.html.erb +3 -3
  67. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  68. data/app/views/spree/admin/images/_form.html.erb +2 -2
  69. data/app/views/spree/admin/option_types/_form.html.erb +2 -2
  70. data/app/views/spree/admin/option_types/edit.html.erb +5 -5
  71. data/app/views/spree/admin/option_types/new.html.erb +3 -3
  72. data/app/views/spree/admin/orders/_adjustments.html.erb +6 -4
  73. data/app/views/spree/admin/orders/_form.html.erb +1 -1
  74. data/app/views/spree/admin/orders/_line_items.html.erb +8 -6
  75. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
  76. data/app/views/spree/admin/orders/_shipment.html.erb +9 -7
  77. data/app/views/spree/admin/orders/cart.html.erb +0 -4
  78. data/app/views/spree/admin/orders/edit.html.erb +0 -4
  79. data/app/views/spree/admin/orders/index.html.erb +20 -20
  80. data/app/views/spree/admin/payment_methods/_form.html.erb +5 -5
  81. data/app/views/spree/admin/payment_methods/index.html.erb +3 -3
  82. data/app/views/spree/admin/payments/_form.html.erb +6 -6
  83. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +6 -6
  84. data/app/views/spree/admin/products/_form.html.erb +14 -8
  85. data/app/views/spree/admin/products/_properties_form.erb +1 -1
  86. data/app/views/spree/admin/products/index.html.erb +6 -6
  87. data/app/views/spree/admin/products/new.html.erb +16 -16
  88. data/app/views/spree/admin/promotion_categories/_form.html.erb +3 -3
  89. data/app/views/spree/admin/promotion_categories/edit.html.erb +3 -3
  90. data/app/views/spree/admin/promotion_categories/index.html.erb +3 -3
  91. data/app/views/spree/admin/promotion_categories/new.html.erb +3 -3
  92. data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
  93. data/app/views/spree/admin/promotions/_form.html.erb +10 -10
  94. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
  95. data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
  96. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +1 -1
  97. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -2
  98. data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +1 -1
  99. data/app/views/spree/admin/promotions/edit.html.erb +6 -6
  100. data/app/views/spree/admin/promotions/index.html.erb +5 -5
  101. data/app/views/spree/admin/promotions/new.html.erb +3 -3
  102. data/app/views/spree/admin/promotions/rules/_country.html.erb +6 -0
  103. data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +1 -1
  104. data/app/views/spree/admin/promotions/rules/_product.html.erb +2 -2
  105. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +2 -2
  106. data/app/views/spree/admin/properties/_form.html.erb +2 -2
  107. data/app/views/spree/admin/properties/edit.html.erb +3 -3
  108. data/app/views/spree/admin/properties/index.html.erb +6 -6
  109. data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
  110. data/app/views/spree/admin/prototypes/available.js.erb +1 -1
  111. data/app/views/spree/admin/prototypes/edit.html.erb +3 -3
  112. data/app/views/spree/admin/prototypes/index.html.erb +3 -3
  113. data/app/views/spree/admin/prototypes/new.html.erb +3 -3
  114. data/app/views/spree/admin/prototypes/show.html.erb +1 -1
  115. data/app/views/spree/admin/refunds/edit.html.erb +2 -0
  116. data/app/views/spree/admin/refunds/new.html.erb +2 -0
  117. data/app/views/spree/admin/reimbursement_types/_form.html.erb +32 -0
  118. data/app/views/spree/admin/reimbursement_types/edit.html.erb +11 -0
  119. data/app/views/spree/admin/reimbursement_types/index.html.erb +9 -0
  120. data/app/views/spree/admin/reimbursement_types/new.html.erb +11 -0
  121. data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
  122. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  123. data/app/views/spree/admin/return_authorizations/_form.html.erb +4 -4
  124. data/app/views/spree/admin/return_index/customer_returns.html.erb +1 -2
  125. data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
  126. data/app/views/spree/admin/roles/edit.html.erb +1 -1
  127. data/app/views/spree/admin/roles/new.html.erb +1 -1
  128. data/app/views/spree/admin/shared/_calculator_fields.html.erb +2 -2
  129. data/app/views/spree/admin/shared/_destroy.js.erb +1 -1
  130. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
  131. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  132. data/app/views/spree/admin/shared/_header.html.erb +4 -11
  133. data/app/views/spree/admin/shared/_index_table_options.html.erb +1 -1
  134. data/app/views/spree/admin/shared/_main_menu.html.erb +6 -0
  135. data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
  136. data/app/views/spree/admin/shared/_order_summary.html.erb +3 -3
  137. data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
  138. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +3 -3
  139. data/app/views/spree/admin/shared/_translations.html.erb +38 -38
  140. data/app/views/spree/admin/shared/{_update_order_state.js → _update_order_state.js.erb} +3 -3
  141. data/app/views/spree/admin/shared/named_types/_index.html.erb +2 -2
  142. data/app/views/spree/admin/shipping_categories/edit.html.erb +3 -3
  143. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -3
  144. data/app/views/spree/admin/shipping_categories/new.html.erb +3 -3
  145. data/app/views/spree/admin/shipping_methods/_form.html.erb +14 -14
  146. data/app/views/spree/admin/shipping_methods/edit.html.erb +3 -3
  147. data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
  148. data/app/views/spree/admin/shipping_methods/new.html.erb +3 -3
  149. data/app/views/spree/admin/states/_form.html.erb +2 -2
  150. data/app/views/spree/admin/states/_state_list.html.erb +2 -2
  151. data/app/views/spree/admin/states/edit.html.erb +3 -3
  152. data/app/views/spree/admin/states/index.html.erb +3 -3
  153. data/app/views/spree/admin/states/new.html.erb +3 -3
  154. data/app/views/spree/admin/stock_locations/_form.html.erb +0 -8
  155. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +1 -1
  156. data/app/views/spree/admin/stock_locations/edit.html.erb +3 -3
  157. data/app/views/spree/admin/stock_locations/index.html.erb +4 -4
  158. data/app/views/spree/admin/stock_locations/new.html.erb +3 -3
  159. data/app/views/spree/admin/stock_transfers/index.html.erb +3 -3
  160. data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
  161. data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
  162. data/app/views/spree/admin/tax_categories/_form.html.erb +7 -7
  163. data/app/views/spree/admin/tax_categories/edit.html.erb +3 -3
  164. data/app/views/spree/admin/tax_categories/new.html.erb +3 -3
  165. data/app/views/spree/admin/tax_rates/_form.html.erb +5 -5
  166. data/app/views/spree/admin/tax_rates/edit.html.erb +3 -3
  167. data/app/views/spree/admin/tax_rates/new.html.erb +3 -3
  168. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  169. data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -5
  170. data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
  171. data/app/views/spree/admin/taxons/_form.html.erb +7 -7
  172. data/app/views/spree/admin/taxons/_taxon_table.html.erb +1 -1
  173. data/app/views/spree/admin/taxons/edit.html.erb +0 -15
  174. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  175. data/app/views/spree/admin/trackers/_form.html.erb +1 -1
  176. data/app/views/spree/admin/trackers/edit.html.erb +3 -3
  177. data/app/views/spree/admin/trackers/index.html.erb +3 -3
  178. data/app/views/spree/admin/trackers/new.html.erb +3 -3
  179. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -2
  180. data/app/views/spree/admin/users/_form.html.erb +3 -3
  181. data/app/views/spree/admin/users/index.html.erb +7 -7
  182. data/app/views/spree/admin/users/items.html.erb +2 -2
  183. data/app/views/spree/admin/users/new.html.erb +3 -3
  184. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +24 -7
  185. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -0
  186. data/app/views/spree/admin/variants/_form.html.erb +7 -7
  187. data/app/views/spree/admin/variants/new.html.erb +3 -3
  188. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  189. data/app/views/spree/admin/zones/_form.html.erb +6 -6
  190. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  191. data/app/views/spree/admin/zones/edit.html.erb +3 -3
  192. data/app/views/spree/admin/zones/index.html.erb +5 -5
  193. data/app/views/spree/admin/zones/new.html.erb +3 -3
  194. data/config/routes.rb +4 -12
  195. data/lib/spree/backend/engine.rb +2 -6
  196. data/spec/controllers/spree/admin/base_controller_spec.rb +46 -0
  197. data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +185 -0
  198. data/spec/controllers/spree/admin/general_settings_controller_spec.rb +41 -0
  199. data/spec/controllers/spree/admin/missing_products_controller_spec.rb +18 -0
  200. data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +197 -0
  201. data/spec/controllers/spree/admin/orders_controller_spec.rb +296 -0
  202. data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +49 -0
  203. data/spec/controllers/spree/admin/payments_controller_spec.rb +97 -0
  204. data/spec/controllers/spree/admin/products_controller_spec.rb +99 -0
  205. data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +21 -0
  206. data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +21 -0
  207. data/spec/controllers/spree/admin/promotions_controller_spec.rb +44 -0
  208. data/spec/controllers/spree/admin/refunds_controller_spec.rb +32 -0
  209. data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +74 -0
  210. data/spec/controllers/spree/admin/reports_controller_spec.rb +42 -0
  211. data/spec/controllers/spree/admin/resource_controller_spec.rb +252 -0
  212. data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +225 -0
  213. data/spec/controllers/spree/admin/return_index_controller_spec.rb +37 -0
  214. data/spec/controllers/spree/admin/return_items_controller_spec.rb +27 -0
  215. data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +14 -0
  216. data/spec/controllers/spree/admin/stock_items_controller_spec.rb +19 -0
  217. data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +41 -0
  218. data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +41 -0
  219. data/spec/controllers/spree/admin/tax_categories_controller_spec.rb +34 -0
  220. data/spec/controllers/spree/admin/users_controller_spec.rb +161 -0
  221. data/spec/controllers/spree/admin/variants_controller_spec.rb +32 -0
  222. data/spec/features/admin/configuration/analytics_tracker_spec.rb +47 -0
  223. data/spec/features/admin/configuration/countries_spec.rb +24 -0
  224. data/spec/features/admin/configuration/general_settings_spec.rb +44 -0
  225. data/spec/features/admin/configuration/payment_methods_spec.rb +63 -0
  226. data/spec/features/admin/configuration/roles_spec.rb +47 -0
  227. data/spec/features/admin/configuration/shipping_methods_spec.rb +62 -0
  228. data/spec/features/admin/configuration/states_spec.rb +68 -0
  229. data/spec/features/admin/configuration/stock_locations_spec.rb +48 -0
  230. data/spec/features/admin/configuration/store_credit_categories_spec.rb +50 -0
  231. data/spec/features/admin/configuration/tax_categories_spec.rb +56 -0
  232. data/spec/features/admin/configuration/tax_rates_spec.rb +18 -0
  233. data/spec/features/admin/configuration/zones_spec.rb +39 -0
  234. data/spec/features/admin/homepage_spec.rb +89 -0
  235. data/spec/features/admin/locale_spec.rb +31 -0
  236. data/spec/features/admin/orders/adjustments_promotions_spec.rb +53 -0
  237. data/spec/features/admin/orders/adjustments_spec.rb +129 -0
  238. data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +47 -0
  239. data/spec/features/admin/orders/customer_details_spec.rb +154 -0
  240. data/spec/features/admin/orders/line_items_spec.rb +51 -0
  241. data/spec/features/admin/orders/listing_spec.rb +224 -0
  242. data/spec/features/admin/orders/log_entries_spec.rb +55 -0
  243. data/spec/features/admin/orders/new_order_spec.rb +186 -0
  244. data/spec/features/admin/orders/order_details_spec.rb +662 -0
  245. data/spec/features/admin/orders/payments_spec.rb +231 -0
  246. data/spec/features/admin/orders/risk_analysis_spec.rb +48 -0
  247. data/spec/features/admin/orders/shipments_spec.rb +64 -0
  248. data/spec/features/admin/orders/state_changes_spec.rb +21 -0
  249. data/spec/features/admin/products/edit/images_spec.rb +86 -0
  250. data/spec/features/admin/products/edit/products_spec.rb +64 -0
  251. data/spec/features/admin/products/edit/taxons_spec.rb +41 -0
  252. data/spec/features/admin/products/edit/variants_spec.rb +56 -0
  253. data/spec/features/admin/products/option_types_spec.rb +114 -0
  254. data/spec/features/admin/products/products_spec.rb +445 -0
  255. data/spec/features/admin/products/properties_spec.rb +147 -0
  256. data/spec/features/admin/products/prototypes_spec.rb +112 -0
  257. data/spec/features/admin/products/stock_management_spec.rb +124 -0
  258. data/spec/features/admin/products/taxonomies_spec.rb +52 -0
  259. data/spec/features/admin/products/variant_spec.rb +50 -0
  260. data/spec/features/admin/promotions/adjustments_spec.rb +259 -0
  261. data/spec/features/admin/promotions/option_value_rule_spec.rb +70 -0
  262. data/spec/features/admin/promotions/tiered_calculator_spec.rb +70 -0
  263. data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +57 -0
  264. data/spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb +36 -0
  265. data/spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb +62 -0
  266. data/spec/features/admin/reports_spec.rb +61 -0
  267. data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +63 -0
  268. data/spec/features/admin/returns/customer_returns_spec.rb +80 -0
  269. data/spec/features/admin/returns/return_authorizations_spec.rb +152 -0
  270. data/spec/features/admin/stock_transfer_spec.rb +75 -0
  271. data/spec/features/admin/store_credits_spec.rb +93 -0
  272. data/spec/features/admin/taxons_spec.rb +47 -0
  273. data/spec/features/admin/users_spec.rb +286 -0
  274. data/spec/helpers/admin/base_helper_spec.rb +30 -0
  275. data/spec/helpers/admin/navigation_helper_spec.rb +111 -0
  276. data/spec/helpers/admin/promotion_rules_helper_spec.rb +12 -0
  277. data/spec/helpers/admin/stock_movements_helper_spec.rb +30 -0
  278. data/spec/models/spree/resource_spec.rb +48 -0
  279. data/spec/routing/admin_path_spec.rb +22 -0
  280. data/spec/spec_helper.rb +144 -0
  281. data/spec/support/appear_before_matcher.rb +8 -0
  282. data/spec/support/ror_ringer.jpeg +0 -0
  283. data/spec/test_views/spree/admin/submodule/posts/edit.html.erb +1 -0
  284. data/spec/test_views/spree/admin/submodule/posts/new.html.erb +1 -0
  285. data/spec/test_views/spree/admin/widgets/edit.html.erb +1 -0
  286. data/spec/test_views/spree/admin/widgets/new.html.erb +1 -0
  287. data/spree_backend.gemspec +4 -3
  288. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +130 -154
  289. metadata +114 -34
  290. data/app/assets/images/admin/payment_banner.png +0 -0
  291. data/app/assets/images/admin/progress.gif +0 -0
  292. data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
  293. data/app/assets/javascripts/spree/backend/orders/edit_form.js +0 -21
  294. data/app/assets/stylesheets/spree/backend/components/_variables.scss +0 -12
  295. data/app/assets/stylesheets/spree/backend/plugins/_js_tree.scss +0 -0
  296. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -5
  297. data/app/controllers/spree/admin/root_controller.rb +0 -18
  298. data/app/controllers/spree/admin/search_controller.rb +0 -41
  299. data/app/helpers/spree/admin/inventory_settings_helper.rb +0 -9
  300. data/app/helpers/spree/admin/products_helper.rb +0 -29
  301. data/app/helpers/spree/admin/tables_helper.rb +0 -15
  302. data/app/helpers/spree/promotion_rules_helper.rb +0 -13
  303. data/app/views/spree/admin/inventory_units/adjust.html.erb +0 -29
  304. data/app/views/spree/admin/orders/_line_item.html.erb +0 -21
  305. data/app/views/spree/admin/refund_reasons/destroy.js.erb +0 -1
  306. data/app/views/spree/admin/return_authorization_reasons/destroy.js.erb +0 -1
  307. data/app/views/spree/admin/search/products.rabl +0 -9
  308. data/app/views/spree/admin/search/users.rabl +0 -30
  309. data/app/views/spree/admin/stock_movements/edit.html.erb +0 -17
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.14
4
+ version: 3.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.14
19
+ version: 3.2.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.1.14
26
+ version: 3.2.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.14
33
+ version: 3.2.0.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.1.14
40
+ version: 3.2.0.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootstrap-sass
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -102,8 +102,7 @@ extra_rdoc_files: []
102
102
  files:
103
103
  - Gemfile
104
104
  - Rakefile
105
- - app/assets/images/admin/payment_banner.png
106
- - app/assets/images/admin/progress.gif
105
+ - app/assets/images/admin/logo.png
107
106
  - app/assets/images/credit_cards/credit_card.gif
108
107
  - app/assets/javascripts/spree/backend.js
109
108
  - app/assets/javascripts/spree/backend/address_states.js
@@ -116,11 +115,9 @@ files:
116
115
  - app/assets/javascripts/spree/backend/handlebar_extensions.js
117
116
  - app/assets/javascripts/spree/backend/line_items.js.coffee
118
117
  - app/assets/javascripts/spree/backend/line_items_on_order_edit.js
119
- - app/assets/javascripts/spree/backend/nested-attribute.js
120
118
  - app/assets/javascripts/spree/backend/option_type_autocomplete.js
121
119
  - app/assets/javascripts/spree/backend/option_value_picker.js
122
120
  - app/assets/javascripts/spree/backend/orders/edit.js
123
- - app/assets/javascripts/spree/backend/orders/edit_form.js
124
121
  - app/assets/javascripts/spree/backend/payments/edit.js.coffee
125
122
  - app/assets/javascripts/spree/backend/payments/new.js
126
123
  - app/assets/javascripts/spree/backend/product_picker.js
@@ -128,13 +125,16 @@ files:
128
125
  - app/assets/javascripts/spree/backend/promotions.js
129
126
  - app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.coffee
130
127
  - app/assets/javascripts/spree/backend/returns/return_item_selection.js
131
- - app/assets/javascripts/spree/backend/shipments.js.erb
128
+ - app/assets/javascripts/spree/backend/shipments.js
132
129
  - app/assets/javascripts/spree/backend/spree-select2.js
133
130
  - app/assets/javascripts/spree/backend/states.js
131
+ - app/assets/javascripts/spree/backend/stock_location.js
134
132
  - app/assets/javascripts/spree/backend/stock_management.js.coffee
135
133
  - app/assets/javascripts/spree/backend/stock_movement.js.coffee
136
134
  - app/assets/javascripts/spree/backend/stock_transfer.js.coffee
135
+ - app/assets/javascripts/spree/backend/tag_picker.js
137
136
  - app/assets/javascripts/spree/backend/taxon_autocomplete.js
137
+ - app/assets/javascripts/spree/backend/taxon_permalink_preview.js
138
138
  - app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee
139
139
  - app/assets/javascripts/spree/backend/taxonomy.js.coffee
140
140
  - app/assets/javascripts/spree/backend/taxons.js.coffee
@@ -157,16 +157,13 @@ files:
157
157
  - app/assets/stylesheets/spree/backend/components/_spinner.scss
158
158
  - app/assets/stylesheets/spree/backend/components/_tables.scss
159
159
  - app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss
160
- - app/assets/stylesheets/spree/backend/components/_variables.scss
161
160
  - app/assets/stylesheets/spree/backend/components/_wells.scss
162
161
  - app/assets/stylesheets/spree/backend/global/_variables.scss
163
162
  - app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss
164
- - app/assets/stylesheets/spree/backend/plugins/_js_tree.scss
165
163
  - app/assets/stylesheets/spree/backend/plugins/_select2.scss
166
164
  - app/assets/stylesheets/spree/backend/sections/_account.scss
167
165
  - app/assets/stylesheets/spree/backend/shared/_base.scss
168
166
  - app/assets/stylesheets/spree/backend/shared/_forms.scss
169
- - app/assets/stylesheets/spree/backend/shared/_typography.scss
170
167
  - app/assets/stylesheets/spree/backend/spree_admin.css.scss
171
168
  - app/assets/stylesheets/spree/frontend/backend.css
172
169
  - app/controllers/spree/admin/adjustments_controller.rb
@@ -201,8 +198,6 @@ files:
201
198
  - app/controllers/spree/admin/return_index_controller.rb
202
199
  - app/controllers/spree/admin/return_items_controller.rb
203
200
  - app/controllers/spree/admin/roles_controller.rb
204
- - app/controllers/spree/admin/root_controller.rb
205
- - app/controllers/spree/admin/search_controller.rb
206
201
  - app/controllers/spree/admin/shipping_categories_controller.rb
207
202
  - app/controllers/spree/admin/shipping_methods_controller.rb
208
203
  - app/controllers/spree/admin/state_changes_controller.rb
@@ -227,18 +222,15 @@ files:
227
222
  - app/helpers/spree/admin/customer_returns_helper.rb
228
223
  - app/helpers/spree/admin/general_settings_helper.rb
229
224
  - app/helpers/spree/admin/images_helper.rb
230
- - app/helpers/spree/admin/inventory_settings_helper.rb
231
225
  - app/helpers/spree/admin/navigation_helper.rb
232
226
  - app/helpers/spree/admin/orders_helper.rb
233
227
  - app/helpers/spree/admin/payments_helper.rb
234
- - app/helpers/spree/admin/products_helper.rb
228
+ - app/helpers/spree/admin/promotion_rules_helper.rb
235
229
  - app/helpers/spree/admin/reimbursement_type_helper.rb
236
230
  - app/helpers/spree/admin/reimbursements_helper.rb
237
231
  - app/helpers/spree/admin/stock_locations_helper.rb
238
232
  - app/helpers/spree/admin/stock_movements_helper.rb
239
- - app/helpers/spree/admin/tables_helper.rb
240
233
  - app/helpers/spree/admin/taxons_helper.rb
241
- - app/helpers/spree/promotion_rules_helper.rb
242
234
  - app/models/spree/admin/resource.rb
243
235
  - app/models/spree/backend_configuration.rb
244
236
  - app/views/kaminari/_first_page.html.erb
@@ -269,7 +261,6 @@ files:
269
261
  - app/views/spree/admin/images/edit.html.erb
270
262
  - app/views/spree/admin/images/index.html.erb
271
263
  - app/views/spree/admin/images/new.html.erb
272
- - app/views/spree/admin/inventory_units/adjust.html.erb
273
264
  - app/views/spree/admin/log_entries/index.html.erb
274
265
  - app/views/spree/admin/option_types/_form.html.erb
275
266
  - app/views/spree/admin/option_types/_option_value_fields.html.erb
@@ -280,7 +271,6 @@ files:
280
271
  - app/views/spree/admin/orders/_add_product.html.erb
281
272
  - app/views/spree/admin/orders/_adjustments.html.erb
282
273
  - app/views/spree/admin/orders/_form.html.erb
283
- - app/views/spree/admin/orders/_line_item.html.erb
284
274
  - app/views/spree/admin/orders/_line_items.html.erb
285
275
  - app/views/spree/admin/orders/_line_items_edit_form.html.erb
286
276
  - app/views/spree/admin/orders/_order_actions.html.erb
@@ -340,6 +330,7 @@ files:
340
330
  - app/views/spree/admin/promotions/edit.html.erb
341
331
  - app/views/spree/admin/promotions/index.html.erb
342
332
  - app/views/spree/admin/promotions/new.html.erb
333
+ - app/views/spree/admin/promotions/rules/_country.html.erb
343
334
  - app/views/spree/admin/promotions/rules/_item_total.html.erb
344
335
  - app/views/spree/admin/promotions/rules/_landing_page.html.erb
345
336
  - app/views/spree/admin/promotions/rules/_option_value.html.erb
@@ -358,19 +349,20 @@ files:
358
349
  - app/views/spree/admin/prototypes/new.html.erb
359
350
  - app/views/spree/admin/prototypes/select.js.erb
360
351
  - app/views/spree/admin/prototypes/show.html.erb
361
- - app/views/spree/admin/refund_reasons/destroy.js.erb
362
352
  - app/views/spree/admin/refund_reasons/edit.html.erb
363
353
  - app/views/spree/admin/refund_reasons/index.html.erb
364
354
  - app/views/spree/admin/refund_reasons/new.html.erb
365
355
  - app/views/spree/admin/refunds/edit.html.erb
366
356
  - app/views/spree/admin/refunds/new.html.erb
357
+ - app/views/spree/admin/reimbursement_types/_form.html.erb
358
+ - app/views/spree/admin/reimbursement_types/edit.html.erb
367
359
  - app/views/spree/admin/reimbursement_types/index.html.erb
360
+ - app/views/spree/admin/reimbursement_types/new.html.erb
368
361
  - app/views/spree/admin/reimbursements/edit.html.erb
369
362
  - app/views/spree/admin/reimbursements/index.html.erb
370
363
  - app/views/spree/admin/reimbursements/show.html.erb
371
364
  - app/views/spree/admin/reports/index.html.erb
372
365
  - app/views/spree/admin/reports/sales_total.html.erb
373
- - app/views/spree/admin/return_authorization_reasons/destroy.js.erb
374
366
  - app/views/spree/admin/return_authorization_reasons/edit.html.erb
375
367
  - app/views/spree/admin/return_authorization_reasons/index.html.erb
376
368
  - app/views/spree/admin/return_authorization_reasons/new.html.erb
@@ -384,8 +376,6 @@ files:
384
376
  - app/views/spree/admin/roles/edit.html.erb
385
377
  - app/views/spree/admin/roles/index.html.erb
386
378
  - app/views/spree/admin/roles/new.html.erb
387
- - app/views/spree/admin/search/products.rabl
388
- - app/views/spree/admin/search/users.rabl
389
379
  - app/views/spree/admin/shared/_address.html.erb
390
380
  - app/views/spree/admin/shared/_address_form.html.erb
391
381
  - app/views/spree/admin/shared/_calculator_fields.html.erb
@@ -406,7 +396,7 @@ files:
406
396
  - app/views/spree/admin/shared/_sidebar.html.erb
407
397
  - app/views/spree/admin/shared/_table_filter.html.erb
408
398
  - app/views/spree/admin/shared/_translations.html.erb
409
- - app/views/spree/admin/shared/_update_order_state.js
399
+ - app/views/spree/admin/shared/_update_order_state.js.erb
410
400
  - app/views/spree/admin/shared/named_types/_edit.html.erb
411
401
  - app/views/spree/admin/shared/named_types/_form.html.erb
412
402
  - app/views/spree/admin/shared/named_types/_index.html.erb
@@ -437,7 +427,6 @@ files:
437
427
  - app/views/spree/admin/stock_locations/index.html.erb
438
428
  - app/views/spree/admin/stock_locations/new.html.erb
439
429
  - app/views/spree/admin/stock_movements/_form.html.erb
440
- - app/views/spree/admin/stock_movements/edit.html.erb
441
430
  - app/views/spree/admin/stock_movements/index.html.erb
442
431
  - app/views/spree/admin/stock_movements/new.html.erb
443
432
  - app/views/spree/admin/stock_transfers/_stock_movements.html.erb
@@ -512,6 +501,97 @@ files:
512
501
  - lib/spree/backend/engine.rb
513
502
  - lib/spree_backend.rb
514
503
  - script/rails
504
+ - spec/controllers/spree/admin/base_controller_spec.rb
505
+ - spec/controllers/spree/admin/customer_returns_controller_spec.rb
506
+ - spec/controllers/spree/admin/general_settings_controller_spec.rb
507
+ - spec/controllers/spree/admin/missing_products_controller_spec.rb
508
+ - spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
509
+ - spec/controllers/spree/admin/orders_controller_spec.rb
510
+ - spec/controllers/spree/admin/payment_methods_controller_spec.rb
511
+ - spec/controllers/spree/admin/payments_controller_spec.rb
512
+ - spec/controllers/spree/admin/products_controller_spec.rb
513
+ - spec/controllers/spree/admin/promotion_actions_controller_spec.rb
514
+ - spec/controllers/spree/admin/promotion_rules_controller_spec.rb
515
+ - spec/controllers/spree/admin/promotions_controller_spec.rb
516
+ - spec/controllers/spree/admin/refunds_controller_spec.rb
517
+ - spec/controllers/spree/admin/reimbursements_controller_spec.rb
518
+ - spec/controllers/spree/admin/reports_controller_spec.rb
519
+ - spec/controllers/spree/admin/resource_controller_spec.rb
520
+ - spec/controllers/spree/admin/return_authorizations_controller_spec.rb
521
+ - spec/controllers/spree/admin/return_index_controller_spec.rb
522
+ - spec/controllers/spree/admin/return_items_controller_spec.rb
523
+ - spec/controllers/spree/admin/shipping_methods_controller_spec.rb
524
+ - spec/controllers/spree/admin/stock_items_controller_spec.rb
525
+ - spec/controllers/spree/admin/stock_locations_controller_spec.rb
526
+ - spec/controllers/spree/admin/stock_transfers_controller_spec.rb
527
+ - spec/controllers/spree/admin/tax_categories_controller_spec.rb
528
+ - spec/controllers/spree/admin/users_controller_spec.rb
529
+ - spec/controllers/spree/admin/variants_controller_spec.rb
530
+ - spec/features/admin/configuration/analytics_tracker_spec.rb
531
+ - spec/features/admin/configuration/countries_spec.rb
532
+ - spec/features/admin/configuration/general_settings_spec.rb
533
+ - spec/features/admin/configuration/payment_methods_spec.rb
534
+ - spec/features/admin/configuration/roles_spec.rb
535
+ - spec/features/admin/configuration/shipping_methods_spec.rb
536
+ - spec/features/admin/configuration/states_spec.rb
537
+ - spec/features/admin/configuration/stock_locations_spec.rb
538
+ - spec/features/admin/configuration/store_credit_categories_spec.rb
539
+ - spec/features/admin/configuration/tax_categories_spec.rb
540
+ - spec/features/admin/configuration/tax_rates_spec.rb
541
+ - spec/features/admin/configuration/zones_spec.rb
542
+ - spec/features/admin/homepage_spec.rb
543
+ - spec/features/admin/locale_spec.rb
544
+ - spec/features/admin/orders/adjustments_promotions_spec.rb
545
+ - spec/features/admin/orders/adjustments_spec.rb
546
+ - spec/features/admin/orders/cancelling_and_resuming_spec.rb
547
+ - spec/features/admin/orders/customer_details_spec.rb
548
+ - spec/features/admin/orders/line_items_spec.rb
549
+ - spec/features/admin/orders/listing_spec.rb
550
+ - spec/features/admin/orders/log_entries_spec.rb
551
+ - spec/features/admin/orders/new_order_spec.rb
552
+ - spec/features/admin/orders/order_details_spec.rb
553
+ - spec/features/admin/orders/payments_spec.rb
554
+ - spec/features/admin/orders/risk_analysis_spec.rb
555
+ - spec/features/admin/orders/shipments_spec.rb
556
+ - spec/features/admin/orders/state_changes_spec.rb
557
+ - spec/features/admin/products/edit/images_spec.rb
558
+ - spec/features/admin/products/edit/products_spec.rb
559
+ - spec/features/admin/products/edit/taxons_spec.rb
560
+ - spec/features/admin/products/edit/variants_spec.rb
561
+ - spec/features/admin/products/option_types_spec.rb
562
+ - spec/features/admin/products/products_spec.rb
563
+ - spec/features/admin/products/properties_spec.rb
564
+ - spec/features/admin/products/prototypes_spec.rb
565
+ - spec/features/admin/products/stock_management_spec.rb
566
+ - spec/features/admin/products/taxonomies_spec.rb
567
+ - spec/features/admin/products/variant_spec.rb
568
+ - spec/features/admin/promotions/adjustments_spec.rb
569
+ - spec/features/admin/promotions/option_value_rule_spec.rb
570
+ - spec/features/admin/promotions/tiered_calculator_spec.rb
571
+ - spec/features/admin/refund_reasons/refund_reasons_spec.rb
572
+ - spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb
573
+ - spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb
574
+ - spec/features/admin/reports_spec.rb
575
+ - spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb
576
+ - spec/features/admin/returns/customer_returns_spec.rb
577
+ - spec/features/admin/returns/return_authorizations_spec.rb
578
+ - spec/features/admin/stock_transfer_spec.rb
579
+ - spec/features/admin/store_credits_spec.rb
580
+ - spec/features/admin/taxons_spec.rb
581
+ - spec/features/admin/users_spec.rb
582
+ - spec/helpers/admin/base_helper_spec.rb
583
+ - spec/helpers/admin/navigation_helper_spec.rb
584
+ - spec/helpers/admin/promotion_rules_helper_spec.rb
585
+ - spec/helpers/admin/stock_movements_helper_spec.rb
586
+ - spec/models/spree/resource_spec.rb
587
+ - spec/routing/admin_path_spec.rb
588
+ - spec/spec_helper.rb
589
+ - spec/support/appear_before_matcher.rb
590
+ - spec/support/ror_ringer.jpeg
591
+ - spec/test_views/spree/admin/submodule/posts/edit.html.erb
592
+ - spec/test_views/spree/admin/submodule/posts/new.html.erb
593
+ - spec/test_views/spree/admin/widgets/edit.html.erb
594
+ - spec/test_views/spree/admin/widgets/new.html.erb
515
595
  - spree_backend.gemspec
516
596
  - vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png
517
597
  - vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png
@@ -539,7 +619,7 @@ files:
539
619
  - vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif
540
620
  homepage: https://spreecommerce.com
541
621
  licenses:
542
- - BSD-3
622
+ - BSD-3-Clause
543
623
  metadata: {}
544
624
  post_install_message:
545
625
  rdoc_options: []
@@ -549,16 +629,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
549
629
  requirements:
550
630
  - - ">="
551
631
  - !ruby/object:Gem::Version
552
- version: '0'
632
+ version: 2.2.2
553
633
  required_rubygems_version: !ruby/object:Gem::Requirement
554
634
  requirements:
555
- - - ">="
635
+ - - ">"
556
636
  - !ruby/object:Gem::Version
557
- version: '0'
637
+ version: 1.3.1
558
638
  requirements:
559
639
  - none
560
- rubyforge_project: spree_backend
561
- rubygems_version: 2.6.10
640
+ rubyforge_project:
641
+ rubygems_version: 2.5.1
562
642
  signing_key:
563
643
  specification_version: 4
564
644
  summary: backend e-commerce functionality for the Spree project.
Binary file
@@ -1,27 +0,0 @@
1
- // On page load
2
- var replace_ids = function (s) {
3
- var new_id = new Date().getTime();
4
- return s.replace(/NEW_RECORD/g, new_id);
5
- };
6
-
7
- $(function () {
8
- 'use strict';
9
-
10
- $('a[id*=nested]').on('click', function () {
11
- var template = $(this).prop('href').replace(/.*#/, '');
12
- var html = replace_ids(eval(template));
13
- $('#ul-' + $(this).prop('id')).append(html);
14
- update_remove_links();
15
- });
16
- update_remove_links();
17
- });
18
-
19
- var update_remove_links = function () {
20
- 'use strict';
21
-
22
- $('.remove').on('click', function () {
23
- $(this).prevAll(':first').val(1);
24
- $(this).parent().hide();
25
- return false;
26
- });
27
- };
@@ -1,21 +0,0 @@
1
- $(document).ready(function () {
2
- 'use strict';
3
-
4
- $.each($('td.qty input'), function (i, input) {
5
-
6
- $(input).on('change', function () {
7
-
8
- var id = '#' + $(this).prop('id').replace('_quantity', '_id');
9
-
10
- $.post('/admin/orders/' + $('input#order_number').val() + '/line_items/' + $(id).val(), {
11
- _method: 'put',
12
- 'line_item[quantity]': $(this).val(),
13
- token: Spree.api_key
14
- },
15
-
16
- function (resp) {
17
- $('#order-form-wrapper').html(resp.responseText);
18
- });
19
- });
20
- });
21
- });
@@ -1,12 +0,0 @@
1
- // Colors
2
- $brand-success: #79B340;
3
- $brand-primary: #468ABD;
4
- $black: #444;
5
- $grey: #666;
6
- $medium-grey: lighten($grey, 30%);
7
- $light-grey: #f5f5f5;
8
- $color-border: #CCCCCC;
9
-
10
- // Well
11
- $well-bg: white;
12
- $well-border: $color-border;
@@ -1,5 +0,0 @@
1
- h1, h2, h3, h4, h5, h6 {
2
- -webkit-font-smoothing: antialiased;
3
- -webkit-text-size-adjust: 100%;
4
- -ms-text-size-adjust: 100%;
5
- }
@@ -1,18 +0,0 @@
1
- module Spree
2
- module Admin
3
- class RootController < Spree::Admin::BaseController
4
-
5
- skip_before_action :authorize_admin
6
-
7
- def index
8
- redirect_to admin_root_redirect_path
9
- end
10
-
11
- protected
12
-
13
- def admin_root_redirect_path
14
- spree.admin_orders_path
15
- end
16
- end
17
- end
18
- end
@@ -1,41 +0,0 @@
1
- module Spree
2
- module Admin
3
- class SearchController < Spree::Admin::BaseController
4
- respond_to :json
5
- layout false
6
-
7
- # http://spreecommerce.com/blog/2010/11/02/json-hijacking-vulnerability/
8
- before_action :check_json_authenticity, only: :index
9
-
10
- # TODO: Clean this up by moving searching out to user_class_extensions
11
- # And then JSON building with something like Active Model Serializers
12
- def users
13
- if params[:ids]
14
- @users = Spree.user_class.where(id: params[:ids].split(',').flatten)
15
- else
16
- @users = Spree.user_class.ransack({
17
- m: 'or',
18
- email_start: params[:q],
19
- ship_address_firstname_start: params[:q],
20
- ship_address_lastname_start: params[:q],
21
- bill_address_firstname_start: params[:q],
22
- bill_address_lastname_start: params[:q]
23
- }).result.limit(10)
24
- end
25
- end
26
-
27
- def products
28
- if params[:ids]
29
- @products = Product.where(id: params[:ids].split(",").flatten)
30
- else
31
- @products = Product.ransack(params[:q]).result
32
- end
33
-
34
- @products = @products.distinct.page(params[:page]).per(params[:per_page])
35
- expires_in 15.minutes, public: true
36
- headers['Surrogate-Control'] = "max-age=#{15.minutes}"
37
- end
38
- end
39
- end
40
- end
41
-
@@ -1,9 +0,0 @@
1
- module Spree
2
- module Admin
3
- module InventorySettingsHelper
4
- def show_not(true_or_false)
5
- true_or_false ? '' : Spree.t(:not)
6
- end
7
- end
8
- end
9
- end
@@ -1,29 +0,0 @@
1
- module Spree
2
- module Admin
3
- module ProductsHelper
4
- def taxon_options_for(product)
5
- options = @taxons.map do |taxon|
6
- selected = product.taxons.include?(taxon)
7
- content_tag(:option,
8
- :value => taxon.id,
9
- :selected => ('selected' if selected)) do
10
- (taxon.ancestors.pluck(:name) + [taxon.name]).join(" -> ")
11
- end
12
- end
13
- safe_join(options)
14
- end
15
-
16
- def option_types_options_for(product)
17
- options = @option_types.map do |option_type|
18
- selected = product.option_types.include?(option_type)
19
- content_tag(:option,
20
- :value => option_type.id,
21
- :selected => ('selected' if selected)) do
22
- option_type.name
23
- end
24
- end
25
- safe_join(options)
26
- end
27
- end
28
- end
29
- end
@@ -1,15 +0,0 @@
1
- module Spree
2
- module Admin
3
- module TablesHelper
4
-
5
- # Adds class 'active' to <th> & <td> tags
6
- # for better tables styling
7
- def sort_by_active_class(row)
8
- if params[:q][:s] && params[:q][:s].include?(row)
9
- return "sort-active"
10
- end
11
- end
12
-
13
- end
14
- end
15
- end
@@ -1,13 +0,0 @@
1
- module Spree
2
- module PromotionRulesHelper
3
-
4
- def options_for_promotion_rule_types(promotion)
5
- existing = promotion.rules.map { |rule| rule.class.name }
6
- rule_names = Rails.application.config.spree.promotions.rules.map(&:name).reject{ |r| existing.include? r }
7
- options = rule_names.map { |name| [ Spree.t("promotion_rule_types.#{name.demodulize.underscore}.name"), name] }
8
- options_for_select(options)
9
- end
10
-
11
- end
12
- end
13
-
@@ -1,29 +0,0 @@
1
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @level } %>
2
-
3
- <%= form_tag do %>
4
- <h1><%= Spree.t(:inventory_adjustment) %></h1>
5
-
6
- <table class="basic-table">
7
- <thead data-hook="inventory_header">
8
- <tr>
9
- <th><%= Spree.t(:sku) %></th>
10
- <th><%= Spree.t(:product) %></th>
11
- <th><%= Spree.t(:options) %></th>
12
- <th><%= Spree.t(:adjustment) %></th>
13
- </tr>
14
- </thead>
15
- <tbody>
16
- <tr data-hook="inventory_row">
17
- <td><%= @variant.sku %></td>
18
- <td><%= @variant.product.name %></td>
19
- <td><%= variant_options @variant %></td>
20
- <td>
21
- <%= text_field :level, :adjustment, :class => 'quantity form-control' %>
22
- </td>
23
- </tr>
24
- </tbody>
25
- </table>
26
- <%= submit_tag Spree.t('actions.update') %>
27
- <%= Spree.t(:or) %>
28
- <%= link_to Spree.t('actions.cancel'), :controller => 'overview', :action => :index %>
29
- <% end %>
@@ -1,21 +0,0 @@
1
- <tr id="<%= spree_dom_id(f.object) %>" data-hook="admin_order_form_line_item_row">
2
- <td>
3
- <%=f.object.variant.product.name%>
4
- <%= "(#{f.object.variant.options_text})" unless f.object.variant.option_values.empty? %>
5
- </td>
6
- <td class="price ">
7
- <%= f.object.single_money %>
8
- </td>
9
- <td class="qty">
10
- <%= f.number_field :quantity, min: 0, class: "qty" %>
11
- </td>
12
- <td class="total">
13
- <%= f.object.display_amount %>
14
- </td>
15
- <td data-hook="admin_order_form_line_item_actions" class="actions">
16
- <%= link_to_delete f.object, {
17
- url: spree.admin_order_line_item_url(@order.number, f.object),
18
- no_text: true
19
- } %>
20
- </td>
21
- </tr>
@@ -1 +0,0 @@
1
- <%= render partial: 'spree/admin/shared/destroy' %>
@@ -1 +0,0 @@
1
- <%= render partial: 'spree/admin/shared/destroy' %>
@@ -1,9 +0,0 @@
1
- object false
2
- node(:count) { @products.count }
3
- node(:total_count) { @products.total_count }
4
- node(:current_page) { params[:page] ? params[:page].to_i : 1 }
5
- node(:per_page) { params[:per_page] || Kaminari.config.default_per_page }
6
- node(:pages) { @products.total_pages }
7
- child(@products => :products) do
8
- attributes :id, :name
9
- end
@@ -1,30 +0,0 @@
1
- collection(@users => :users)
2
- attributes :email, :id
3
- address_fields = [:firstname, :lastname,
4
- :address1, :address2,
5
- :city, :zipcode,
6
- :phone, :state_name,
7
- :state_id, :country_id,
8
- :company]
9
-
10
- child :ship_address => :ship_address do
11
- attributes *address_fields
12
- child :state do
13
- attributes :name
14
- end
15
-
16
- child :country do
17
- attributes :name
18
- end
19
- end
20
-
21
- child :bill_address => :bill_address do
22
- attributes *address_fields
23
- child :state do
24
- attributes :name
25
- end
26
-
27
- child :country do
28
- attributes :name
29
- end
30
- end