solidus_backend 2.3.1 → 2.4.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend/admin.js +0 -12
  3. data/app/assets/javascripts/spree/backend/number_field_updater.coffee +5 -5
  4. data/app/assets/javascripts/spree/backend/shipments.js +16 -14
  5. data/app/assets/javascripts/spree/backend/stock_transfers/count_update_forms.coffee +3 -3
  6. data/app/assets/javascripts/spree/backend/stock_transfers/transfer_item_deleting.coffee +1 -1
  7. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +1 -1
  8. data/app/assets/javascripts/spree/backend/templates/orders/details_adjustment_row.hbs +2 -2
  9. data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +3 -3
  10. data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +5 -5
  11. data/app/assets/javascripts/spree/backend/templates/stock_transfers/transfer_item.hbs +5 -5
  12. data/app/assets/javascripts/spree/backend/templates/taxons/_tree.hbs +7 -3
  13. data/app/assets/javascripts/spree/backend/templates/variants/line_items_autocomplete_stock.hbs +1 -1
  14. data/app/assets/javascripts/spree/backend/templates/variants/split.hbs +2 -2
  15. data/app/assets/javascripts/spree/backend/views/order/customer_details.js +1 -2
  16. data/app/assets/javascripts/spree/backend.js +1 -1
  17. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +27 -906
  18. data/app/assets/stylesheets/spree/backend/components/_actions.scss +13 -15
  19. data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +1 -1
  20. data/app/assets/stylesheets/spree/backend/components/_editable_table.scss +0 -1
  21. data/app/assets/stylesheets/spree/backend/components/_messages.scss +8 -8
  22. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +1 -1
  23. data/app/assets/stylesheets/spree/backend/components/_number_field_update.scss +1 -1
  24. data/app/assets/stylesheets/spree/backend/components/_number_with_currency.scss +1 -1
  25. data/app/assets/stylesheets/spree/backend/components/_pills.scss +92 -0
  26. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +7 -32
  27. data/app/assets/stylesheets/spree/backend/components/_states.scss +5 -27
  28. data/app/assets/stylesheets/spree/backend/components/_stock_table.scss +0 -12
  29. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +58 -139
  30. data/app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss +11 -15
  31. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +7 -5
  32. data/app/assets/stylesheets/spree/backend/sections/_orders.scss +6 -6
  33. data/app/assets/stylesheets/spree/backend/sections/_products.scss +5 -1
  34. data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +4 -2
  35. data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +4 -35
  36. data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +14 -15
  37. data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +9 -16
  38. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +23 -20
  39. data/app/assets/stylesheets/spree/backend/shared/_header.scss +1 -5
  40. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +3 -23
  41. data/app/assets/stylesheets/spree/backend/shared/_tables.scss +40 -92
  42. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +6 -6
  43. data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -1
  44. data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
  45. data/app/controllers/spree/admin/customer_returns_controller.rb +0 -1
  46. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  47. data/app/controllers/spree/admin/shipping_methods_controller.rb +1 -1
  48. data/app/controllers/spree/admin/style_guide_controller.rb +3 -2
  49. data/app/controllers/spree/admin/tax_rates_controller.rb +1 -1
  50. data/app/controllers/spree/admin/users_controller.rb +9 -4
  51. data/app/helpers/spree/admin/base_helper.rb +32 -35
  52. data/app/helpers/spree/admin/stock_transfers_helper.rb +0 -4
  53. data/app/models/spree/backend_configuration.rb +1 -1
  54. data/app/views/spree/admin/adjustment_reasons/index.html.erb +6 -4
  55. data/app/views/spree/admin/adjustments/_adjustment.html.erb +5 -5
  56. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +7 -7
  57. data/app/views/spree/admin/cancellations/index.html.erb +9 -5
  58. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -3
  59. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +12 -7
  60. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +13 -8
  61. data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
  62. data/app/views/spree/admin/customer_returns/index.html.erb +5 -5
  63. data/app/views/spree/admin/images/_image_row.html.erb +14 -4
  64. data/app/views/spree/admin/images/index.html.erb +2 -1
  65. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +6 -6
  66. data/app/views/spree/admin/option_types/edit.html.erb +2 -1
  67. data/app/views/spree/admin/option_types/index.html.erb +5 -5
  68. data/app/views/spree/admin/orders/_adjustments.html.erb +3 -3
  69. data/app/views/spree/admin/orders/_carton.html.erb +1 -1
  70. data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -3
  71. data/app/views/spree/admin/orders/_risk_analysis.html.erb +18 -16
  72. data/app/views/spree/admin/orders/_shipment.html.erb +26 -30
  73. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +6 -6
  74. data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -3
  75. data/app/views/spree/admin/orders/confirm/_payments.html.erb +6 -6
  76. data/app/views/spree/admin/orders/confirm/_shipment.html.erb +1 -1
  77. data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -3
  78. data/app/views/spree/admin/orders/index.html.erb +25 -9
  79. data/app/views/spree/admin/payment_methods/_form.html.erb +4 -1
  80. data/app/views/spree/admin/payment_methods/index.html.erb +11 -7
  81. data/app/views/spree/admin/payments/_capture_events.html.erb +1 -1
  82. data/app/views/spree/admin/payments/_list.html.erb +9 -5
  83. data/app/views/spree/admin/payments/show.html.erb +2 -2
  84. data/app/views/spree/admin/prices/_master_variant_table.html.erb +2 -2
  85. data/app/views/spree/admin/prices/_table.html.erb +2 -2
  86. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +1 -1
  87. data/app/views/spree/admin/product_properties/index.html.erb +4 -2
  88. data/app/views/spree/admin/products/index.html.erb +10 -9
  89. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -1
  90. data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +1 -1
  91. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +3 -6
  92. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +3 -8
  93. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +3 -8
  94. data/app/views/spree/admin/promotions/index.html.erb +24 -17
  95. data/app/views/spree/admin/promotions/rules/_user_role.html.erb +2 -2
  96. data/app/views/spree/admin/properties/index.html.erb +3 -3
  97. data/app/views/spree/admin/refund_reasons/index.html.erb +7 -5
  98. data/app/views/spree/admin/refunds/new.html.erb +1 -1
  99. data/app/views/spree/admin/reimbursement_types/index.html.erb +2 -2
  100. data/app/views/spree/admin/reimbursements/edit.html.erb +6 -6
  101. data/app/views/spree/admin/reimbursements/index.html.erb +9 -2
  102. data/app/views/spree/admin/reimbursements/show.html.erb +6 -6
  103. data/app/views/spree/admin/reports/index.html.erb +2 -2
  104. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  105. data/app/views/spree/admin/return_authorizations/_form.html.erb +9 -5
  106. data/app/views/spree/admin/return_authorizations/edit.html.erb +9 -2
  107. data/app/views/spree/admin/return_authorizations/index.html.erb +11 -4
  108. data/app/views/spree/admin/search/products.json.jbuilder +10 -0
  109. data/app/views/spree/admin/search/users.json.jbuilder +37 -0
  110. data/app/views/spree/admin/shared/_calculator_fields.html.erb +4 -1
  111. data/app/views/spree/admin/shared/_modal.html.erb +18 -0
  112. data/app/views/spree/admin/shared/_number_field_update_actions.html.erb +2 -2
  113. data/app/views/spree/admin/shared/_number_field_update_cell.html.erb +1 -1
  114. data/app/views/spree/admin/shared/_order_summary.html.erb +21 -5
  115. data/app/views/spree/admin/shared/_refunds.html.erb +6 -6
  116. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +4 -4
  117. data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
  118. data/app/views/spree/admin/shared/preference_fields/_boolean.html.erb +13 -0
  119. data/app/views/spree/admin/shared/preference_fields/_decimal.html.erb +12 -0
  120. data/app/views/spree/admin/shared/preference_fields/_integer.html.erb +12 -0
  121. data/app/views/spree/admin/shared/preference_fields/_password.html.erb +12 -0
  122. data/app/views/spree/admin/shared/preference_fields/_string.html.erb +12 -0
  123. data/app/views/spree/admin/shared/preference_fields/_text.html.erb +12 -0
  124. data/app/views/spree/admin/shipping_categories/index.html.erb +2 -2
  125. data/app/views/spree/admin/shipping_methods/index.html.erb +5 -5
  126. data/app/views/spree/admin/stock_items/_stock_management.html.erb +3 -3
  127. data/app/views/spree/admin/stock_locations/index.html.erb +9 -11
  128. data/app/views/spree/admin/stock_movements/index.html.erb +4 -4
  129. data/app/views/spree/admin/stock_transfers/_transfer_item_actions.html.erb +1 -1
  130. data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +2 -2
  131. data/app/views/spree/admin/stock_transfers/index.html.erb +10 -6
  132. data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +1 -1
  133. data/app/views/spree/admin/store_credits/index.html.erb +53 -50
  134. data/app/views/spree/admin/store_credits/show.html.erb +5 -5
  135. data/app/views/spree/admin/stores/_form.html.erb +9 -0
  136. data/app/views/spree/admin/style_guide/topics/components/_modals.html.erb +50 -0
  137. data/app/views/spree/admin/style_guide/topics/components/_pills.html.erb +101 -0
  138. data/app/views/spree/admin/style_guide/topics/tables/_building_tables.html.erb +4 -4
  139. data/app/views/spree/admin/tax_categories/index.html.erb +5 -5
  140. data/app/views/spree/admin/tax_rates/index.html.erb +9 -9
  141. data/app/views/spree/admin/taxonomies/_list.html.erb +4 -4
  142. data/app/views/spree/admin/taxons/search.json.jbuilder +5 -0
  143. data/app/views/spree/admin/users/index.html.erb +64 -23
  144. data/app/views/spree/admin/users/items.html.erb +9 -13
  145. data/app/views/spree/admin/users/orders.html.erb +28 -12
  146. data/app/views/spree/admin/variants/_table.html.erb +6 -5
  147. data/app/views/spree/admin/variants/index.html.erb +12 -16
  148. data/app/views/spree/admin/variants/new.html.erb +1 -3
  149. data/app/views/spree/admin/zones/edit.html.erb +0 -3
  150. data/app/views/spree/admin/zones/index.html.erb +2 -6
  151. data/app/views/spree/admin/zones/new.html.erb +0 -3
  152. data/app/views/spree/layouts/admin.html.erb +9 -30
  153. data/config/routes.rb +0 -4
  154. data/lib/spree/backend.rb +2 -1
  155. data/solidus_backend.gemspec +3 -1
  156. data/spec/controllers/spree/admin/orders_controller_spec.rb +0 -5
  157. data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
  158. data/spec/controllers/spree/admin/search_controller_spec.rb +2 -2
  159. data/spec/features/admin/configuration/payment_methods_spec.rb +1 -1
  160. data/spec/features/admin/configuration/zones_spec.rb +1 -1
  161. data/spec/features/admin/orders/adjustments_spec.rb +1 -1
  162. data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +4 -4
  163. data/spec/features/admin/orders/cancelling_inventory_spec.rb +1 -1
  164. data/spec/features/admin/orders/customer_details_spec.rb +8 -1
  165. data/spec/features/admin/orders/listing_spec.rb +1 -1
  166. data/spec/features/admin/orders/new_order_spec.rb +3 -3
  167. data/spec/features/admin/orders/order_details_spec.rb +17 -16
  168. data/spec/features/admin/orders/payments_spec.rb +4 -4
  169. data/spec/features/admin/orders/risk_analysis_spec.rb +2 -2
  170. data/spec/features/admin/orders/shipments_spec.rb +1 -1
  171. data/spec/features/admin/products/edit/images_spec.rb +1 -1
  172. data/spec/features/admin/store_credits_spec.rb +3 -3
  173. data/spec/features/admin/stores_spec.rb +35 -0
  174. data/spec/features/admin/users_spec.rb +60 -13
  175. data/spec/spec_helper.rb +9 -4
  176. data/vendor/assets/javascripts/solidus_admin/bootstrap.js +657 -361
  177. data/vendor/assets/javascripts/solidus_admin/popover.js +4 -0
  178. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss +4 -11
  179. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_badge.scss +4 -33
  180. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_breadcrumb.scss +1 -1
  181. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss +11 -15
  182. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_buttons.scss +13 -42
  183. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss +27 -80
  184. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss +24 -17
  185. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss +0 -2
  186. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss +27 -36
  187. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_dropdown.scss +15 -48
  188. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_forms.scss +70 -68
  189. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_functions.scss +90 -0
  190. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_grid.scss +3 -2
  191. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_images.scss +1 -1
  192. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_input-group.scss +6 -8
  193. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_jumbotron.scss +0 -4
  194. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_list-group.scss +9 -36
  195. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_media.scss +0 -4
  196. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_mixins.scss +2 -18
  197. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_modal.scss +3 -3
  198. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_nav.scss +15 -16
  199. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_navbar.scss +70 -54
  200. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +3 -4
  201. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_popover.scss +96 -72
  202. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_print.scss +1 -9
  203. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_progress.scss +4 -4
  204. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_reboot.scss +187 -95
  205. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tables.scss +34 -19
  206. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_tooltip.scss +52 -35
  207. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_type.scss +8 -28
  208. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_utilities.scss +1 -0
  209. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_variables.scss +286 -410
  210. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-grid.scss +2 -8
  211. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap-reboot.scss +1 -2
  212. data/vendor/assets/stylesheets/solidus_admin/bootstrap/bootstrap.scss +2 -15
  213. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_alert.scss +4 -5
  214. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_badge.scss +6 -5
  215. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_border-radius.scss +3 -3
  216. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_box-shadow.scss +5 -0
  217. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_breakpoints.scss +23 -13
  218. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_buttons.scss +11 -14
  219. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_clearfix.scss +1 -1
  220. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_forms.scss +57 -55
  221. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_gradients.scss +1 -1
  222. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid-framework.scss +9 -18
  223. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_grid.scss +12 -65
  224. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_hover.scss +6 -6
  225. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_list-group.scss +2 -4
  226. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_nav-divider.scss +3 -3
  227. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_pagination.scss +1 -0
  228. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_reset-text.scss +4 -3
  229. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_resize.scss +1 -1
  230. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_screen-reader.scss +5 -2
  231. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_text-truncate.scss +1 -1
  232. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_transition.scss +9 -0
  233. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_visibility.scss +2 -2
  234. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_background.scss +4 -17
  235. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_borders.scss +20 -5
  236. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_display.scss +36 -1
  237. data/vendor/assets/stylesheets/solidus_admin/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
  238. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_flex.scss +0 -4
  239. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_position.scss +5 -3
  240. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_spacing.scss +10 -12
  241. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_text.scss +5 -17
  242. data/vendor/assets/stylesheets/solidus_admin/bootstrap/utilities/_visibility.scss +4 -48
  243. metadata +73 -34
  244. data/app/assets/stylesheets/spree/backend/shared/_skeleton.scss +0 -242
  245. data/app/controllers/spree/admin/countries_controller.rb +0 -9
  246. data/app/controllers/spree/admin/states_controller.rb +0 -29
  247. data/app/helpers/spree/admin/reimbursements_helper.rb +0 -14
  248. data/app/views/spree/admin/countries/_form.html.erb +0 -22
  249. data/app/views/spree/admin/countries/edit.html.erb +0 -19
  250. data/app/views/spree/admin/countries/index.html.erb +0 -49
  251. data/app/views/spree/admin/countries/new.html.erb +0 -18
  252. data/app/views/spree/admin/search/products.rabl +0 -9
  253. data/app/views/spree/admin/search/users.rabl +0 -30
  254. data/app/views/spree/admin/shared/_areas_tabs.html.erb +0 -19
  255. data/app/views/spree/admin/states/_form.html.erb +0 -14
  256. data/app/views/spree/admin/states/_state_list.html.erb +0 -33
  257. data/app/views/spree/admin/states/edit.html.erb +0 -19
  258. data/app/views/spree/admin/states/index.html.erb +0 -39
  259. data/app/views/spree/admin/states/new.html.erb +0 -17
  260. data/app/views/spree/admin/style_guide/topics/typography/_tags.html.erb +0 -25
  261. data/app/views/spree/admin/taxons/search.rabl +0 -5
  262. data/app/views/spree/admin/variants/new.js.erb +0 -1
  263. data/spec/features/admin/configuration/countries_spec.rb +0 -22
  264. data/spec/features/admin/configuration/states_spec.rb +0 -64
  265. data/spec/helpers/admin/reimbursements_helper_spec.rb +0 -34
  266. data/vendor/assets/javascripts/solidus_admin/tether.js +0 -1726
  267. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom.scss +0 -4
  268. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_normalize.scss +0 -461
  269. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_cards.scss +0 -47
  270. data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_transforms.scss +0 -14
@@ -1,49 +0,0 @@
1
- <%= render 'spree/admin/shared/areas_tabs' %>
2
-
3
- <% admin_breadcrumb(Spree.t(:settings)) %>
4
- <% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
5
- <% admin_breadcrumb(plural_resource_name(Spree::Country)) %>
6
-
7
- <% content_for :page_actions do %>
8
- <ul class="actions inline-menu">
9
- <% if can?(:create, Spree::Country) %>
10
- <li>
11
- <%= button_link_to Spree.t(:new_country), new_object_url, { id: 'admin_new_country' } %>
12
- </li>
13
- <% end %>
14
- </ul>
15
- <% end %>
16
-
17
- <table class="index" id='listing_countries' data-hook>
18
- <colgroup>
19
- <col style="width: 35%" />
20
- <col style="width: 35%" />
21
- <col style="width: 20%" />
22
- <col style="width: 10%" />
23
- </colgroup>
24
- <thead>
25
- <tr data-hook="tax_header">
26
- <th><%= Spree::Country.human_attribute_name(:name) %></th>
27
- <th><%= Spree::Country.human_attribute_name(:iso_name) %></th>
28
- <th><%= Spree::Country.human_attribute_name(:states_required) %></th>
29
- <th class="actions"></th>
30
- </tr>
31
- </thead>
32
- <tbody>
33
- <% @countries.each do |country| %>
34
- <tr id="<%= spree_dom_id country %>" data-hook="country_row" class="<%= cycle('odd', 'even')%>">
35
- <td><%= country.name %></td>
36
- <td><%= country.iso_name %></td>
37
- <td class="align-center"><%= country.states_required? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
38
- <td class="actions">
39
- <% if can?(:edit, country) %>
40
- <%= link_to_edit country, no_text: true %>
41
- <% end %>
42
- <% if can?(:destroy, country) %>
43
- <%= link_to_delete country, no_text: true %>
44
- <% end %>
45
- </td>
46
- </tr>
47
- <% end %>
48
- </tbody>
49
- </table>
@@ -1,18 +0,0 @@
1
- <%= render 'spree/admin/shared/areas_tabs' %>
2
-
3
- <% admin_breadcrumb(Spree.t(:settings)) %>
4
- <% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
5
- <% admin_breadcrumb(link_to plural_resource_name(Spree::Country), spree.admin_countries_path) %>
6
- <% admin_breadcrumb(Spree.t(:new_country)) %>
7
-
8
- <% content_for :page_actions do %>
9
- <% end %>
10
-
11
- <%= render partial: 'spree/shared/error_messages', locals: { target: @countries } %>
12
-
13
- <%= form_for [:admin, @country] do |f| %>
14
- <fieldset class="no-border-top">
15
- <%= render partial: 'form', locals: { f: f } %>
16
- <%= render partial: 'spree/admin/shared/new_resource_links' %>
17
- </fieldset>
18
- <% end %>
@@ -1,9 +0,0 @@
1
- object false
2
- node(:count) { @products.count }
3
- node(:total_count) { @products.total_count }
4
- node(:current_page) { params[:page] ? params[:page].to_i : 1 }
5
- node(:per_page) { params[:per_page] || Kaminari.config.default_per_page }
6
- node(:pages) { @products.total_pages }
7
- child(@products => :products) do
8
- attributes :id, :name
9
- end
@@ -1,30 +0,0 @@
1
- collection(@users => :users)
2
- attributes :email, :id
3
- address_fields = [:firstname, :lastname,
4
- :address1, :address2,
5
- :city, :zipcode,
6
- :phone, :state_name,
7
- :state_id, :country_id,
8
- :company]
9
-
10
- child :ship_address => :ship_address do
11
- attributes *address_fields
12
- child :state do
13
- attributes :name
14
- end
15
-
16
- child :country do
17
- attributes :name
18
- end
19
- end
20
-
21
- child :bill_address => :bill_address do
22
- attributes *address_fields
23
- child :state do
24
- attributes :name
25
- end
26
-
27
- child :country do
28
- attributes :name
29
- end
30
- end
@@ -1,19 +0,0 @@
1
- <% content_for :tabs do %>
2
- <nav>
3
- <ul class="tabs" data-hook="admin_settings_areas_tabs">
4
- <% if can? :display, Spree::Zone %>
5
- <%= settings_tab_item plural_resource_name(Spree::Zone), spree.admin_zones_path %>
6
- <% end %>
7
-
8
- <% if can? :display, Spree::Country %>
9
- <%= settings_tab_item plural_resource_name(Spree::Country), spree.admin_countries_path %>
10
- <% end %>
11
-
12
- <% if can?(:display, Spree::State) %>
13
- <% if country = Spree::Country.find_by(iso: Spree::Config[:default_country_iso]) || Spree::Country.first %>
14
- <%= settings_tab_item plural_resource_name(Spree::State), spree.admin_country_states_path(country) %>
15
- <% end %>
16
- <% end %>
17
- </ul>
18
- </nav>
19
- <% end %>
@@ -1,14 +0,0 @@
1
- <div data-hook="admin_state_form_fields" class="row">
2
- <div class="col-6">
3
- <%= f.field_container :name do %>
4
- <%= f.label :name %>
5
- <%= f.text_field :name, class: 'fullwidth' %>
6
- <% end %>
7
- </div>
8
- <div class="col-6">
9
- <%= f.field_container :abbr do %>
10
- <%= f.label :abbr %>
11
- <%= f.text_field :abbr, class: 'fullwidth' %>
12
- <% end %>
13
- </div>
14
- </div>
@@ -1,33 +0,0 @@
1
- <table class="index" id='listing_states' data-hook>
2
- <colgroup>
3
- <col style="width: 70%" />
4
- <col style="width: 15%" />
5
- <col style="width: 15%" />
6
- </colgroup>
7
- <thead>
8
- <tr data-hook="states_header">
9
- <th><%= Spree::State.human_attribute_name(:name) %></th>
10
- <th><%= Spree::State.human_attribute_name(:abbr) %></th>
11
- <th class="actions"></th>
12
- </tr>
13
- </thead>
14
- <tbody>
15
- <% @states.each do |state| %>
16
- <tr id="<%= spree_dom_id state %>" data-hook="states_row" class="<%= cycle('odd', 'even')%>">
17
- <td><%= state.name %></td>
18
- <td class="align-center"><%= state.abbr %></td>
19
- <td class="actions">
20
- <% if can?(:update, state) %>
21
- <%= link_to_with_icon 'edit', Spree.t('actions.edit'), edit_admin_country_state_url(@country, state), no_text: true %>
22
- <% end %>
23
- <% if can?(:destroy, state) %>
24
- <%= link_to_delete state, no_text: true %>
25
- <% end %>
26
- </td>
27
- </tr>
28
- <% end %>
29
- <% if @states.empty? %>
30
- <tr><td colspan="3"><%= Spree.t(:none) %></td></tr>
31
- <% end %>
32
- </tbody>
33
- </table>
@@ -1,19 +0,0 @@
1
- <%= render 'spree/admin/shared/areas_tabs' %>
2
-
3
- <% admin_breadcrumb(Spree.t(:settings)) %>
4
- <% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
5
- <% admin_breadcrumb(link_to plural_resource_name(Spree::State), spree.admin_states_path) %>
6
- <% admin_breadcrumb(@state.name) %>
7
-
8
-
9
- <% content_for :page_actions do %>
10
- <% end %>
11
-
12
- <%= render partial: 'spree/shared/error_messages', locals: { target: @state } %>
13
-
14
- <%= form_for [:admin, @country, @state] do |f| %>
15
- <fieldset class="no-border-top">
16
- <%= render partial: 'form', locals: { f: f } %>
17
- <%= render partial: 'spree/admin/shared/edit_resource_links' %>
18
- </fieldset>
19
- <% end %>
@@ -1,39 +0,0 @@
1
- <%= render 'spree/admin/shared/areas_tabs' %>
2
-
3
- <% admin_breadcrumb(Spree.t(:settings)) %>
4
- <% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
5
- <% admin_breadcrumb(plural_resource_name(Spree::State)) %>
6
-
7
-
8
- <% content_for :page_actions do %>
9
- <% if can?(:create, Spree::State) %>
10
- <li>
11
- <%= button_link_to Spree.t(:new_state), new_admin_country_state_url(@country), { id: 'new_state_link' } %>
12
- </li>
13
- <% end %>
14
- <% end %>
15
-
16
- <div class="row">
17
- <div class="col-12">
18
- <div data-hook="country" class="field">
19
- <%= label_tag :country, Spree::Country.model_name.human %>
20
- <select id="country" class='observe_field custom-select fullwidth' data-base-url="<%=admin_states_path(format: :js) %>?country_id=" data-update="#state-list">
21
- <%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
22
- </select>
23
- </div>
24
- </div>
25
- </div>
26
-
27
- <div id="new_state" data-hook>
28
- <%= form_for [:admin, @country, Spree::State.new] do |f| %>
29
- <fieldset>
30
- <legend><%= Spree.t(:new_state) %></legend>
31
- <%= render partial: 'form', locals: { f: f } %>
32
- <%= render partial: 'spree/admin/shared/new_resource_links' %>
33
- </fieldset>
34
- <% end %>
35
- </div>
36
-
37
- <div id="state-list" data-hook>
38
- <%= render partial: 'state_list'%>
39
- </div>
@@ -1,17 +0,0 @@
1
- <%= render 'spree/admin/shared/areas_tabs' %>
2
-
3
- <%= render partial: 'spree/shared/error_messages', locals: { target: @state } %>
4
-
5
- <% admin_breadcrumb(Spree.t(:settings)) %>
6
- <% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
7
- <% admin_breadcrumb(link_to plural_resource_name(Spree::State), spree.admin_states_path) %>
8
- <% admin_breadcrumb(Spree.t(:new_state)) %>
9
-
10
-
11
- <%= form_for [:admin, @country, @state] do |f| %>
12
- <fieldset>
13
- <legend><%= Spree.t(:new_state) %></legend>
14
- <%= render partial: 'form', locals: { f: f } %>
15
- <%= render partial: 'spree/admin/shared/new_resource_links' %>
16
- </fieldset>
17
- <% end %>
@@ -1,25 +0,0 @@
1
- <%- snippet = capture do %>
2
- <span class="state ready">ready</span>
3
- <span class="state paid">paid</span>
4
- <span class="state complete">complete</span>
5
- <span class="state completed">completed</span>
6
- <span class="state balance_due">balance due</span>
7
- <span class="state pending">pending</span>
8
- <span class="state checkout">checkout</span>
9
- <span class="state credit_owed">credit owed</span>
10
- <span class="state void">void</span>
11
- <span class="state address">address</span>
12
- <%- end %>
13
-
14
- <div class="half">
15
- <p>
16
- 3 different visual states to describe ok/success, warnings and errors.
17
- </p>
18
- <p class="tags">
19
- <%= snippet %>
20
- </p>
21
- </div>
22
-
23
- <div class="style-guide-code half">
24
- <pre><code class="language-html"><%= escape_once snippet %></code></pre>
25
- </div>
@@ -1,5 +0,0 @@
1
- object false
2
- child(@taxons => :taxons) do
3
- attributes :name, :pretty_name, :id
4
- end
5
-
@@ -1 +0,0 @@
1
- $(".js-content-below-tabs").html('<%= escape_javascript(render template: 'spree/admin/variants/new', formats: [:html], handlers: [:erb]) %>');
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Spree
4
- describe "Countries", type: :feature do
5
- stub_authorization!
6
-
7
- it "deletes a country", js: true do
8
- visit spree.admin_countries_path
9
- click_link "New Country"
10
-
11
- fill_in "Name", with: "Brazil"
12
- fill_in "ISO Name", with: "BRL"
13
- click_button "Create"
14
-
15
- accept_alert do
16
- click_icon :trash
17
- end
18
-
19
- expect(page).to have_content 'Country "Brazil" has been successfully removed!'
20
- end
21
- end
22
- end
@@ -1,64 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "States", type: :feature do
4
- stub_authorization!
5
-
6
- let!(:country) { create(:country) }
7
-
8
- let!(:hungary) do
9
- Spree::Country.create!(name: "Hungary", iso_name: "Hungary")
10
- end
11
-
12
- def go_to_states_page
13
- visit spree.admin_country_states_path(country)
14
- expect(page).to have_css("#new_state_link")
15
- end
16
-
17
- context "admin visiting states listing" do
18
- let!(:state) { create(:state, country: country) }
19
-
20
- it "should correctly display the states" do
21
- visit spree.admin_country_states_path(country)
22
- expect(page).to have_content(state.name)
23
- end
24
- end
25
-
26
- context "creating and editing states" do
27
- it "should allow an admin to edit existing states", js: true do
28
- go_to_states_page
29
- select country.name, from: 'Country'
30
-
31
- click_link "new_state_link"
32
- fill_in "state_name", with: "Calgary"
33
- fill_in "Abbreviation", with: "CL"
34
- click_button "Create"
35
- expect(page).to have_content("successfully created!")
36
- expect(page).to have_content("Calgary")
37
- end
38
-
39
- it "should allow an admin to create states for non default countries", js: true do
40
- go_to_states_page
41
- select "Hungary", from: 'Country'
42
-
43
- click_link "new_state_link"
44
- fill_in "state_name", with: "Pest megye"
45
- fill_in "Abbreviation", with: "PE"
46
- click_button "Create"
47
- expect(page).to have_content("successfully created!")
48
- expect(page).to have_content("Pest megye")
49
- expect(page).to have_select('Country', selected: "Hungary")
50
- end
51
-
52
- it "should show validation errors", js: true do
53
- go_to_states_page
54
- select country.name, from: 'Country'
55
-
56
- click_link "new_state_link"
57
-
58
- fill_in "state_name", with: ""
59
- fill_in "Abbreviation", with: ""
60
- click_button "Create"
61
- expect(page).to have_content("Name can't be blank")
62
- end
63
- end
64
- end
@@ -1,34 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spree::Admin::ReimbursementsHelper, type: :helper do
4
- describe '.reimbursement_status_color' do
5
- subject { helper.reimbursement_status_color(reimbursement) }
6
-
7
- let(:reimbursement) do
8
- Spree::Reimbursement.new(reimbursement_status: status)
9
- end
10
-
11
- context 'when status is reimbursed' do
12
- let(:status) { 'reimbursed' }
13
- it { is_expected.to eq 'success' }
14
- end
15
-
16
- context 'when status is pending' do
17
- let(:status) { 'pending' }
18
- it { is_expected.to eq 'notice' }
19
- end
20
-
21
- context 'when status is pending' do
22
- let(:status) { 'errored' }
23
- it { is_expected.to eq 'error' }
24
- end
25
-
26
- context 'when status is not valid' do
27
- let(:status) { 'noop' }
28
-
29
- it 'should raise an error' do
30
- expect{ subject }.to raise_error(RuntimeError, "unknown reimbursement status: noop")
31
- end
32
- end
33
- end
34
- end