goca-spree-backend 3.1.14.rails.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -0
  3. data/Rakefile +15 -0
  4. data/app/assets/images/admin/payment_banner.png +0 -0
  5. data/app/assets/images/admin/progress.gif +0 -0
  6. data/app/assets/images/credit_cards/credit_card.gif +0 -0
  7. data/app/assets/javascripts/spree/backend/address_states.js +33 -0
  8. data/app/assets/javascripts/spree/backend/adjustments.js.coffee +17 -0
  9. data/app/assets/javascripts/spree/backend/admin.js +402 -0
  10. data/app/assets/javascripts/spree/backend/calculator.js +16 -0
  11. data/app/assets/javascripts/spree/backend/checkouts/edit.js +89 -0
  12. data/app/assets/javascripts/spree/backend/gateway.js +13 -0
  13. data/app/assets/javascripts/spree/backend/general_settings.js.coffee +13 -0
  14. data/app/assets/javascripts/spree/backend/handlebar_extensions.js +7 -0
  15. data/app/assets/javascripts/spree/backend/line_items.js.coffee +64 -0
  16. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +49 -0
  17. data/app/assets/javascripts/spree/backend/nested-attribute.js +27 -0
  18. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +43 -0
  19. data/app/assets/javascripts/spree/backend/option_value_picker.js +45 -0
  20. data/app/assets/javascripts/spree/backend/orders/edit.js +5 -0
  21. data/app/assets/javascripts/spree/backend/orders/edit_form.js +21 -0
  22. data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +145 -0
  23. data/app/assets/javascripts/spree/backend/payments/new.js +50 -0
  24. data/app/assets/javascripts/spree/backend/product_picker.js +49 -0
  25. data/app/assets/javascripts/spree/backend/progress.js.coffee +6 -0
  26. data/app/assets/javascripts/spree/backend/promotions.js +170 -0
  27. data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.coffee +4 -0
  28. data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +35 -0
  29. data/app/assets/javascripts/spree/backend/shipments.js.erb +334 -0
  30. data/app/assets/javascripts/spree/backend/spree-select2.js +7 -0
  31. data/app/assets/javascripts/spree/backend/states.js +11 -0
  32. data/app/assets/javascripts/spree/backend/stock_management.js.coffee +9 -0
  33. data/app/assets/javascripts/spree/backend/stock_movement.js.coffee +19 -0
  34. data/app/assets/javascripts/spree/backend/stock_transfer.js.coffee +198 -0
  35. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +52 -0
  36. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee +22 -0
  37. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +149 -0
  38. data/app/assets/javascripts/spree/backend/taxons.js.coffee +87 -0
  39. data/app/assets/javascripts/spree/backend/user_picker.js +40 -0
  40. data/app/assets/javascripts/spree/backend/variant_autocomplete.js.coffee +38 -0
  41. data/app/assets/javascripts/spree/backend/variant_management.js.coffee +10 -0
  42. data/app/assets/javascripts/spree/backend/zone.js.coffee +43 -0
  43. data/app/assets/javascripts/spree/backend.js +79 -0
  44. data/app/assets/javascripts/spree/frontend/backend.js +1 -0
  45. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +37 -0
  46. data/app/assets/stylesheets/spree/backend/components/_filters.scss +26 -0
  47. data/app/assets/stylesheets/spree/backend/components/_icons.scss +257 -0
  48. data/app/assets/stylesheets/spree/backend/components/_labels.scss +53 -0
  49. data/app/assets/stylesheets/spree/backend/components/_main.scss +11 -0
  50. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +14 -0
  51. data/app/assets/stylesheets/spree/backend/components/_page_header.scss +32 -0
  52. data/app/assets/stylesheets/spree/backend/components/_panels.scss +3 -0
  53. data/app/assets/stylesheets/spree/backend/components/_progress.scss +22 -0
  54. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +122 -0
  55. data/app/assets/stylesheets/spree/backend/components/_spinner.scss +95 -0
  56. data/app/assets/stylesheets/spree/backend/components/_tables.scss +56 -0
  57. data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +70 -0
  58. data/app/assets/stylesheets/spree/backend/components/_variables.scss +12 -0
  59. data/app/assets/stylesheets/spree/backend/components/_wells.scss +3 -0
  60. data/app/assets/stylesheets/spree/backend/global/_variables.scss +37 -0
  61. data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +109 -0
  62. data/app/assets/stylesheets/spree/backend/plugins/_js_tree.scss +0 -0
  63. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +127 -0
  64. data/app/assets/stylesheets/spree/backend/sections/_account.scss +16 -0
  65. data/app/assets/stylesheets/spree/backend/shared/_base.scss +25 -0
  66. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +59 -0
  67. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +5 -0
  68. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +28 -0
  69. data/app/assets/stylesheets/spree/backend.css +11 -0
  70. data/app/assets/stylesheets/spree/frontend/backend.css +1 -0
  71. data/app/controllers/spree/admin/adjustments_controller.rb +38 -0
  72. data/app/controllers/spree/admin/base_controller.rb +67 -0
  73. data/app/controllers/spree/admin/countries_controller.rb +11 -0
  74. data/app/controllers/spree/admin/customer_returns_controller.rb +68 -0
  75. data/app/controllers/spree/admin/general_settings_controller.rb +40 -0
  76. data/app/controllers/spree/admin/images_controller.rb +50 -0
  77. data/app/controllers/spree/admin/log_entries_controller.rb +19 -0
  78. data/app/controllers/spree/admin/option_types_controller.rb +48 -0
  79. data/app/controllers/spree/admin/option_values_controller.rb +11 -0
  80. data/app/controllers/spree/admin/orders/customer_details_controller.rb +74 -0
  81. data/app/controllers/spree/admin/orders_controller.rb +147 -0
  82. data/app/controllers/spree/admin/payment_methods_controller.rb +72 -0
  83. data/app/controllers/spree/admin/payments_controller.rb +103 -0
  84. data/app/controllers/spree/admin/product_properties_controller.rb +18 -0
  85. data/app/controllers/spree/admin/products_controller.rb +156 -0
  86. data/app/controllers/spree/admin/promotion_actions_controller.rb +45 -0
  87. data/app/controllers/spree/admin/promotion_categories_controller.rb +6 -0
  88. data/app/controllers/spree/admin/promotion_rules_controller.rb +50 -0
  89. data/app/controllers/spree/admin/promotions_controller.rb +36 -0
  90. data/app/controllers/spree/admin/properties_controller.rb +23 -0
  91. data/app/controllers/spree/admin/prototypes_controller.rb +27 -0
  92. data/app/controllers/spree/admin/refund_reasons_controller.rb +6 -0
  93. data/app/controllers/spree/admin/refunds_controller.rb +38 -0
  94. data/app/controllers/spree/admin/reimbursement_types_controller.rb +6 -0
  95. data/app/controllers/spree/admin/reimbursements_controller.rb +45 -0
  96. data/app/controllers/spree/admin/reports_controller.rb +65 -0
  97. data/app/controllers/spree/admin/resource_controller.rb +260 -0
  98. data/app/controllers/spree/admin/return_authorization_reasons_controller.rb +6 -0
  99. data/app/controllers/spree/admin/return_authorizations_controller.rb +51 -0
  100. data/app/controllers/spree/admin/return_index_controller.rb +28 -0
  101. data/app/controllers/spree/admin/return_items_controller.rb +9 -0
  102. data/app/controllers/spree/admin/roles_controller.rb +6 -0
  103. data/app/controllers/spree/admin/root_controller.rb +18 -0
  104. data/app/controllers/spree/admin/search_controller.rb +41 -0
  105. data/app/controllers/spree/admin/shipping_categories_controller.rb +6 -0
  106. data/app/controllers/spree/admin/shipping_methods_controller.rb +46 -0
  107. data/app/controllers/spree/admin/state_changes_controller.rb +18 -0
  108. data/app/controllers/spree/admin/states_controller.rb +29 -0
  109. data/app/controllers/spree/admin/stock_items_controller.rb +51 -0
  110. data/app/controllers/spree/admin/stock_locations_controller.rb +16 -0
  111. data/app/controllers/spree/admin/stock_movements_controller.rb +39 -0
  112. data/app/controllers/spree/admin/stock_transfers_controller.rb +51 -0
  113. data/app/controllers/spree/admin/store_credit_categories_controller.rb +6 -0
  114. data/app/controllers/spree/admin/store_credits_controller.rb +94 -0
  115. data/app/controllers/spree/admin/tax_categories_controller.rb +6 -0
  116. data/app/controllers/spree/admin/tax_rates_controller.rb +15 -0
  117. data/app/controllers/spree/admin/taxonomies_controller.rb +15 -0
  118. data/app/controllers/spree/admin/taxons_controller.rb +126 -0
  119. data/app/controllers/spree/admin/trackers_controller.rb +6 -0
  120. data/app/controllers/spree/admin/users_controller.rb +145 -0
  121. data/app/controllers/spree/admin/variants_controller.rb +57 -0
  122. data/app/controllers/spree/admin/variants_including_master_controller.rb +16 -0
  123. data/app/controllers/spree/admin/zones_controller.rb +26 -0
  124. data/app/helpers/spree/admin/adjustments_helper.rb +37 -0
  125. data/app/helpers/spree/admin/base_helper.rb +157 -0
  126. data/app/helpers/spree/admin/customer_returns_helper.rb +9 -0
  127. data/app/helpers/spree/admin/general_settings_helper.rb +13 -0
  128. data/app/helpers/spree/admin/images_helper.rb +18 -0
  129. data/app/helpers/spree/admin/inventory_settings_helper.rb +9 -0
  130. data/app/helpers/spree/admin/navigation_helper.rb +248 -0
  131. data/app/helpers/spree/admin/orders_helper.rb +69 -0
  132. data/app/helpers/spree/admin/payments_helper.rb +11 -0
  133. data/app/helpers/spree/admin/products_helper.rb +29 -0
  134. data/app/helpers/spree/admin/reimbursement_type_helper.rb +9 -0
  135. data/app/helpers/spree/admin/reimbursements_helper.rb +14 -0
  136. data/app/helpers/spree/admin/stock_locations_helper.rb +15 -0
  137. data/app/helpers/spree/admin/stock_movements_helper.rb +24 -0
  138. data/app/helpers/spree/admin/tables_helper.rb +15 -0
  139. data/app/helpers/spree/admin/taxons_helper.rb +9 -0
  140. data/app/helpers/spree/promotion_rules_helper.rb +13 -0
  141. data/app/models/spree/admin/resource.rb +35 -0
  142. data/app/models/spree/backend_configuration.rb +21 -0
  143. data/app/views/kaminari/_first_page.html.erb +11 -0
  144. data/app/views/kaminari/_gap.html.erb +8 -0
  145. data/app/views/kaminari/_last_page.html.erb +11 -0
  146. data/app/views/kaminari/_next_page.html.erb +15 -0
  147. data/app/views/kaminari/_page.html.erb +12 -0
  148. data/app/views/kaminari/_paginator.html.erb +23 -0
  149. data/app/views/kaminari/_prev_page.html.erb +15 -0
  150. data/app/views/spree/admin/adjustments/_adjustment.html.erb +17 -0
  151. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +31 -0
  152. data/app/views/spree/admin/adjustments/_form.html.erb +12 -0
  153. data/app/views/spree/admin/adjustments/edit.html.erb +19 -0
  154. data/app/views/spree/admin/adjustments/index.html.erb +34 -0
  155. data/app/views/spree/admin/adjustments/new.html.erb +19 -0
  156. data/app/views/spree/admin/countries/_form.html.erb +20 -0
  157. data/app/views/spree/admin/countries/edit.html.erb +14 -0
  158. data/app/views/spree/admin/countries/index.html.erb +31 -0
  159. data/app/views/spree/admin/countries/new.html.erb +13 -0
  160. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +36 -0
  161. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +50 -0
  162. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +45 -0
  163. data/app/views/spree/admin/customer_returns/edit.html.erb +61 -0
  164. data/app/views/spree/admin/customer_returns/index.html.erb +56 -0
  165. data/app/views/spree/admin/customer_returns/new.html.erb +47 -0
  166. data/app/views/spree/admin/general_settings/edit.html.erb +143 -0
  167. data/app/views/spree/admin/images/_form.html.erb +18 -0
  168. data/app/views/spree/admin/images/edit.html.erb +30 -0
  169. data/app/views/spree/admin/images/index.html.erb +55 -0
  170. data/app/views/spree/admin/images/new.html.erb +19 -0
  171. data/app/views/spree/admin/inventory_units/adjust.html.erb +29 -0
  172. data/app/views/spree/admin/log_entries/index.html.erb +33 -0
  173. data/app/views/spree/admin/option_types/_form.html.erb +17 -0
  174. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +9 -0
  175. data/app/views/spree/admin/option_types/edit.html.erb +49 -0
  176. data/app/views/spree/admin/option_types/index.html.erb +44 -0
  177. data/app/views/spree/admin/option_types/new.html.erb +13 -0
  178. data/app/views/spree/admin/orders/_add_line_item.html.erb +17 -0
  179. data/app/views/spree/admin/orders/_add_product.html.erb +18 -0
  180. data/app/views/spree/admin/orders/_adjustments.html.erb +33 -0
  181. data/app/views/spree/admin/orders/_form.html.erb +56 -0
  182. data/app/views/spree/admin/orders/_line_item.html.erb +21 -0
  183. data/app/views/spree/admin/orders/_line_items.html.erb +46 -0
  184. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +39 -0
  185. data/app/views/spree/admin/orders/_order_actions.html.erb +12 -0
  186. data/app/views/spree/admin/orders/_risk_analysis.html.erb +47 -0
  187. data/app/views/spree/admin/orders/_shipment.html.erb +108 -0
  188. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +42 -0
  189. data/app/views/spree/admin/orders/cart.html.erb +31 -0
  190. data/app/views/spree/admin/orders/customer_details/_form.html.erb +106 -0
  191. data/app/views/spree/admin/orders/customer_details/edit.html.erb +29 -0
  192. data/app/views/spree/admin/orders/edit.html.erb +35 -0
  193. data/app/views/spree/admin/orders/index.html.erb +226 -0
  194. data/app/views/spree/admin/payment_methods/_form.html.erb +56 -0
  195. data/app/views/spree/admin/payment_methods/edit.html.erb +13 -0
  196. data/app/views/spree/admin/payment_methods/index.html.erb +46 -0
  197. data/app/views/spree/admin/payment_methods/new.html.erb +13 -0
  198. data/app/views/spree/admin/payments/_capture_events.html.erb +19 -0
  199. data/app/views/spree/admin/payments/_form.html.erb +33 -0
  200. data/app/views/spree/admin/payments/_list.html.erb +38 -0
  201. data/app/views/spree/admin/payments/credit.html.erb +18 -0
  202. data/app/views/spree/admin/payments/index.html.erb +38 -0
  203. data/app/views/spree/admin/payments/new.html.erb +25 -0
  204. data/app/views/spree/admin/payments/show.html.erb +28 -0
  205. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +56 -0
  206. data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +9 -0
  207. data/app/views/spree/admin/payments/source_views/_check.html.erb +0 -0
  208. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +21 -0
  209. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +29 -0
  210. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +19 -0
  211. data/app/views/spree/admin/product_properties/index.html.erb +43 -0
  212. data/app/views/spree/admin/products/_add_stock_form.html.erb +42 -0
  213. data/app/views/spree/admin/products/_autocomplete.js.erb +25 -0
  214. data/app/views/spree/admin/products/_form.html.erb +224 -0
  215. data/app/views/spree/admin/products/_properties_form.erb +10 -0
  216. data/app/views/spree/admin/products/edit.html.erb +15 -0
  217. data/app/views/spree/admin/products/index.html.erb +91 -0
  218. data/app/views/spree/admin/products/new.html.erb +89 -0
  219. data/app/views/spree/admin/products/stock.html.erb +78 -0
  220. data/app/views/spree/admin/promotion_actions/create.js.erb +12 -0
  221. data/app/views/spree/admin/promotion_actions/destroy.js.erb +1 -0
  222. data/app/views/spree/admin/promotion_categories/_form.html.erb +11 -0
  223. data/app/views/spree/admin/promotion_categories/edit.html.erb +11 -0
  224. data/app/views/spree/admin/promotion_categories/index.html.erb +34 -0
  225. data/app/views/spree/admin/promotion_categories/new.html.erb +11 -0
  226. data/app/views/spree/admin/promotion_rules/create.js.erb +10 -0
  227. data/app/views/spree/admin/promotion_rules/destroy.js.erb +3 -0
  228. data/app/views/spree/admin/promotions/_actions.html.erb +35 -0
  229. data/app/views/spree/admin/promotions/_form.html.erb +60 -0
  230. data/app/views/spree/admin/promotions/_promotion_action.html.erb +12 -0
  231. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +11 -0
  232. data/app/views/spree/admin/promotions/_rules.html.erb +46 -0
  233. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +30 -0
  234. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +28 -0
  235. data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +25 -0
  236. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +10 -0
  237. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +42 -0
  238. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +42 -0
  239. data/app/views/spree/admin/promotions/edit.html.erb +30 -0
  240. data/app/views/spree/admin/promotions/index.html.erb +82 -0
  241. data/app/views/spree/admin/promotions/new.html.erb +11 -0
  242. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +12 -0
  243. data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +9 -0
  244. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +42 -0
  245. data/app/views/spree/admin/promotions/rules/_product.html.erb +10 -0
  246. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +10 -0
  247. data/app/views/spree/admin/promotions/rules/_user.html.erb +6 -0
  248. data/app/views/spree/admin/properties/_form.html.erb +16 -0
  249. data/app/views/spree/admin/properties/edit.html.erb +13 -0
  250. data/app/views/spree/admin/properties/index.html.erb +68 -0
  251. data/app/views/spree/admin/properties/new.html.erb +15 -0
  252. data/app/views/spree/admin/prototypes/_form.html.erb +28 -0
  253. data/app/views/spree/admin/prototypes/_prototypes.html.erb +21 -0
  254. data/app/views/spree/admin/prototypes/available.js.erb +2 -0
  255. data/app/views/spree/admin/prototypes/edit.html.erb +13 -0
  256. data/app/views/spree/admin/prototypes/index.html.erb +34 -0
  257. data/app/views/spree/admin/prototypes/new.html.erb +13 -0
  258. data/app/views/spree/admin/prototypes/select.js.erb +4 -0
  259. data/app/views/spree/admin/prototypes/show.html.erb +39 -0
  260. data/app/views/spree/admin/refund_reasons/destroy.js.erb +1 -0
  261. data/app/views/spree/admin/refund_reasons/edit.html.erb +3 -0
  262. data/app/views/spree/admin/refund_reasons/index.html.erb +6 -0
  263. data/app/views/spree/admin/refund_reasons/new.html.erb +4 -0
  264. data/app/views/spree/admin/refunds/edit.html.erb +27 -0
  265. data/app/views/spree/admin/refunds/new.html.erb +35 -0
  266. data/app/views/spree/admin/reimbursement_types/index.html.erb +30 -0
  267. data/app/views/spree/admin/reimbursements/edit.html.erb +102 -0
  268. data/app/views/spree/admin/reimbursements/index.html.erb +28 -0
  269. data/app/views/spree/admin/reimbursements/show.html.erb +90 -0
  270. data/app/views/spree/admin/reports/index.html.erb +20 -0
  271. data/app/views/spree/admin/reports/sales_total.html.erb +29 -0
  272. data/app/views/spree/admin/return_authorization_reasons/destroy.js.erb +1 -0
  273. data/app/views/spree/admin/return_authorization_reasons/edit.html.erb +3 -0
  274. data/app/views/spree/admin/return_authorization_reasons/index.html.erb +6 -0
  275. data/app/views/spree/admin/return_authorization_reasons/new.html.erb +4 -0
  276. data/app/views/spree/admin/return_authorizations/_form.html.erb +91 -0
  277. data/app/views/spree/admin/return_authorizations/edit.html.erb +26 -0
  278. data/app/views/spree/admin/return_authorizations/index.html.erb +53 -0
  279. data/app/views/spree/admin/return_authorizations/new.html.erb +18 -0
  280. data/app/views/spree/admin/return_index/customer_returns.html.erb +64 -0
  281. data/app/views/spree/admin/return_index/return_authorizations.html.erb +76 -0
  282. data/app/views/spree/admin/roles/_form.html.erb +9 -0
  283. data/app/views/spree/admin/roles/edit.html.erb +13 -0
  284. data/app/views/spree/admin/roles/index.html.erb +34 -0
  285. data/app/views/spree/admin/roles/new.html.erb +13 -0
  286. data/app/views/spree/admin/search/products.rabl +9 -0
  287. data/app/views/spree/admin/search/users.rabl +30 -0
  288. data/app/views/spree/admin/shared/_address.html.erb +38 -0
  289. data/app/views/spree/admin/shared/_address_form.html.erb +78 -0
  290. data/app/views/spree/admin/shared/_calculator_fields.html.erb +27 -0
  291. data/app/views/spree/admin/shared/_content_header.html.erb +26 -0
  292. data/app/views/spree/admin/shared/_destroy.js.erb +9 -0
  293. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +5 -0
  294. data/app/views/spree/admin/shared/_error_messages.html.erb +12 -0
  295. data/app/views/spree/admin/shared/_head.html.erb +26 -0
  296. data/app/views/spree/admin/shared/_header.html.erb +32 -0
  297. data/app/views/spree/admin/shared/_index_table_options.html.erb +19 -0
  298. data/app/views/spree/admin/shared/_main_menu.html.erb +41 -0
  299. data/app/views/spree/admin/shared/_new_resource_links.html.erb +5 -0
  300. data/app/views/spree/admin/shared/_order_summary.html.erb +121 -0
  301. data/app/views/spree/admin/shared/_order_tabs.html.erb +60 -0
  302. data/app/views/spree/admin/shared/_product_tabs.html.erb +24 -0
  303. data/app/views/spree/admin/shared/_refunds.html.erb +32 -0
  304. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +17 -0
  305. data/app/views/spree/admin/shared/_sidebar.html.erb +5 -0
  306. data/app/views/spree/admin/shared/_table_filter.html.erb +24 -0
  307. data/app/views/spree/admin/shared/_translations.html.erb +48 -0
  308. data/app/views/spree/admin/shared/_update_order_state.js +7 -0
  309. data/app/views/spree/admin/shared/named_types/_edit.html.erb +13 -0
  310. data/app/views/spree/admin/shared/named_types/_form.html.erb +13 -0
  311. data/app/views/spree/admin/shared/named_types/_index.html.erb +42 -0
  312. data/app/views/spree/admin/shared/named_types/_new.html.erb +13 -0
  313. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +23 -0
  314. data/app/views/spree/admin/shared/sub_menu/_product.html.erb +8 -0
  315. data/app/views/spree/admin/shared/sub_menu/_promotion.html.erb +4 -0
  316. data/app/views/spree/admin/shared/sub_menu/_returns.html.erb +4 -0
  317. data/app/views/spree/admin/shipping_categories/_form.html.erb +9 -0
  318. data/app/views/spree/admin/shipping_categories/edit.html.erb +11 -0
  319. data/app/views/spree/admin/shipping_categories/index.html.erb +34 -0
  320. data/app/views/spree/admin/shipping_categories/new.html.erb +13 -0
  321. data/app/views/spree/admin/shipping_methods/_form.html.erb +119 -0
  322. data/app/views/spree/admin/shipping_methods/edit.html.erb +17 -0
  323. data/app/views/spree/admin/shipping_methods/index.html.erb +40 -0
  324. data/app/views/spree/admin/shipping_methods/new.html.erb +20 -0
  325. data/app/views/spree/admin/state_changes/index.html.erb +42 -0
  326. data/app/views/spree/admin/states/_form.html.erb +15 -0
  327. data/app/views/spree/admin/states/_state_list.html.erb +26 -0
  328. data/app/views/spree/admin/states/edit.html.erb +13 -0
  329. data/app/views/spree/admin/states/index.html.erb +18 -0
  330. data/app/views/spree/admin/states/new.html.erb +13 -0
  331. data/app/views/spree/admin/states/new.js.erb +2 -0
  332. data/app/views/spree/admin/stock_items/destroy.js.erb +1 -0
  333. data/app/views/spree/admin/stock_locations/_form.html.erb +95 -0
  334. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +39 -0
  335. data/app/views/spree/admin/stock_locations/edit.html.erb +13 -0
  336. data/app/views/spree/admin/stock_locations/index.html.erb +41 -0
  337. data/app/views/spree/admin/stock_locations/new.html.erb +13 -0
  338. data/app/views/spree/admin/stock_movements/_form.html.erb +12 -0
  339. data/app/views/spree/admin/stock_movements/edit.html.erb +17 -0
  340. data/app/views/spree/admin/stock_movements/index.html.erb +43 -0
  341. data/app/views/spree/admin/stock_movements/new.html.erb +14 -0
  342. data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +22 -0
  343. data/app/views/spree/admin/stock_transfers/index.html.erb +82 -0
  344. data/app/views/spree/admin/stock_transfers/new.html.erb +107 -0
  345. data/app/views/spree/admin/stock_transfers/show.html.erb +44 -0
  346. data/app/views/spree/admin/store_credit_categories/_form.html.erb +9 -0
  347. data/app/views/spree/admin/store_credit_categories/edit.html.erb +13 -0
  348. data/app/views/spree/admin/store_credit_categories/index.html.erb +34 -0
  349. data/app/views/spree/admin/store_credit_categories/new.html.erb +13 -0
  350. data/app/views/spree/admin/store_credits/_form.html.erb +18 -0
  351. data/app/views/spree/admin/store_credits/edit.html.erb +14 -0
  352. data/app/views/spree/admin/store_credits/index.html.erb +46 -0
  353. data/app/views/spree/admin/store_credits/new.html.erb +14 -0
  354. data/app/views/spree/admin/tax_categories/_form.html.erb +24 -0
  355. data/app/views/spree/admin/tax_categories/edit.html.erb +13 -0
  356. data/app/views/spree/admin/tax_categories/index.html.erb +42 -0
  357. data/app/views/spree/admin/tax_categories/new.html.erb +13 -0
  358. data/app/views/spree/admin/tax_categories/show.html.erb +1 -0
  359. data/app/views/spree/admin/tax_rates/_form.html.erb +54 -0
  360. data/app/views/spree/admin/tax_rates/edit.html.erb +11 -0
  361. data/app/views/spree/admin/tax_rates/index.html.erb +46 -0
  362. data/app/views/spree/admin/tax_rates/new.html.erb +14 -0
  363. data/app/views/spree/admin/taxonomies/_form.html.erb +7 -0
  364. data/app/views/spree/admin/taxonomies/_js_head.html.erb +13 -0
  365. data/app/views/spree/admin/taxonomies/_list.html.erb +23 -0
  366. data/app/views/spree/admin/taxonomies/edit.erb +37 -0
  367. data/app/views/spree/admin/taxonomies/index.html.erb +18 -0
  368. data/app/views/spree/admin/taxonomies/new.html.erb +12 -0
  369. data/app/views/spree/admin/taxons/_form.html.erb +46 -0
  370. data/app/views/spree/admin/taxons/_taxon_table.html.erb +23 -0
  371. data/app/views/spree/admin/taxons/edit.html.erb +32 -0
  372. data/app/views/spree/admin/taxons/index.html.erb +13 -0
  373. data/app/views/spree/admin/trackers/_form.html.erb +29 -0
  374. data/app/views/spree/admin/trackers/edit.html.erb +13 -0
  375. data/app/views/spree/admin/trackers/index.html.erb +42 -0
  376. data/app/views/spree/admin/trackers/new.html.erb +13 -0
  377. data/app/views/spree/admin/users/_addresses_form.html.erb +35 -0
  378. data/app/views/spree/admin/users/_form.html.erb +36 -0
  379. data/app/views/spree/admin/users/_lifetime_stats.html.erb +30 -0
  380. data/app/views/spree/admin/users/_sidebar.html.erb +23 -0
  381. data/app/views/spree/admin/users/_user_page_actions.html.erb +3 -0
  382. data/app/views/spree/admin/users/addresses.html.erb +26 -0
  383. data/app/views/spree/admin/users/edit.html.erb +72 -0
  384. data/app/views/spree/admin/users/index.html.erb +67 -0
  385. data/app/views/spree/admin/users/items.html.erb +64 -0
  386. data/app/views/spree/admin/users/new.html.erb +18 -0
  387. data/app/views/spree/admin/users/orders.html.erb +52 -0
  388. data/app/views/spree/admin/variants/_autocomplete.js.erb +21 -0
  389. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +46 -0
  390. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +48 -0
  391. data/app/views/spree/admin/variants/_form.html.erb +49 -0
  392. data/app/views/spree/admin/variants/_split.js.erb +33 -0
  393. data/app/views/spree/admin/variants/edit.html.erb +13 -0
  394. data/app/views/spree/admin/variants/index.html.erb +65 -0
  395. data/app/views/spree/admin/variants/new.html.erb +11 -0
  396. data/app/views/spree/admin/variants/new.js.erb +3 -0
  397. data/app/views/spree/admin/variants/update.js.erb +1 -0
  398. data/app/views/spree/admin/zones/_country_members.html.erb +16 -0
  399. data/app/views/spree/admin/zones/_form.html.erb +49 -0
  400. data/app/views/spree/admin/zones/_state_members.html.erb +16 -0
  401. data/app/views/spree/admin/zones/edit.html.erb +12 -0
  402. data/app/views/spree/admin/zones/index.html.erb +44 -0
  403. data/app/views/spree/admin/zones/new.html.erb +11 -0
  404. data/app/views/spree/layouts/admin.html.erb +81 -0
  405. data/config/initializers/assets.rb +1 -0
  406. data/config/initializers/form_builder.rb +15 -0
  407. data/config/routes.rb +185 -0
  408. data/lib/spree/backend/action_callbacks.rb +26 -0
  409. data/lib/spree/backend/callbacks.rb +48 -0
  410. data/lib/spree/backend/engine.rb +34 -0
  411. data/lib/spree/backend.rb +13 -0
  412. data/lib/spree_backend.rb +3 -0
  413. data/script/rails +9 -0
  414. data/spree_backend.gemspec +28 -0
  415. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  416. data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
  417. data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
  418. data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
  419. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  420. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
  421. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  422. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
  423. data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
  424. data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
  425. data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
  426. data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
  427. data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  428. data/vendor/assets/javascripts/handlebars.js +2746 -0
  429. data/vendor/assets/javascripts/jquery.cookie.js +117 -0
  430. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +4564 -0
  431. data/vendor/assets/javascripts/modernizr.js +4 -0
  432. data/vendor/assets/javascripts/underscore-min.js +6 -0
  433. data/vendor/assets/javascripts/underscore-min.map +1 -0
  434. data/vendor/assets/javascripts/velocity.js +3831 -0
  435. data/vendor/assets/stylesheets/animate.css +3158 -0
  436. data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +357 -0
  437. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +216 -0
  438. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif +0 -0
  439. metadata +565 -0
@@ -0,0 +1,21 @@
1
+ <fieldset data-hook="credit_card">
2
+ <legend><%= Spree.t(:credit_card) %></legend>
3
+ <table class="table table-condensed table-bordered">
4
+ <tr>
5
+ <th width="20%"><%= Spree.t(:name_on_card) %>:</th>
6
+ <td><%= payment.source.name %></td>
7
+ </tr>
8
+ <tr>
9
+ <th><%= Spree.t(:card_type) %>:</th>
10
+ <td><%= payment.source.cc_type %></td>
11
+ </tr>
12
+ <tr>
13
+ <th><%= Spree.t(:card_number) %>:</th>
14
+ <td><%= payment.source.display_number %></td>
15
+ </tr>
16
+ <tr>
17
+ <th><%= Spree.t(:expiration) %>:</th>
18
+ <td><%= payment.source.month %>/<%= payment.source.year %></td>
19
+ </tr>
20
+ </table>
21
+ </fieldset>
@@ -0,0 +1,29 @@
1
+ <fieldset data-hook="store_credit">
2
+ <legend><%= Spree.t(:store_credit_name) %></legend>
3
+ <table class="table table-condensed table-bordered">
4
+ <tr>
5
+ <th width="20%"><%= Spree.t(:used) %>:</th>
6
+ <td><%= payment.source.display_amount_used %></td>
7
+ </tr>
8
+ <tr>
9
+ <th><%= Spree.t(:amount) %>:</th>
10
+ <td><%= payment.source.display_amount %></td>
11
+ </tr>
12
+ <tr>
13
+ <th><%= Spree.t(:memo) %>:</th>
14
+ <td><%= payment.source.memo %></td>
15
+ </tr>
16
+ <tr>
17
+ <th><%= Spree.t(:type) %>:</th>
18
+ <td><%= payment.source.category_name %></td>
19
+ </tr>
20
+ <tr>
21
+ <th><%= Spree.t(:created_by) %>:</th>
22
+ <td><%= payment.source.created_by_email %></td>
23
+ </tr>
24
+ <tr>
25
+ <th><%= Spree.t(:issued_on) %>:</th>
26
+ <td><%= pretty_time(payment.source.created_at) %></td>
27
+ </tr>
28
+ </table>
29
+ </fieldset>
@@ -0,0 +1,19 @@
1
+ <tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">
2
+ <td class="move-handle">
3
+ <% if f.object.persisted? && can?(:edit, f.object) %>
4
+ <span class="icon icon-move handle"></span>
5
+ <%= f.hidden_field :id %>
6
+ <% end %>
7
+ </td>
8
+ <td class='property_name'>
9
+ <%= f.text_field :property_name, class: 'autocomplete form-control' %>
10
+ </td>
11
+ <td class='value'>
12
+ <%= f.text_field :value, class: 'form-control' %>
13
+ </td>
14
+ <td class="actions actions-1">
15
+ <% if f.object.persisted? && can?(:destroy, f.object) %>
16
+ <%= link_to_delete f.object, no_text: true %>
17
+ <% end %>
18
+ </td>
19
+ </tr>
@@ -0,0 +1,43 @@
1
+ <%= render 'spree/admin/shared/product_tabs', current: :properties %>
2
+ <%= render 'spree/admin/shared/error_messages', target: @product %>
3
+
4
+ <% content_for :page_actions do %>
5
+ <%= button_link_to(Spree.t(:add_product_properties), "javascript:;", { icon: 'add', :'data-target' => "tbody#product_properties", class: 'btn-success spree_add_fields' }) %>
6
+ <span class="js-new-ptype-link"><%= button_link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, { icon: 'properties', remote: true, 'data-update' => 'prototypes', class: 'btn-default' } %></span>
7
+ <% end if can? :create, Spree::ProductProperty %>
8
+
9
+ <%= form_for @product, url: spree.admin_product_url(@product), method: :put do |f| %>
10
+ <fieldset>
11
+ <div id="prototypes" data-hook></div>
12
+
13
+ <table class="table sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
14
+ <thead>
15
+ <tr data-hook="product_properties_header">
16
+ <th colspan="2"><%= Spree.t(:property) %></th>
17
+ <th><%= Spree.t(:value) %></th>
18
+ <th class="actions"></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody id="product_properties" data-hook>
22
+ <%= f.fields_for :product_properties do |pp_form| %>
23
+ <%= render 'product_property_fields', f: pp_form %>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
27
+
28
+ <%= render('spree/admin/shared/edit_resource_links') if can? :update, Spree::ProductProperty %>
29
+
30
+ <%= hidden_field_tag 'clear_product_properties', 'true' %>
31
+ </fieldset>
32
+ <% end %>
33
+
34
+ <%= javascript_tag do %>
35
+ var properties = <%= raw(@properties.to_json) %>;
36
+ $('#product_properties').on('keydown', 'input.autocomplete', function() {
37
+ already_auto_completed = $(this).is('ac_input');
38
+ if (!already_auto_completed) {
39
+ $(this).autocomplete({source: properties});
40
+ $(this).focus();
41
+ }
42
+ });
43
+ <% end %>
@@ -0,0 +1,42 @@
1
+ <div class="panel-heading">
2
+ <h1 class="panel-title">
3
+ <%= Spree.t(:add_stock) %>
4
+ </h1>
5
+ </div>
6
+ <div class="panel-body">
7
+ <%= form_for [:admin, Spree::StockMovement.new], url: admin_stock_items_path do |f| %>
8
+ <div data-hook="admin_stock_movements_form_fields" class="row">
9
+ <div class="col-md-2">
10
+ <div class="form-group">
11
+ <%= f.field_container :quantity do %>
12
+ <%= f.label :quantity, Spree.t(:quantity) %>
13
+ <%= f.number_field :quantity, class: 'form-control', value: 1 %>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ <div class="col-md-5">
18
+ <div class="form-group">
19
+ <%= f.field_container :stock_location do %>
20
+ <%= label_tag :stock_location_id, Spree.t(:stock_location) %>
21
+ <%= select_tag 'stock_location_id', options_from_collection_for_select(@stock_locations, :id, :name),
22
+ class: 'select2' %>
23
+ <% end %>
24
+ </div>
25
+ </div>
26
+
27
+ <div class="col-md-5">
28
+ <div class="form-group">
29
+ <%= f.field_container :variant_id do %>
30
+ <%= label_tag 'variant_id', Spree.t(:variant) %>
31
+ <%= select_tag 'variant_id', options_from_collection_for_select(@variants, :id, :sku_and_options_text),
32
+ class: 'select2' %>
33
+ <% end %>
34
+ </div>
35
+ </div>
36
+ </div>
37
+
38
+ <div class="form-actions text-center" data-hook="buttons">
39
+ <%= button Spree.t(:add_stock), 'plus' %>
40
+ </div>
41
+ <% end %>
42
+ </div>
@@ -0,0 +1,25 @@
1
+ <script type='text/template' id='product_template'>
2
+ <li id='product_{{ product.id }}' data-product-id='{{ product.id }}' data-taxons="{{ product.taxon_ids }}" class='product'>
3
+ <a class="sort-handle js-sort-handle"><span class="icon icon-move"></span></a>
4
+ <div class="btn-group">
5
+ <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
6
+ <span class="caret"></span>
7
+ </button>
8
+ <ul class="dropdown-menu" role="menu" data-hook="taxon_product_dropdown">
9
+ <li><a href="javascript:;" class="edit-product js-edit-product"><%= Spree.t(:edit) %></a></li>
10
+ <li><a href="javascript:;" class="delete-product js-delete-product"><%= Spree.t(:delete_from_taxon) %></a></li>
11
+ </ul>
12
+ </div>
13
+ <div class='image'>
14
+ {{#if product.image }}
15
+ <img src='{{product.image}}' alt='{{ product.name }}' class='thumbnail' />
16
+ {{ else }}
17
+ <img src='<%= image_path("noimage/small.png") %>' alt='{{product.name }}' class='thumbnail' />
18
+ {{/if}}
19
+ </div>
20
+ <div class="product-info">
21
+ <div class="name">{{ product.name }}</div>
22
+ <div class="price">{{ product.display_price }}</div>
23
+ </div>
24
+ </li>
25
+ </script>
@@ -0,0 +1,224 @@
1
+
2
+ <div data-hook="admin_product_form_fields">
3
+
4
+ <div class="row">
5
+
6
+ <div class="col-md-8" data-hook="admin_product_form_left">
7
+ <div data-hook="admin_product_form_name">
8
+ <%= f.field_container :name, class: ['form-group'] do %>
9
+ <%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', class: 'required')) %>
10
+ <%= f.text_field :name, class: 'form-control title' %>
11
+ <%= f.error_message_on :name %>
12
+ <% end %>
13
+ </div>
14
+
15
+ <div data-hook="admin_product_form_slug">
16
+ <%= f.field_container :slug, class: ['form-group'] do %>
17
+ <%= f.label :slug, raw(Spree.t(:slug) + content_tag(:span, ' *', class: "required")) %>
18
+ <%= f.text_field :slug, class: 'form-control title' %>
19
+ <%= f.error_message_on :slug %>
20
+ <% end %>
21
+ </div>
22
+
23
+ <div data-hook="admin_product_form_description">
24
+ <%= f.field_container :description, class: ['form-group'] do %>
25
+ <%= f.label :description, Spree.t(:description) %>
26
+ <%= f.text_area :description, { rows: "#{unless @product.has_variants? then '20' else '13' end}", class: 'form-control' } %>
27
+ <%= f.error_message_on :description %>
28
+ <% end %>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="col-md-4" data-hook="admin_product_form_right">
33
+ <div data-hook="admin_product_form_price">
34
+ <%= f.field_container :price, class: ['form-group'] do %>
35
+ <%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', class: "required")) %>
36
+ <%= f.text_field :price, value: number_to_currency(@product.price, unit: ''), class: 'form-control', disabled: (cannot? :update, @product.price) %>
37
+ <%= f.error_message_on :price %>
38
+ <% end %>
39
+ </div>
40
+
41
+ <div data-hook="admin_product_form_cost_price" class="alpha two columns">
42
+ <%= f.field_container :cost_price, class: ['form-group'] do %>
43
+ <%= f.label :cost_price, Spree.t(:cost_price) %>
44
+ <%= f.text_field :cost_price, value: number_to_currency(@product.cost_price, unit: ''), class: 'form-control' %>
45
+ <%= f.error_message_on :cost_price %>
46
+ <% end %>
47
+ </div>
48
+ <div data-hook="admin_product_form_cost_currency" class="omega two columns">
49
+ <%= f.field_container :cost_currency, class: ['form-group'] do %>
50
+ <%= f.label :cost_currency, Spree.t(:cost_currency) %>
51
+ <%= f.text_field :cost_currency, class: 'form-control' %>
52
+ <%= f.error_message_on :cost_currency %>
53
+ <% end %>
54
+ </div>
55
+
56
+ <div data-hook="admin_product_form_available_on">
57
+ <%= f.field_container :available_on, class: ['form-group'] do %>
58
+ <%= f.label :available_on, Spree.t(:available_on) %>
59
+ <%= f.error_message_on :available_on %>
60
+ <%= f.text_field :available_on, value: datepicker_field_value(@product.available_on), class: 'datepicker form-control' %>
61
+ <% end %>
62
+ </div>
63
+
64
+ <div data-hook="admin_product_form_discontinue_on">
65
+ <%= f.field_container :discontinue_on, class: ['form-group'] do %>
66
+ <%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
67
+ <%= f.error_message_on :discontinue_on %>
68
+ <%= f.text_field :discontinue_on, value: datepicker_field_value(@product.discontinue_on), class: 'datepicker form-control' %>
69
+ <% end %>
70
+ </div>
71
+
72
+ <div data-hook="admin_product_form_promotionable">
73
+ <%= f.field_container :promotionable, class: ['form-group'] do %>
74
+ <%= f.label :promotionable, Spree.t(:promotionable) %>
75
+ <%= f.error_message_on :promotionable %>
76
+ <%= f.check_box :promotionable, class: 'form-control' %>
77
+ <% end %>
78
+ </div>
79
+
80
+ <% if @product.has_variants? %>
81
+ <div data-hook="admin_product_form_multiple_variants" class="well">
82
+ <%= f.label :skus, Spree.t(:sku).pluralize %>
83
+ <div class="info marginb">
84
+ <%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.size) %>
85
+ <ul class="text_list">
86
+ <% @product.variants.first(5).each do |variant| %>
87
+ <li><%= variant.sku %></li>
88
+ <% end %>
89
+ </ul>
90
+ <% if @product.variants.size > 5 %>
91
+ <em>
92
+ <%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.size - 5) %>
93
+ </em>
94
+ <% end %>
95
+ </div>
96
+ <div class="info-actions">
97
+ <% if can?(:admin, Spree::Variant) %>
98
+ <%= link_to_with_icon 'variants', Spree.t(:manage_variants), spree.admin_product_variants_url(@product), class: "btn btn-default" %>
99
+ <% end %>
100
+ </div>
101
+ </div>
102
+ <% else %>
103
+ <div data-hook="admin_product_form_sku">
104
+ <%= f.field_container :sku, class: ['form-group'] do %>
105
+ <%= f.label :sku, Spree.t(:sku) %>
106
+ <%= f.text_field :sku, size: 16, class: 'form-control' %>
107
+ <% end %>
108
+ </div>
109
+
110
+ <div id="shipping_specs" class="row">
111
+ <div class="col-md-6">
112
+ <div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
113
+ <%= f.label :weight, Spree.t(:weight) %>
114
+ <%= f.text_field :weight, value: number_with_precision(@product.weight, precision: 2), size: 4, class: 'form-control' %>
115
+ </div>
116
+ </div>
117
+
118
+ <div class="col-md-6">
119
+ <div id="shipping_specs_height_field" data-hook="admin_product_form_height" class="form-group">
120
+ <%= f.label :height, Spree.t(:height) %>
121
+ <%= f.text_field :height, value: number_with_precision(@product.height, precision: 2), size: 4, class: 'form-control' %>
122
+ </div>
123
+ </div>
124
+
125
+ <div class="col-md-6">
126
+ <div id="shipping_specs_width_field" data-hook="admin_product_form_width" class="form-group">
127
+ <%= f.label :width, Spree.t(:width) %>
128
+ <%= f.text_field :width, value: number_with_precision(@product.width, precision: 2), size: 4, class: 'form-control' %>
129
+ </div>
130
+ </div>
131
+
132
+ <div class="col-md-6">
133
+ <div id="shipping_specs_depth_field" data-hook="admin_product_form_depth" class="form-group">
134
+ <%= f.label :depth, Spree.t(:depth) %>
135
+ <%= f.text_field :depth, value: number_with_precision(@product.depth, precision: 2), size: 4, class: 'form-control' %>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ <% end %>
140
+
141
+ <div data-hook="admin_product_form_shipping_categories">
142
+ <%= f.field_container :shipping_categories, class: ['form-group'] do %>
143
+ <%= f.label :shipping_category_id, Spree.t(:shipping_categories) %>
144
+ <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
145
+ <%= f.error_message_on :shipping_category %>
146
+ <% end %>
147
+ </div>
148
+
149
+ <div data-hook="admin_product_form_tax_category">
150
+ <%= f.field_container :tax_category, class: ['form-group'] do %>
151
+ <%= f.label :tax_category_id, Spree.t(:tax_category) %>
152
+ <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
153
+ <%= f.error_message_on :tax_category %>
154
+ <% end %>
155
+ </div>
156
+ </div>
157
+
158
+ </div>
159
+
160
+ <div data-hook="admin_product_form_taxons">
161
+ <%= f.field_container :taxons, class: ['form-group'] do %>
162
+ <%= f.label :taxon_ids, Spree.t(:taxons) %>
163
+
164
+ <% if can? :modify, Spree::Classification %>
165
+ <%= f.hidden_field :taxon_ids, value: @product.taxon_ids.join(',') %>
166
+ <% elsif @product.taxons.any? %>
167
+ <ul class="text_list">
168
+ <% @product.taxons.each do |taxon| %>
169
+ <li><%= taxon.name %></li>
170
+ <% end %>
171
+ </ul>
172
+ <% else %>
173
+ <div class="alert alert-info"><%= Spree.t(:no_resource_found, resource: :taxons) %></div>
174
+ <% end %>
175
+
176
+ <% end %>
177
+ </div>
178
+
179
+ <div data-hook="admin_product_form_option_types">
180
+ <%= f.field_container :option_types, class: ['form-group'] do %>
181
+ <%= f.label :option_type_ids, Spree.t(:option_types) %>
182
+
183
+ <% if can? :modify, Spree::ProductOptionType %>
184
+ <%= f.hidden_field :option_type_ids, value: @product.option_type_ids.join(',') %>
185
+ <% elsif @product.option_types.any? %>
186
+ <ul class="text_list">
187
+ <% @product.option_types.each do |type| %>
188
+ <li><%= type.presentation %> (<%= type.name %>)</li>
189
+ <% end %>
190
+ </ul>
191
+ <% else %>
192
+ <div class="alert alert-info"><%= Spree.t(:no_resource_found, resource: :option_types) %></div>
193
+ <% end %>
194
+
195
+ <% end %>
196
+ </div>
197
+
198
+
199
+ <div data-hook="admin_product_form_meta">
200
+ <div data-hook="admin_product_form_meta_title">
201
+ <%= f.field_container :meta_title, class: ['form-group'] do %>
202
+ <%= f.label :meta_title, Spree.t(:meta_title) %>
203
+ <%= f.text_field :meta_title, class: 'form-control' %>
204
+ <% end %>
205
+ </div>
206
+
207
+ <div data-hook="admin_product_form_meta_keywords">
208
+ <%= f.field_container :meta_keywords, class: ['form-group'] do %>
209
+ <%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
210
+ <%= f.text_field :meta_keywords, class: 'form-control' %>
211
+ <% end %>
212
+ </div>
213
+
214
+ <div data-hook="admin_product_form_meta_description">
215
+ <%= f.field_container :meta_description, class: ['form-group'] do %>
216
+ <%= f.label :meta_description, Spree.t(:meta_description) %>
217
+ <%= f.text_field :meta_description, class: 'form-control' %>
218
+ <% end %>
219
+ </div>
220
+
221
+ <div data-hook="admin_product_form_additional_fields"></div>
222
+
223
+ </div>
224
+ </div>
@@ -0,0 +1,10 @@
1
+ <% content_for :page_title do %>
2
+ <%= Spree.t(:properties) %>
3
+ <% end %>
4
+
5
+ <% f.fields_for :product_properties do |properties_form| %>
6
+ <div data-hook="value">
7
+ <%= properties_form.label :value, properties_form.object.property.presentation %>
8
+ <%= properties_form.text_field :value, :class => "form-control" %>
9
+ </div>
10
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% content_for :page_actions do %>
2
+ <% if can?(:create, Spree::Product) %>
3
+ <%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
4
+ <% end %>
5
+ <% end %>
6
+
7
+ <%= render partial: 'spree/admin/shared/product_tabs', locals: {current: :details} %>
8
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @product } %>
9
+
10
+ <%= form_for [:admin, @product], method: :put, html: { multipart: true } do |f| %>
11
+ <fieldset>
12
+ <%= render partial: 'form', locals: { f: f } %>
13
+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>
14
+ </fieldset>
15
+ <% end %>
@@ -0,0 +1,91 @@
1
+ <% content_for :page_title do %>
2
+ <%= plural_resource_name(Spree::Product) %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <%= button_link_to Spree.t(:new_product), new_object_url, { :class => "btn-success", :icon => 'add', :id => 'admin_new_product' } %>
7
+ <% end if can?(:create, Spree::Product) %>
8
+
9
+ <% content_for :table_filter do %>
10
+ <div data-hook="admin_products_sidebar">
11
+
12
+ <%= search_form_for [:admin, @search] do |f| %>
13
+ <%- locals = {:f => f} %>
14
+ <div data-hook="admin_products_index_search" class="row">
15
+ <div class="col-md-6">
16
+ <div class="form-group">
17
+ <%= f.label :name_cont, Spree.t(:name) %>
18
+ <%= f.text_field :name_cont, :size => 15, class: "form-control js-quick-search-target" %>
19
+ </div>
20
+ </div>
21
+ <div class="col-md-6">
22
+ <div class="form-group">
23
+ <%= f.label :variants_including_master_sku_cont, Spree.t(:sku) %>
24
+ <%= f.text_field :variants_including_master_sku_cont, :size => 15, class: "form-control" %>
25
+ </div>
26
+ </div>
27
+ <div class="col-md-12">
28
+ <div class="field checkbox">
29
+ <label>
30
+ <%= f.check_box :deleted_at_null, {:checked => params[:q][:deleted_at_null] == '0'}, '0', '1' %>
31
+ <%= Spree.t(:show_deleted) %>
32
+ </label>
33
+ </div>
34
+
35
+ <div class="field checkbox">
36
+ <label>
37
+ <%= f.check_box :not_discontinued, {checked: params[:q][:not_discontinued] == '0'}, '0', '1' %>
38
+ <%= Spree.t(:show_discontinued ) %>
39
+ </label>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <div data-hook="admin_products_index_search_buttons" class="form-actions">
44
+ <%= button Spree.t(:search), 'search' %>
45
+ </div>
46
+ <% end %>
47
+
48
+ </div>
49
+ <% end %>
50
+
51
+ <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
52
+
53
+ <% if @collection.any? %>
54
+ <table class="table" id="listing_products">
55
+ <thead>
56
+ <tr data-hook="admin_products_index_headers">
57
+ <th><%= Spree.t(:sku) %></th>
58
+ <th><%= Spree.t(:status) %></th>
59
+
60
+ <th colspan="2"><%= sort_link @search,:name, Spree.t(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
61
+ <th class="text-center">
62
+ <%= sort_link @search, :master_default_price_amount, Spree.t(:master_price), {}, {title: 'admin_products_listing_price_title'} %>
63
+ </th>
64
+ <th data-hook="admin_products_index_header_actions" class="actions"></th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ <% @collection.each do |product| %>
69
+ <tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
70
+ <td class="sku"><%= product.sku rescue '' %></td>
71
+ <td class="status"><%= available_status(product) %> </td>
72
+ <td class="image"><%= mini_image product %></td>
73
+ <td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
74
+ <td class="text-center"><%= product.display_price.to_html rescue '' %></td>
75
+ <td class="actions actions-3 text-right" data-hook="admin_products_index_row_actions">
76
+ <%= link_to_edit product, no_text: true, class: 'edit' if can?(:edit, product) && !product.deleted? %>
77
+ <%= link_to_clone product, no_text: true, class: 'clone' if can?(:clone, product) %>
78
+ <%= link_to_delete product, no_text: true if can?(:delete, product) && !product.deleted? %>
79
+ </td>
80
+ </tr>
81
+ <% end %>
82
+ </tbody>
83
+ </table>
84
+ <% else %>
85
+ <div class="alert alert-info no-objects-found">
86
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>,
87
+ <%= link_to Spree.t(:add_one), new_object_url %>!
88
+ </div>
89
+ <% end %>
90
+
91
+ <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
@@ -0,0 +1,89 @@
1
+ <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @product } %>
2
+
3
+ <% content_for :page_title do %>
4
+ <%= link_to Spree.t(:products), spree.admin_products_url %> /
5
+ <%= Spree.t(:new_product) %>
6
+ <% end %>
7
+
8
+ <%= form_for [:admin, @product], :html => { :multipart => true } do |f| %>
9
+ <fieldset data-hook="new_product">
10
+ <%= f.field_container :name, :class => ['form-group'] do %>
11
+ <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
12
+ <%= f.text_field :name, :class => 'form-control title' %>
13
+ <%= f.error_message_on :name %>
14
+ <% end %>
15
+
16
+ <div data-hook="new_product_attrs" class="row">
17
+ <% unless @product.has_variants? %>
18
+ <div data-hook="new_product_sku" class="col-md-4">
19
+ <%= f.field_container :sku, :class => ['form-group'] do %>
20
+ <%= f.label :sku, Spree.t(:sku) %>
21
+ <%= f.text_field :sku, :size => 16, :class => 'form-control' %>
22
+ <%= f.error_message_on :sku %>
23
+ <% end %>
24
+ </div>
25
+ <% end %>
26
+
27
+ <div data-hook="new_product_prototype" class="col-md-4">
28
+ <%= f.field_container :prototype, :class => ['form-group'] do %>
29
+ <%= f.label :prototype_id, Spree.t(:prototype) %>
30
+ <%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {:include_blank => true}, {:class => 'select2'} %>
31
+ <% end %>
32
+ </div>
33
+
34
+ <div data-hook="new_product_price" class="col-md-4">
35
+ <%= f.field_container :price, :class => ['form-group'] do %>
36
+ <%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span>
37
+ <%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'form-control' %>
38
+ <%= f.error_message_on :price %>
39
+ <% end %>
40
+ </div>
41
+
42
+ <div data-hook="new_product_available_on" class="col-md-4">
43
+ <%= f.field_container :available_on, :class => ['form-group'] do %>
44
+ <%= f.label :available_on, Spree.t(:available_on) %>
45
+ <%= f.error_message_on :available_on %>
46
+ <%= f.text_field :available_on, :class => 'datepicker form-control' %>
47
+ <% end %>
48
+ </div>
49
+
50
+ <div data-hook="new_product_shipping_category" class="col-md-4">
51
+ <%= f.field_container :shipping_category, :class => ['form-group'] do %>
52
+ <%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span>
53
+ <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
54
+ <%= f.error_message_on :shipping_category_id %>
55
+ <% end %>
56
+ </div>
57
+
58
+ </div>
59
+
60
+ <div data-hook="product-from-prototype" id="product-from-prototype">
61
+ <%= render :file => 'spree/admin/prototypes/show' if @prototype %>
62
+ </div>
63
+
64
+ <%= render :partial => 'spree/admin/shared/new_resource_links' %>
65
+
66
+ </fieldset>
67
+ <% end %>
68
+
69
+ <script type="text/javascript">
70
+ //<![CDATA[
71
+ (function($){
72
+ var base_url = "<%= spree.admin_prototypes_url %>";
73
+ var prototype_select = $('#product_prototype_id');
74
+ prototype_select.change(function() {
75
+ var id = prototype_select.val();
76
+ if (id.length) {
77
+ var url = new Uri(base_url);
78
+ url.setPath(url.path() + '/' + id);
79
+ $('#product-from-prototype').load(url.toString());
80
+ } else {
81
+ $('#product-from-prototype').empty();
82
+ }
83
+ })
84
+ if (prototype_select.html() == "") {
85
+ prototype_select.change();
86
+ }
87
+ })(jQuery);
88
+ //]]>
89
+ </script>