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,27 +3,27 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_property), new_object_url, { :class => "btn-success", :icon => 'add', 'data-update' => 'new_property', :id => 'new_property_link' } %>
6
+ <%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_property', id: 'new_property_link' } %>
7
7
  <% end %>
8
8
 
9
9
  <% content_for :table_filter do %>
10
10
  <div data-hook="admin_property_sidebar">
11
11
  <%= search_form_for [:admin, @search] do |f| %>
12
12
 
13
- <%- locals = {:f => f} %>
13
+ <%- locals = {f: f} %>
14
14
 
15
15
  <div class="row">
16
16
  <div class="col col-md-6">
17
17
  <div data-hook="admin_property_index_search" class="form-group">
18
18
  <%= f.label :name_cont, Spree.t(:name) %>
19
- <%= f.text_field :name_cont, :class => "form-control js-quick-search-target" %>
19
+ <%= f.text_field :name_cont, class: "form-control js-quick-search-target" %>
20
20
  </div>
21
21
  </div>
22
22
 
23
23
  <div class="col-md-6">
24
24
  <div class="form-group">
25
25
  <%= f.label :presentation_cont, Spree.t(:presentation) %>
26
- <%= f.text_field :presentation_cont, :class => "form-control" %>
26
+ <%= f.text_field :presentation_cont, class: "form-control" %>
27
27
  </div>
28
28
  </div>
29
29
  </div>
@@ -51,8 +51,8 @@
51
51
  <td><%= property.name %></td>
52
52
  <td><%= property.presentation %></td>
53
53
  <td class="actions actions-2 text-right">
54
- <%= link_to_edit(property, :no_text => true) %>
55
- <%= link_to_delete(property, :no_text => true) %>
54
+ <%= link_to_edit(property, no_text: true) %>
55
+ <%= link_to_delete(property, no_text: true) %>
56
56
  </td>
57
57
  </tr>
58
58
  <% end %>
@@ -10,7 +10,7 @@
10
10
  <tr id="row_<%= prototype.id %>" data-hook="available_row">
11
11
  <td><%= prototype.name %></td>
12
12
  <td class="actions actions-1">
13
- <%= link_to_with_icon 'save', Spree.t(:select), select_admin_prototype_url(prototype), :class => ' btn btn-default btn-sm ajax select_properties_from_prototype', :no_text => true %>
13
+ <%= link_to_with_icon 'save', Spree.t(:select), select_admin_prototype_url(prototype), class: ' btn btn-default btn-sm ajax select_properties_from_prototype', no_text: true %>
14
14
  </td>
15
15
  </tr>
16
16
  <% end %>
@@ -1,2 +1,2 @@
1
- $("#prototypes").html('<%= escape_javascript(render :partial => "spree/admin/prototypes/prototypes") %>');
1
+ $("#prototypes").html('<%= escape_javascript(render partial: "spree/admin/prototypes/prototypes") %>');
2
2
  $(".js-new-ptype-link").hide();
@@ -3,11 +3,11 @@
3
3
  <%= @prototype.name %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @prototype } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @prototype } %>
7
7
 
8
8
  <%= form_for [:admin, @prototype] 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_prototype), new_object_url, { :class => "btn-success", :icon => 'add', 'data-update' => 'new_prototype', :id => 'new_prototype_link'} %>
6
+ <%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
7
7
  <% end %>
8
8
 
9
9
  <% if @prototypes.any? %>
@@ -19,8 +19,8 @@
19
19
  <tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
20
20
  <td><%= prototype.name %></td>
21
21
  <td class="actions actions-2 text-right">
22
- <%= link_to_edit(prototype, :no_text => true, :class => 'admin_edit_prototype') %>
23
- <%= link_to_delete(prototype, :no_text => true) %>
22
+ <%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') %>
23
+ <%= link_to_delete(prototype, no_text: true) %>
24
24
  </td>
25
25
  </tr>
26
26
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @prototype } %>
1
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @prototype } %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= link_to Spree.t(:prototypes), spree.admin_prototypes_url %> /
@@ -7,7 +7,7 @@
7
7
 
8
8
  <%= form_for [:admin, @prototype] do |f| %>
9
9
  <fieldset data-hook="new_prototype">
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 %>
@@ -5,7 +5,7 @@
5
5
  <% @prototype.option_types.each do |ot| %>
6
6
  <li class="option-type-field">
7
7
  <b>
8
- <%= check_box_tag "option_types[]", ot.id, (params[:option_types] || []).include?(ot.id.to_s), :id => "option_type_#{ot.id}", :class => "option-type" %>
8
+ <%= check_box_tag "option_types[]", ot.id, (params[:option_types] || []).include?(ot.id.to_s), id: "option_type_#{ot.id}", class: "option-type" %>
9
9
  <%= label_tag "option_type_#{ot.id}", ot.presentation %>
10
10
  </b>
11
11
  <ul class="option-type-values">
@@ -5,6 +5,8 @@
5
5
  / <%= Spree.t(:refund) %> <%= @refund.id %>
6
6
  <% end %>
7
7
 
8
+ <%= render 'spree/admin/shared/error_messages', target: @refund %>
9
+
8
10
  <%= form_for [:admin, @refund.payment.order, @refund.payment, @refund] do |f| %>
9
11
  <fieldset>
10
12
  <div data-hook="admin_refund_form_fields">
@@ -5,6 +5,8 @@
5
5
  / <%= Spree.t(:new_refund) %>
6
6
  <% end %>
7
7
 
8
+ <%= render 'spree/admin/shared/error_messages', target: @refund %>
9
+
8
10
  <%= form_for [:admin, @refund.payment.order, @refund.payment, @refund] do |f| %>
9
11
  <fieldset>
10
12
  <div data-hook="admin_refund_form_fields">
@@ -0,0 +1,32 @@
1
+ <div data-hook="admin_reimbursement_type_form_fields" class="row">
2
+ <div class="col-md-8">
3
+ <%= f.field_container :name, class: ['form-group'] do %>
4
+ <%= f.label :name, Spree.t(:name) %>
5
+ <%= f.text_field :name, class:'form-control' %>
6
+ <%= f.error_message_on :name %>
7
+ <% end %>
8
+ </div>
9
+ <%- if @reimbursement_type.new_record? %>
10
+ <div class="col-md-8">
11
+ <%= f.field_container :type, class: ['form-group'] do %>
12
+ <%= f.label :type, Spree.t(:type) %>
13
+ <%= f.select :type, options_for_select(Spree::ReimbursementType::KINDS), {:include_blank => false}, { :class => 'select2' } %>
14
+ <%= f.error_message_on :type %>
15
+ <% end %>
16
+ </div>
17
+ <% end %>
18
+ <div class="col-md-5">
19
+ <%= f.field_container :active, class: ['form-inline'] do %>
20
+ <%= f.check_box :active, class: 'form-control' %>
21
+ <%= f.label :active, Spree.t(:active) %>
22
+ <%= f.error_message_on :active %>
23
+ <% end %>
24
+ </div>
25
+ <div class="col-md-5">
26
+ <%= f.field_container :mutable, class: ['form-inline'] do %>
27
+ <%= f.check_box :mutable, class: 'form-control' %>
28
+ <%= f.label :mutable, Spree.t(:mutable) %>
29
+ <%= f.error_message_on :mutable %>
30
+ <% end %>
31
+ </div>
32
+ </div>
@@ -0,0 +1,11 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:reimbursement_types), spree.admin_reimbursement_types_url %> /
3
+ <%= @reimbursement_type.name %>
4
+ <% end %>
5
+
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @reimbursement_type } %>
7
+
8
+ <%= form_for @reimbursement_type, :url => object_url, :method => :put do |reimbursement_form| %>
9
+ <%= render partial: 'form', locals: { f: reimbursement_form } %>
10
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
11
+ <% end %>
@@ -2,12 +2,17 @@
2
2
  <%= plural_resource_name(Spree::ReimbursementType) %>
3
3
  <% end %>
4
4
 
5
+ <% content_for :page_actions do %>
6
+ <%= button_link_to Spree.t(:new_reimbursement_type), new_object_url, { :class => "btn-success", :icon => 'add', :id => 'admin_new_reimbursement_type' } %>
7
+ <% end if can?(:create, Spree::ReimbursementType) %>
8
+
5
9
  <% if @reimbursement_types.any? %>
6
10
  <table class="table" id='listing_reimbursement_types' data-hook>
7
11
  <thead>
8
12
  <tr data-hook="reimbursement_types_header">
9
13
  <th><%= Spree.t(:name) %></th>
10
14
  <th><%= Spree.t(:type) %></th>
15
+ <th class="actions"></th>
11
16
  </tr>
12
17
  </thead>
13
18
  <tbody>
@@ -19,6 +24,10 @@
19
24
  <td>
20
25
  <%= reimbursement_type.type %>
21
26
  </td>
27
+ <td class="actions actions-2 text-right">
28
+ <%= link_to_edit reimbursement_type, no_text: true, class: 'edit' if can?(:edit, reimbursement_type) %>
29
+ <%= link_to_delete reimbursement_type, no_text: true if can?(:delete, reimbursement_type) %>
30
+ </td>
22
31
  </tr>
23
32
  <% end %>
24
33
  </tbody>
@@ -0,0 +1,11 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:reimbursement_types), spree.admin_reimbursement_types_url %> /
3
+ <%= Spree.t(:new_reimbursement_type) %>
4
+ <% end %>
5
+
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @reimbursement_type } %>
7
+
8
+ <%= form_for [:admin, @reimbursement_type] do |reimbursement_form| %>
9
+ <%= render partial: 'form', locals: { f: reimbursement_form } %>
10
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
11
+ <% end %>
@@ -96,7 +96,7 @@
96
96
  <%= Spree.t(:reimburse) %>
97
97
  <% end %>
98
98
  <span class="or"><%= Spree.t(:or) %></span>
99
- <%= button_link_to Spree.t('actions.cancel'), url_for([:edit, :admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
99
+ <%= button_link_to Spree.t('actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
100
100
  <% end %>
101
101
  </div>
102
102
  </fieldset>
@@ -4,7 +4,7 @@
4
4
  <% end %>
5
5
 
6
6
  <div class="well">
7
- <%= render :partial => 'spree/admin/shared/report_order_criteria' %>
7
+ <%= render partial: 'spree/admin/shared/report_order_criteria' %>
8
8
  </div>
9
9
 
10
10
  <table class="table table-bordered admin-report" data-hook="sales_total">
@@ -10,7 +10,7 @@
10
10
  <% end %>
11
11
  </th>
12
12
  <th><%= Spree.t(:product) %></th>
13
- <th><%= Spree.t(:state) %></th>
13
+ <th><%= Spree.t(:status) %></th>
14
14
  <th><%= Spree.t(:charged) %></th>
15
15
  <th><%= Spree.t(:pre_tax_refund_amount) %></th>
16
16
  <th><%= Spree.t(:reimbursement_type) %></th>
@@ -68,20 +68,20 @@
68
68
  <% end %>
69
69
 
70
70
  <%= f.field_container :stock_location, class: ['form-group'] do %>
71
- <%= f.label :stock_location, Spree.t(:stock_location) %>
71
+ <%= f.label :stock_location, Spree.t(:stock_location) %> <span class="required">*</span>
72
72
  <%= f.select :stock_location_id, Spree::StockLocation.order_default.active.to_a.collect{|l|[l.name, l.id]}, {include_blank: true}, {class: 'select2', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
73
73
  <%= f.error_message_on :stock_location_id %>
74
74
  <% end %>
75
75
 
76
76
  <%= f.field_container :reason, class: ['form-group'] do %>
77
- <%= f.label :reason, Spree.t(:reason) %>
77
+ <%= f.label :reason, Spree.t(:reason) %> <span class="required">*</span>
78
78
  <%= f.select :return_authorization_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: 'select2', "data-placeholder" => Spree.t(:select_a_return_authorization_reason)} %>
79
79
  <%= f.error_message_on :reason %>
80
80
  <% end %>
81
81
 
82
82
  <%= f.field_container :memo, class: ['form-group'] do %>
83
83
  <%= f.label :memo, Spree.t(:memo) %>
84
- <%= f.text_area :memo, :class => 'form-control' %>
84
+ <%= f.text_area :memo, class: 'form-control' %>
85
85
  <%= f.error_message_on :memo %>
86
86
  <% end %>
87
87
  </div>
@@ -57,8 +57,7 @@
57
57
  </table>
58
58
  <% else %>
59
59
  <div class="alert alert-info no-objects-found">
60
- <%= Spree.t(:no_resource_found, resource: Spree::CustomerReturn.model_name.human(count: :many)) %>.
61
- </div>
60
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::CustomerReturn)) %>. </div>
62
61
  <% end %>
63
62
 
64
63
  <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :customer_returns } %>
@@ -7,10 +7,10 @@
7
7
  <%= link_to Spree.t(:all), spree.admin_return_authorizations_path %>
8
8
  </li>
9
9
  <li class="<%= "active" if params[:q][:state_eq] == "authorized" %>">
10
- <%= link_to Spree.t(:authorized), params.merge({q: {state_eq: :authorized}}) %>
10
+ <%= link_to Spree.t(:authorized), params.to_h.merge({q: {state_eq: :authorized}}) %>
11
11
  </li>
12
12
  <li class="<%= "active" if params[:q][:state_eq] == "canceled" %>">
13
- <%= link_to Spree.t(:canceled), params.merge({q: {state_eq: :canceled}}) %>
13
+ <%= link_to Spree.t(:canceled), params.to_h.merge({q: {state_eq: :canceled}}) %>
14
14
  </li>
15
15
  <% end %>
16
16
 
@@ -47,7 +47,7 @@
47
47
  <th><%= Spree.t(:created_at) %></th>
48
48
  <th><%= Spree.t(:number) %></th>
49
49
  <th><%= Spree.t(:order) %></th>
50
- <th><%= Spree.t(:state) %></th>
50
+ <th><%= Spree.t(:status) %></th>
51
51
  <th></th>
52
52
  </tr>
53
53
  </thead>
@@ -69,7 +69,7 @@
69
69
  </table>
70
70
  <% else %>
71
71
  <div class="alert alert-info no-objects-found">
72
- <%= Spree.t(:no_resource_found, resource: Spree::ReturnAuthorization.model_name.human(count: :many)) %>.
72
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::ReturnAuthorization)) %>.
73
73
  </div>
74
74
  <% end %>
75
75
 
@@ -3,7 +3,7 @@
3
3
  <%= @role.name.capitalize %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @role } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @role } %>
7
7
 
8
8
  <%= form_for [:admin, @role] do |f| %>
9
9
  <fieldset>
@@ -3,7 +3,7 @@
3
3
  <%= Spree.t(:new_role) %>
4
4
  <% end %>
5
5
 
6
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @role } %>
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @role } %>
7
7
 
8
8
  <%= form_for [:admin, @role] do |f| %>
9
9
  <fieldset>
@@ -8,8 +8,8 @@
8
8
 
9
9
  <div id="preference-settings" data-hook class="panel-body">
10
10
  <div class="form-group">
11
- <%= f.label(:calculator_type, Spree.t(:calculator), :for => 'calc_type') %>
12
- <%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {:id => 'calc_type', :class => 'select2'}) %>
11
+ <%= f.label(:calculator_type, Spree.t(:calculator), for: 'calc_type') %>
12
+ <%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2'}) %>
13
13
  </div>
14
14
  <% if !@object.new_record? %>
15
15
  <div class="form-group">
@@ -6,4 +6,4 @@
6
6
  show_flash('error', "<%= j error %>");
7
7
  <% end %>
8
8
 
9
- <%= render :partial => '/spree/admin/shared/update_order_state' if @order %>
9
+ <%= render partial: '/spree/admin/shared/update_order_state' if @order %>
@@ -1,5 +1,5 @@
1
1
  <div class="form-actions" data-hook="buttons">
2
- <%= button Spree.t('actions.update'), 'refresh', 'submit', {class: 'btn-success'} %>
2
+ <%= button Spree.t('actions.update'), 'refresh', 'submit', {class: 'btn-success', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
3
3
  <span class="or"><%= Spree.t(:or) %></span>
4
- <%= button_link_to Spree.t('actions.cancel'), collection_url, :icon => 'delete' %>
4
+ <%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'delete' %>
5
5
  </div>
@@ -9,12 +9,13 @@
9
9
  <%= yield :title %>
10
10
  <% else %>
11
11
  <%= "Spree #{Spree.t('administration')}: " %>
12
- <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %>
12
+ <%= Spree.t(controller.controller_name, default: controller.controller_name.titleize) %>
13
13
  <% end %>
14
14
  </title>
15
15
 
16
16
  <%= stylesheet_link_tag 'spree/backend/all', media: :all %>
17
17
 
18
+ <%= render 'spree/shared/paths' %>
18
19
  <%= javascript_include_tag 'spree/backend/all' %>
19
20
  <%= render "spree/admin/shared/translations" %>
20
21
 
@@ -1,6 +1,4 @@
1
- <% admin = try_spree_current_user.try(:has_spree_role?, "admin") %>
2
-
3
- <header class="header <%= admin ? "logged-in" : "logged-out" %>">
1
+ <header class="header logged-in">
4
2
 
5
3
  <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
6
4
  <div class="container-fluid">
@@ -11,20 +9,15 @@
11
9
  spree.admin_path,
12
10
  class: "logo navbar-brand"
13
11
  ) %>
14
- <% if admin %>
15
12
  <span class="navbar-toggle" id="sidebar-toggle">
16
13
  <span class="icon-bar"></span>
17
14
  <span class="icon-bar"></span>
18
15
  <span class="icon-bar"></span>
19
16
  </span>
20
- <% end %>
21
17
  </div>
22
-
23
- <% if admin %>
24
- <div class="col-sm-9 col-md-10">
25
- <div class="navbar-right" data-hook="admin_login_navigation_bar"></div>
26
- </div>
27
- <% end %>
18
+ <div class="col-sm-9 col-md-10">
19
+ <div class="navbar-right" data-hook="admin_login_navigation_bar"></div>
20
+ </div>
28
21
  </div>
29
22
  </div>
30
23
  </nav>
@@ -1,7 +1,7 @@
1
1
  <% args = params.clone %>
2
2
 
3
3
  <% if defined?(per_page_action) %>
4
- <% args.merge!(action: per_page_action) %>
4
+ <% args[:action] = per_page_action %>
5
5
  <% end %>
6
6
 
7
7
  <div class="row index-pagination-row">
@@ -39,3 +39,9 @@
39
39
  <%= main_menu_tree Spree.t(:configurations), icon: "wrench", sub_menu: "configuration", url: "#sidebar-configuration" %>
40
40
  </ul>
41
41
  <% end %>
42
+
43
+ <% if can? :admin, current_store && Spree::Config[:admin_show_version] %>
44
+ <div class="spree-version hidden-xs hidden-sm">
45
+ <%= Spree.version %>
46
+ </div>
47
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="form-actions" data-hook="buttons">
2
- <%= button Spree.t('actions.create'), 'ok', 'submit', {class: 'btn-success'} %>
2
+ <%= button Spree.t('actions.create'), 'ok', 'submit', {class: 'btn-success', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
3
3
  <span class="or"><%= Spree.t(:or) %></span>
4
- <%= button_link_to Spree.t('actions.cancel'), collection_url, :icon => 'remove' %>
4
+ <%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'remove' %>
5
5
  </div>
@@ -11,7 +11,7 @@
11
11
  </td>
12
12
  <td>
13
13
  <span class="state label label-<%= @order.state %>">
14
- <%= Spree.t(@order.state, :scope => :order_state) %>
14
+ <%= Spree.t(@order.state, scope: :order_state) %>
15
15
  </span>
16
16
  </td>
17
17
  </tr>
@@ -71,7 +71,7 @@
71
71
  </td>
72
72
  <td id='shipment_status'>
73
73
  <span class="state label label-<%= @order.shipment_state %>">
74
- <%= Spree.t(@order.shipment_state, :scope => :shipment_states, :default => [:missing, "none"]) %>
74
+ <%= Spree.t(@order.shipment_state, scope: :shipment_states, default: [:missing, "none"]) %>
75
75
  </span>
76
76
  </td>
77
77
  </tr>
@@ -81,7 +81,7 @@
81
81
  </td>
82
82
  <td id='payment_status'>
83
83
  <span class="state label label-<%= @order.payment_state %>">
84
- <%= Spree.t(@order.payment_state, :scope => :payment_states, :default => [:missing, "none"]) %>
84
+ <%= Spree.t(@order.payment_state, scope: :payment_states, default: [:missing, "none"]) %>
85
85
  </span>
86
86
  </td>
87
87
  </tr>
@@ -23,7 +23,7 @@
23
23
  <td><%= truncate(refund.reason.name, length: 100) %></td>
24
24
  <% if show_actions %>
25
25
  <td class="actions actions-1">
26
- <%= link_to_with_icon('edit', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, :class => "btn btn-default btn-sm") if can?(:edit, refund) %>
26
+ <%= link_to_with_icon('edit', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, class: "btn btn-default btn-sm") if can?(:edit, refund) %>
27
27
  </td>
28
28
  <% end %>
29
29
  </tr>
@@ -1,12 +1,12 @@
1
- <%= search_form_for @search, :url => spree.sales_total_admin_reports_path do |s| %>
1
+ <%= search_form_for @search, url: spree.sales_total_admin_reports_path do |s| %>
2
2
  <div class="form-group date-range-filter">
3
3
  <%= label_tag nil, Spree.t(:date_range) %>
4
4
  <div class="date-range-filter row">
5
5
  <div class="col-md-6">
6
- <%= s.text_field :completed_at_gt, :class => 'datepicker datepicker-from form-control', :value => datepicker_field_value(params[:q][:completed_at_gt]) %>
6
+ <%= s.text_field :completed_at_gt, class: 'datepicker datepicker-from form-control', value: datepicker_field_value(params[:q][:completed_at_gt]) %>
7
7
  </div>
8
8
  <div class="col-md-6">
9
- <%= s.text_field :completed_at_lt, :class => 'datepicker datepicker-to form-control', :value => datepicker_field_value(params[:q][:completed_at_lt]) %>
9
+ <%= s.text_field :completed_at_lt, class: 'datepicker datepicker-to form-control', value: datepicker_field_value(params[:q][:completed_at_lt]) %>
10
10
  </div>
11
11
  </div>
12
12
  </div>
@@ -1,44 +1,44 @@
1
1
  <script>
2
2
  Spree.translations = <%==
3
- { :date_picker => Spree.t(:js_format,
4
- :scope => 'date_picker',
5
- :default => 'yy/mm/dd'),
6
- :abbr_day_names => I18n.t(:abbr_day_names, :scope => :date),
7
- :add => Spree.t(:add),
8
- :are_you_sure_delete => Spree.t(:are_you_sure_delete),
9
- :bill_address => Spree.t(:bill_address),
10
- :choose_a_customer => Spree.t(:choose_a_customer),
11
- :confirm_delete => Spree.t(:confirm_delete),
12
- :cut => Spree.t(:cut),
13
- :destroy => Spree.t(:destroy, :scope => :actions),
14
- :edit => Spree.t(:edit, :scope => :actions),
15
- :save => Spree.t(:save, :scope => :actions),
16
- :cancel => Spree.t(:cancel, :scope => :actions),
17
- :first_day => Spree.t(:first_day,
18
- :scope => 'date_picker',
19
- :default => 0).to_i,
20
- :find_a_taxon => Spree.t(:find_a_taxon),
21
- :item_stock_placeholder => Spree.t(:choose_location),
22
- :loading => Spree.t(:loading),
23
- :month_names => I18n.t(:month_names, :scope => :date).instance_eval {|o|
3
+ { abbr_day_names: I18n.t(:abbr_day_names, scope: :date),
4
+ add: Spree.t(:add),
5
+ are_you_sure_delete: Spree.t(:are_you_sure_delete),
6
+ bill_address: Spree.t(:bill_address),
7
+ cancel: Spree.t(:cancel, scope: :actions),
8
+ choose_a_customer: Spree.t(:choose_a_customer),
9
+ confirm_delete: Spree.t(:confirm_delete),
10
+ currency_separator: I18n.t('number.currency.format.separator'),
11
+ cut: Spree.t(:cut),
12
+ date_picker: Spree.t(:js_format, scope: 'date_picker', default: 'yy/mm/dd'),
13
+ destroy: Spree.t(:destroy, scope: :actions),
14
+ edit: Spree.t(:edit, scope: :actions),
15
+ first_day: Spree.t(:first_day, scope: 'date_picker', default: 0).to_i,
16
+ find_a_taxon: Spree.t(:find_a_taxon),
17
+ item_stock_placeholder: Spree.t(:choose_location),
18
+ loading: Spree.t(:loading),
19
+ month_names: I18n.t(:month_names, scope: :date).instance_eval {|o|
24
20
  o.try(:reject, &:blank?) || o},
25
- :more => Spree.t(:more),
26
- :name => Spree.t(:name),
27
- :next => Spree.t(:next),
28
- :no_results => Spree.t(:no_results),
29
- :option_type_placeholder => Spree.t(:option_type_placeholder),
30
- :paste => Spree.t(:paste),
31
- :previous => Spree.t(:previous),
32
- :remove => Spree.t(:remove),
33
- :rename => Spree.t(:rename),
34
- :searching => Spree.t(:searching),
35
- :sku => Spree.t(:sku),
36
- :type_to_search => Spree.t(:type_to_search),
37
- :taxon_placeholder => Spree.t(:taxon_placeholder),
38
- :variant_placeholder => Spree.t(:variant_placeholder),
39
- :value => Spree.t(:value),
40
- :currency_separator => I18n.t('number.currency.format.separator'),
41
-
21
+ more: Spree.t(:more),
22
+ name: Spree.t(:name),
23
+ new_taxon: Spree.t(:new_taxon),
24
+ next: Spree.t(:next),
25
+ no_results: Spree.t(:no_results),
26
+ option_type_placeholder: Spree.t(:option_type_placeholder),
27
+ paste: Spree.t(:paste),
28
+ previous: Spree.t(:previous),
29
+ remove: Spree.t(:remove),
30
+ rename: Spree.t(:rename),
31
+ save: Spree.t(:save, scope: :actions),
32
+ searching: Spree.t(:searching),
33
+ server_error: Spree.t(:server_error),
34
+ sku: Spree.t(:sku),
35
+ type_to_search: Spree.t(:type_to_search),
36
+ taxon_placeholder: Spree.t(:taxon_placeholder),
37
+ taxonomy_tree_error: Spree.t(:taxonomy_tree_error),
38
+ tags_placeholder: Spree.t(:tags_placeholder),
39
+ tracking: Spree.t(:tracking),
40
+ variant_placeholder: Spree.t(:variant_placeholder),
41
+ value: Spree.t(:value)
42
42
  }.to_json
43
43
  %>
44
44
  </script>
@@ -1,7 +1,7 @@
1
- $('#order_tab_summary h5#order_status').html('<%= j Spree.t(:status) %>: <%= j Spree.t(@order.state, :scope => :order_state) %>');
1
+ $('#order_tab_summary h5#order_status').html('<%= j Spree.t(:status) %>: <%= j Spree.t(@order.state, scope: :order_state) %>');
2
2
  $('#order_tab_summary h5#order_total').html('<%= j Spree.t(:total) %>: <%= j @order.display_total.to_html %>');
3
3
 
4
4
  <% if @order.completed? %>
5
- $('#order_tab_summary h5#payment_status').html('<%= j Spree.t(:payment) %>: <%= j Spree.t(@order.payment_state, :scope => :payment_states, :default => [:missing, "none"]) %>');
6
- $('#order_tab_summary h5#shipment_status').html('<%= j Spree.t(:shipment) %>: <%= j Spree.t(@order.shipment_state, :scope => :shipment_state, :default => [:missing, "none"]) %>');
5
+ $('#order_tab_summary h5#payment_status').html('<%= j Spree.t(:payment) %>: <%= j Spree.t(@order.payment_state, scope: :payment_states, default: [:missing, "none"]) %>');
6
+ $('#order_tab_summary h5#shipment_status').html('<%= j Spree.t(:shipment) %>: <%= j Spree.t(@order.shipment_state, scope: :shipment_state, default: [:missing, "none"]) %>');
7
7
  <% end %>