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
@@ -3,13 +3,13 @@
3
3
  <div class="col-md-5">
4
4
  <%= f.field_container :name, class: ['form-group'] do %>
5
5
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
6
- <%= text_field :taxon, :name, :class => 'form-control' %>
7
- <%= f.error_message_on :name, :class => 'error-message' %>
6
+ <%= text_field :taxon, :name, class: 'form-control' %>
7
+ <%= f.error_message_on :name, class: 'error-message' %>
8
8
  <% end %>
9
9
 
10
10
  <%= f.field_container :permalink_part, class: ['form-group'] do %>
11
11
  <%= f.label :permalink_part, Spree.t(:permalink) %> <span class="required">*</span>
12
- <%= text_field_tag :permalink_part, @permalink_part, :class => 'form-control' %>
12
+ <%= text_field_tag :permalink_part, @permalink_part, class: 'form-control' %>
13
13
  <p class="help-block" id="permalink_part_display">
14
14
  <%= @taxon.permalink.split('/')[0...-1].join('/') + '/' %>
15
15
  </p>
@@ -24,23 +24,23 @@
24
24
  <div class="col-md-7">
25
25
  <%= f.field_container :description, class: ['form-group'] do %>
26
26
  <%= f.label :description, Spree.t(:description) %>
27
- <%= f.text_area :description, :class => 'form-control', :rows => 6 %>
27
+ <%= f.text_area :description, class: 'form-control', rows: 6 %>
28
28
  <% end %>
29
29
  </div>
30
30
  </div>
31
31
 
32
32
  <%= f.field_container :meta_title, class: ['form-group'] do %>
33
33
  <%= f.label :meta_title, Spree.t(:meta_title) %>
34
- <%= f.text_field :meta_title, :class => 'form-control', :rows => 6 %>
34
+ <%= f.text_field :meta_title, class: 'form-control', rows: 6 %>
35
35
  <% end %>
36
36
 
37
37
  <%= f.field_container :meta_description, class: ['form-group'] do %>
38
38
  <%= f.label :meta_description, Spree.t(:meta_description) %>
39
- <%= f.text_field :meta_description, :class => 'form-control', :rows => 6 %>
39
+ <%= f.text_field :meta_description, class: 'form-control', rows: 6 %>
40
40
  <% end %>
41
41
 
42
42
  <%= f.field_container :meta_keywords, class: ['form-group'] do %>
43
43
  <%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
44
- <%= f.text_field :meta_keywords, :class => 'form-control', :rows => 6 %>
44
+ <%= f.text_field :meta_keywords, class: 'form-control', rows: 6 %>
45
45
  <% end %>
46
46
  </div>
@@ -12,7 +12,7 @@
12
12
  <td><%= taxon.name %></td>
13
13
  <td><%= taxon_path taxon %></td>
14
14
  <td class="actions">
15
- <%= link_to_delete taxon, :url => remove_admin_product_taxon_url(@product, taxon), :name => icon('delete') + ' ' + Spree.t(:remove) %>
15
+ <%= link_to_delete taxon, url: remove_admin_product_taxon_url(@product, taxon), name: icon('delete') + ' ' + Spree.t(:remove) %>
16
16
  </td>
17
17
  </tr>
18
18
  <% end %>
@@ -15,18 +15,3 @@
15
15
  <%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), icon: "remove" %>
16
16
  </div>
17
17
  <% end %>
18
-
19
- <% content_for :head do %>
20
- <%= javascript_tag do %>
21
- $(document).ready(function() {
22
- var field = $('#permalink_part'),
23
- target = $('#permalink_part_display'),
24
- permalink_part_default = target.text().trim();
25
-
26
- target.text(permalink_part_default + field.val());
27
- field.on('keyup blur', function () {
28
- target.text(permalink_part_default + $(this).val());
29
- });
30
- });
31
- <% end %>
32
- <% end %>
@@ -9,5 +9,5 @@
9
9
 
10
10
  <ul id="taxon_products" class="taxon"></ul>
11
11
 
12
- <%= render :partial => "spree/admin/products/autocomplete", :formats => :js %>
12
+ <%= render partial: "spree/admin/products/autocomplete", formats: :js %>
13
13
  </div>
@@ -2,7 +2,7 @@
2
2
  <div class="col-md-4" data-hook="analytics_id">
3
3
  <%= f.field_container :analytics_id, class: ["form-group"], "data-hook" => "analytics_id" do %>
4
4
  <%= f.label :analytics_id, Spree.t(:google_analytics_id) %>
5
- <%= f.text_field :analytics_id, :class => 'form-control' %>
5
+ <%= f.text_field :analytics_id, class: 'form-control' %>
6
6
  <%= f.error_message_on :analytics_id %>
7
7
  <% end %>
8
8
  </div>
@@ -3,11 +3,11 @@
3
3
  <%= @tracker.analytics_id %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tracker } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @tracker } %>
7
7
 
8
8
  <%= form_for [:admin, @tracker] do |f| %>
9
9
  <fieldset>
10
- <%= render :partial => 'form', :locals => { :f => f } %>
11
- <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
10
+ <%= render partial: 'form', locals: { f: f } %>
11
+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>
12
12
  </fieldset>
13
13
  <% end %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_tracker), new_object_url, :class => "btn-success", :icon => 'add', :id => 'admin_new_tracker_link' %>
6
+ <%= button_link_to Spree.t(:new_tracker), new_object_url, class: "btn-success", icon: 'add', id: 'admin_new_tracker_link' %>
7
7
  <% end if can? :create, Spree::Tracker %>
8
8
 
9
9
  <% if @trackers.any? %>
@@ -27,8 +27,8 @@
27
27
  <td><%= tracker.analytics_id %></td>
28
28
  <td class="text-center"><%= tracker.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
29
29
  <td class="actions text-right">
30
- <%= link_to_edit(tracker, :no_text => true) if can? :edit, tracker %>
31
- <%= link_to_delete(tracker, :no_text => true) if can? :delete, tracker %>
30
+ <%= link_to_edit(tracker, no_text: true) if can? :edit, tracker %>
31
+ <%= link_to_delete(tracker, no_text: true) if can? :delete, tracker %>
32
32
  </td>
33
33
  </tr>
34
34
  <% end %>
@@ -3,11 +3,11 @@
3
3
  <%= Spree.t(:new_tracker) %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tracker } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @tracker } %>
7
7
 
8
8
  <%= form_for [:admin, @tracker] do |f| %>
9
9
  <fieldset>
10
- <%= render :partial => 'form', :locals => { :f => f } %>
11
- <%= render :partial => 'spree/admin/shared/new_resource_links' %>
10
+ <%= render partial: 'form', locals: { f: f } %>
11
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
12
12
  </fieldset>
13
13
  <% end %>
@@ -10,7 +10,7 @@
10
10
  <div class="panel-body">
11
11
  <%= f.fields_for :bill_address, (@user.bill_address || Spree::Address.default(@user, "bill")) do |ba_form| %>
12
12
  <% ba_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
13
- <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :type => "billing" } %>
13
+ <%= render partial: 'spree/admin/shared/address_form', locals: { f: ba_form, type: "billing" } %>
14
14
  <% end %>
15
15
  </div>
16
16
  </div>
@@ -27,7 +27,7 @@
27
27
  <div class="panel-body">
28
28
  <%= f.fields_for :ship_address, (@user.ship_address || Spree::Address.default(@user, "ship")) do |sa_form| %>
29
29
  <% sa_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
30
- <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => "shipping" } %>
30
+ <%= render partial: 'spree/admin/shared/address_form', locals: { f: sa_form, type: "shipping" } %>
31
31
  <% end %>
32
32
  </div>
33
33
  </div>
@@ -2,7 +2,7 @@
2
2
  <div class="col-md-6">
3
3
  <%= f.field_container :email, class: ['form-group'] do %>
4
4
  <%= f.label :email, Spree.t(:email) %>
5
- <%= f.email_field :email, :class => 'form-control' %>
5
+ <%= f.email_field :email, class: 'form-control' %>
6
6
  <%= f.error_message_on :email %>
7
7
  <% end %>
8
8
 
@@ -23,13 +23,13 @@
23
23
  <div data-hook="admin_user_form_password_fields" class="col-md-6">
24
24
  <%= f.field_container :password, class: ['form-group'] do %>
25
25
  <%= f.label :password, Spree.t(:password) %>
26
- <%= f.password_field :password, :class => 'form-control' %>
26
+ <%= f.password_field :password, class: 'form-control' %>
27
27
  <%= f.error_message_on :password %>
28
28
  <% end %>
29
29
 
30
30
  <%= f.field_container :password_confirmation, class: ['form-group'] do %>
31
31
  <%= f.label :password_confirmation, Spree.t(:confirm_password) %>
32
- <%= f.password_field :password_confirmation, :class => 'form-control' %>
32
+ <%= f.password_field :password_confirmation, class: 'form-control' %>
33
33
  <%= f.error_message_on :password_confirmation %>
34
34
  <% end %>
35
35
  </div>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_user), new_admin_user_url, :class => "btn-success", :icon => 'add', :id => 'admin_new_user_link' %>
6
+ <%= button_link_to Spree.t(:new_user), new_admin_user_url, class: "btn-success", icon: 'add', id: 'admin_new_user_link' %>
7
7
  <% end %>
8
8
 
9
9
  <% content_for :table_filter_title do %>
@@ -21,19 +21,19 @@
21
21
  <div class="col-md-6">
22
22
  <div class="form-group">
23
23
  <%= f.label Spree.t(:first_name) %>
24
- <%= f.text_field :bill_address_firstname_cont, :class => 'form-control' %>
24
+ <%= f.text_field :bill_address_firstname_cont, class: 'form-control' %>
25
25
  </div>
26
26
  </div>
27
27
  <div class="col-md-6">
28
28
  <div class="form-group">
29
29
  <%= f.label Spree.t(:last_name) %>
30
- <%= f.text_field :bill_address_lastname_cont, :class => 'form-control' %>
30
+ <%= f.text_field :bill_address_lastname_cont, class: 'form-control' %>
31
31
  </div>
32
32
  </div>
33
33
  </div>
34
34
  <div class="form-group">
35
35
  <%= f.label Spree.t(:company) %>
36
- <%= f.text_field :bill_address_company_cont, :class => 'form-control' %>
36
+ <%= f.text_field :bill_address_company_cont, class: 'form-control' %>
37
37
  </div>
38
38
  <div data-hook="admin_users_index_search_buttons" class="form-actions">
39
39
  <%= button Spree.t(:search), 'search' %>
@@ -46,7 +46,7 @@
46
46
  <thead>
47
47
  <tr data-hook="admin_users_index_headers">
48
48
  <th>
49
- <%= sort_link @search,:email, Spree.t(:user), {}, {:title => 'users_email_title'} %>
49
+ <%= sort_link @search,:email, Spree.t(:user), {}, {title: 'users_email_title'} %>
50
50
  </th>
51
51
  <th data-hook="admin_users_index_header_actions" class="actions"></th>
52
52
  </tr>
@@ -56,8 +56,8 @@
56
56
  <tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
57
57
  <td class='user_email'><%=link_to user.email, edit_admin_user_url(user) %></td>
58
58
  <td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
59
- <%= link_to_edit user, :no_text => true %>
60
- <%= link_to_delete user, :no_text => true %>
59
+ <%= link_to_edit user, no_text: true %>
60
+ <%= link_to_delete user, no_text: true %>
61
61
  </td>
62
62
  </tr>
63
63
  <% end %>
@@ -30,8 +30,8 @@
30
30
  <%= mini_image(item.variant) %>
31
31
  </td>
32
32
  <td class="item-name">
33
- <%= item.product.name %><br><%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>
34
- <% if item.variant.sku.present? %>
33
+ <%= item.name %><br><%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>
34
+ <% if item.sku.present? %>
35
35
  <strong><%= Spree.t(:sku) %>:</strong> <%= item.variant.sku %>
36
36
  <% end %>
37
37
  </td>
@@ -4,15 +4,15 @@
4
4
  <% end %>
5
5
 
6
6
  <div data-hook="admin_user_new_form_header">
7
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @user } %>
7
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @user } %>
8
8
  </div>
9
9
 
10
10
  <div data-hook="admin_user_new_form">
11
11
  <%= form_for [:admin, @user], url: spree.admin_users_url, method: :post do |f| %>
12
- <%= render :partial => 'form', :locals => { :f => f } %>
12
+ <%= render partial: 'form', locals: { f: f } %>
13
13
 
14
14
  <div data-hook="admin_user_new_form_buttons">
15
- <%= render :partial => 'spree/admin/shared/new_resource_links' %>
15
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
16
16
  </div>
17
17
  <% end %>
18
18
  </div>
@@ -13,21 +13,38 @@
13
13
  <tr>
14
14
  <td>{{variant.name}}</td>
15
15
  {{#if variant.track_inventory}}
16
- {{#if variant.total_on_hand}}
17
- <td class="text-center">{{variant.total_on_hand}}</td>
16
+ {{#if variant.is_orderable}}
17
+ <td class="text-center">
18
+ {{variant.total_on_hand}}
19
+ </td>
20
+
18
21
  <td class="text-center">
19
22
  <input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
20
23
  </td>
21
24
  <td class="actions actions-1 text-center">
22
25
  <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
23
26
  <span class="icon icon-add"></span>
24
- </button>
27
+ </button>
25
28
  </td>
26
29
  {{else}}
27
- <td class="text-center"><%= Spree.t(:out_of_stock) %></td>
28
- <td class="text-center">0</td>
29
- <td></td>
30
- <td></td>
30
+ {{#if variant.is_backorderable}}
31
+ <td class="text-center">
32
+ {{variant.total_on_hand}} (<%= Spree.t(:backorders_allowed) %>)
33
+ </td>
34
+
35
+ <td class="text-center">
36
+ <input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
37
+ </td>
38
+ <td class="actions actions-1 text-center">
39
+ <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
40
+ <span class="icon icon-add"></span>
41
+ </button>
42
+ </td>
43
+ {{else}}
44
+ <td class="text-center"><%= Spree.t(:out_of_stock) %></td>
45
+ <td class="text-center">0</td>
46
+ <td></td>
47
+ {{/if}}
31
48
  {{/if}}
32
49
  {{else}}
33
50
  <td class="text-center"><%= Spree.t(:doesnt_track_inventory) %></td>
@@ -39,6 +39,7 @@
39
39
  {{else}}
40
40
  <td><%= Spree.t(:out_of_stock) %></td>
41
41
  <td>0</td>
42
+ <td></td>
42
43
  {{/if}}
43
44
  {{/unless}}
44
45
  </tr>
@@ -5,28 +5,28 @@
5
5
  <div class="form-group" data-hook="presentation">
6
6
  <%= label :new_variant, option_type.presentation %>
7
7
  <%= f.collection_select 'option_value_ids', option_type.option_values, :id, :presentation,
8
- { :include_blank => true }, { :name => 'variant[option_value_ids][]', :class => 'select2' } %>
8
+ { include_blank: true }, { name: 'variant[option_value_ids][]', class: 'select2' } %>
9
9
  </div>
10
10
  <% end %>
11
11
 
12
12
  <div class="form-group" data-hook="sku">
13
13
  <%= f.label :sku, Spree.t(:sku) %>
14
- <%= f.text_field :sku, :class => 'form-control' %>
14
+ <%= f.text_field :sku, class: 'form-control' %>
15
15
  </div>
16
16
 
17
17
  <div class="form-group" data-hook="price">
18
18
  <%= f.label :price, Spree.t(:price) %>
19
- <%= f.text_field :price, :value => number_to_currency(@variant.price, :unit => ''), :class => 'form-control' %>
19
+ <%= f.text_field :price, value: number_to_currency(@variant.price, unit: ''), class: 'form-control' %>
20
20
  </div>
21
21
 
22
22
  <div class="form-group" data-hook="cost_price">
23
23
  <%= f.label :cost_price, Spree.t(:cost_price) %>
24
- <%= f.text_field :cost_price, :value => number_to_currency(@variant.cost_price, :unit => ''), :class => 'form-control' %>
24
+ <%= f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'form-control' %>
25
25
  </div>
26
26
 
27
27
  <div class="form-group" data-hook="tax_category">
28
28
  <%= f.label :tax_category_id, Spree.t(:tax_category) %>
29
- <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
29
+ <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
30
30
  </div>
31
31
 
32
32
  <div class="form-group" data-hook="discontinue_on">
@@ -41,8 +41,8 @@
41
41
  <div class="col-md-6" data-hook="admin_variant_form_additional_fields">
42
42
  <% [:weight, :height, :width, :depth].each do |field| %>
43
43
  <div class="form-group" data-hook="<%= field %>"><%= f.label field, Spree.t(field) %>
44
- <% value = number_with_precision(@variant.send(field), :precision => 2) %>
45
- <%= f.text_field field, :value => value, :class => 'form-control' %>
44
+ <% value = number_with_precision(@variant.send(field), precision: 2) %>
45
+ <%= f.text_field field, value: value, class: 'form-control' %>
46
46
  </div>
47
47
  <% end %>
48
48
  </div>
@@ -1,11 +1,11 @@
1
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @variant } %>
1
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
2
2
 
3
3
  <%= form_for [:admin, @product, @variant] do |f| %>
4
4
  <div class="well">
5
5
  <fieldset data-hook="admin_variant_new_form">
6
6
  <legend><%= Spree.t(:new_variant) %></legend>
7
- <%= render :partial => 'form', :locals => { :f => f } %>
8
- <%= render :partial => 'spree/admin/shared/new_resource_links' %>
7
+ <%= render partial: 'form', locals: { f: f } %>
8
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
9
9
  </fieldset>
10
10
  </div>
11
11
  <% end %>
@@ -9,7 +9,7 @@
9
9
  <div class="panel-body">
10
10
  <%= zone_form.field_container :country_ids, class: ['form-group'] do %>
11
11
  <%= zone_form.label :country_ids, Spree.t(:countries) %>
12
- <%= zone_form.collection_select :country_ids, @countries, :id, :name, {}, { :multiple => true, :class => "select2" } %>
12
+ <%= zone_form.collection_select :country_ids, @countries, :id, :name, {}, { multiple: true, class: "select2" } %>
13
13
  <% end %>
14
14
  </div>
15
15
  </div>
@@ -8,13 +8,13 @@
8
8
  <div class="panel-body">
9
9
  <%= zone_form.field_container :name, class: ['form-group'] do %>
10
10
  <%= zone_form.label :name, Spree.t(:name) %>
11
- <%= zone_form.text_field :name, :class => 'form-control' %>
11
+ <%= zone_form.text_field :name, class: 'form-control' %>
12
12
  <%= zone_form.error_message_on :name %>
13
13
  <% end %>
14
14
 
15
15
  <%= zone_form.field_container :description, class: ['form-group'] do %>
16
16
  <%= zone_form.label :description, Spree.t(:description) %>
17
- <%= zone_form.text_field :description, :class => 'form-control' %>
17
+ <%= zone_form.text_field :description, class: 'form-control' %>
18
18
  <% end %>
19
19
 
20
20
  <div data-hook="default" class="checkbox">
@@ -28,13 +28,13 @@
28
28
  <strong><%= Spree.t(:type) %></strong>
29
29
  <div class="radio">
30
30
  <%= label_tag :country_based do %>
31
- <%= zone_form.radio_button('kind', 'country', { :id => 'country_based' }) %>
31
+ <%= zone_form.radio_button('kind', 'country', { id: 'country_based' }) %>
32
32
  <%= Spree.t(:country_based) %>
33
33
  <% end %>
34
34
  </div>
35
35
  <div class="radio">
36
36
  <%= label_tag :state_based do %>
37
- <%= zone_form.radio_button('kind', 'state', { :id => 'state_based' }) %>
37
+ <%= zone_form.radio_button('kind', 'state', { id: 'state_based' }) %>
38
38
  <%= Spree.t(:state_based) %>
39
39
  <% end %>
40
40
  </div>
@@ -43,7 +43,7 @@
43
43
  </div>
44
44
  </div>
45
45
  <div class="col-md-6">
46
- <%= render :partial => 'state_members', :locals => { :zone_form => zone_form }%>
47
- <%= render :partial => 'country_members', :locals => { :zone_form => zone_form } %>
46
+ <%= render partial: 'state_members', locals: { zone_form: zone_form }%>
47
+ <%= render partial: 'country_members', locals: { zone_form: zone_form } %>
48
48
  </div>
49
49
  </div>
@@ -9,7 +9,7 @@
9
9
  <div class="panel-body">
10
10
  <%= zone_form.field_container :state_ids, class: ['form-group'] do %>
11
11
  <%= zone_form.label :state_ids, Spree.t(:states) %>
12
- <%= zone_form.collection_select :state_ids, @states, :id, :name, {}, { :multiple => true, :class => "select2" } %>
12
+ <%= zone_form.collection_select :state_ids, @states, :id, :name, {}, { multiple: true, class: "select2" } %>
13
13
  <% end %>
14
14
  </div>
15
15
  </div>
@@ -3,10 +3,10 @@
3
3
  <%= @zone.name %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @zone } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @zone } %>
7
7
 
8
8
  <%= form_for [:admin, @zone] do |zone_form| %>
9
- <%= render :partial => 'form', :locals => { :zone_form => zone_form } %>
9
+ <%= render partial: 'form', locals: { zone_form: zone_form } %>
10
10
 
11
- <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
11
+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>
12
12
  <% end %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_zone), new_object_url, :class => "btn-success", :icon => 'add', :id => 'admin_new_zone_link' %>
6
+ <%= button_link_to Spree.t(:new_zone), new_object_url, class: "btn-success", icon: 'add', id: 'admin_new_zone_link' %>
7
7
  <% end if can? :create, Spree::Zone %>
8
8
 
9
9
  <%= paginate @zones %>
@@ -12,9 +12,9 @@
12
12
  <table class="table" id='listing_zones' data-hook>
13
13
  <thead>
14
14
  <tr data-hook="zones_header">
15
- <th><%= sort_link @search,:name, Spree.t(:name), :title => 'zones_order_by_name_title' %></th>
15
+ <th><%= sort_link @search,:name, Spree.t(:name), title: 'zones_order_by_name_title' %></th>
16
16
  <th>
17
- <%= sort_link @search,:description, Spree.t(:description), {}, {:title => 'zones_order_by_description_title'} %>
17
+ <%= sort_link @search,:description, Spree.t(:description), {}, {title: 'zones_order_by_description_title'} %>
18
18
  </th>
19
19
  <th><%= Spree.t(:default_tax_zone) %></th>
20
20
  <th class="actions"></th>
@@ -27,8 +27,8 @@
27
27
  <td><%= zone.description %></td>
28
28
  <td><%= zone.default_tax? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
29
29
  <td class="actions actions-2 text-right">
30
- <%= link_to_edit(zone, :no_text => true) if can? :edit, zone %>
31
- <%= link_to_delete(zone, :no_text => true) if can? :delete, zone %>
30
+ <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
31
+ <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
32
32
  </td>
33
33
  </tr>
34
34
  <% end %>
@@ -3,9 +3,9 @@
3
3
  <%= Spree.t(:new_zone) %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @zone } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @zone } %>
7
7
 
8
8
  <%= form_for [:admin, @zone] do |zone_form| %>
9
- <%= render :partial => 'form', :locals => { :zone_form => zone_form } %>
10
- <%= render :partial => 'spree/admin/shared/new_resource_links' %>
9
+ <%= render partial: 'form', locals: { zone_form: zone_form } %>
10
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
11
11
  <% end %>
data/config/routes.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  Spree::Core::Engine.add_routes do
2
2
  namespace :admin, path: Spree.admin_path do
3
- get '/search/users', to: "search#users", as: :search_users
4
- get '/search/products', to: "search#products", as: :search_products
5
-
6
3
  resources :promotions do
7
4
  resources :promotion_rules
8
5
  resources :promotion_actions
@@ -41,8 +38,6 @@ Spree::Core::Engine.add_routes do
41
38
  resources :variants_including_master, only: [:update]
42
39
  end
43
40
 
44
- get '/variants/search', to: "variants#search", as: :search_variants
45
-
46
41
  resources :option_types do
47
42
  collection do
48
43
  post :update_positions
@@ -130,11 +125,7 @@ Spree::Core::Engine.add_routes do
130
125
  resources :taxons
131
126
  end
132
127
 
133
- resources :taxons, only: [:index, :show] do
134
- collection do
135
- get :search
136
- end
137
- end
128
+ resources :taxons, only: [:index, :show]
138
129
 
139
130
  resources :reports, only: [:index] do
140
131
  collection do
@@ -143,7 +134,7 @@ Spree::Core::Engine.add_routes do
143
134
  end
144
135
  end
145
136
 
146
- resources :reimbursement_types, only: [:index]
137
+ resources :reimbursement_types
147
138
  resources :refund_reasons, except: :show
148
139
  resources :return_authorization_reasons, except: :show
149
140
 
@@ -181,5 +172,6 @@ Spree::Core::Engine.add_routes do
181
172
  end
182
173
  end
183
174
 
184
- get Spree.admin_path, to: 'admin/root#index', as: :admin
175
+ spree_path = Rails.application.routes.url_helpers.try(:spree_path, trailing_slash: true) || '/'
176
+ get Spree.admin_path, to: redirect((spree_path + Spree.admin_path + '/orders').gsub('//', '/')), as: :admin
185
177
  end
@@ -3,7 +3,7 @@ module Spree
3
3
  class Engine < ::Rails::Engine
4
4
  config.middleware.use "Spree::Backend::Middleware::SeoAssist"
5
5
 
6
- initializer "spree.backend.environment", :before => :load_config_initializers do |app|
6
+ initializer "spree.backend.environment", before: :load_config_initializers do |app|
7
7
  Spree::Backend::Config = Spree::BackendConfiguration.new
8
8
  end
9
9
 
@@ -13,20 +13,16 @@ module Spree
13
13
  end
14
14
 
15
15
  # sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
16
- initializer "spree.assets.precompile", :group => :all do |app|
16
+ initializer "spree.assets.precompile", group: :all do |app|
17
17
  app.config.assets.paths << "#{Rails.root}/app/assets/fonts"
18
18
  app.config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/
19
19
 
20
20
  app.config.assets.precompile += %w[
21
21
  spree/backend/all*
22
- spree/backend/orders/edit_form.js
23
22
  spree/backend/address_states.js
24
- jqPlot/excanvas.min.js
25
- spree/backend/images/new.js
26
23
  jquery.jstree/themes/spree/*
27
24
  fontawesome-webfont*
28
25
  select2_locale*
29
- jquery.alerts/images/*
30
26
  ]
31
27
  end
32
28
  end