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
@@ -20,10 +20,10 @@
20
20
  </tr>
21
21
  </thead>
22
22
  <% master_prices.each do |price| %>
23
- <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
23
+ <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>">
24
24
  <td><%= price.display_country %></td>
25
25
  <td><%= price.currency %></td>
26
- <td class="align-right"><%= price.money.to_html %></td>
26
+ <td><%= price.money.to_html %></td>
27
27
  <td class="actions">
28
28
  <% if can?(:update, price) %>
29
29
  <%= link_to_edit(price, no_text: true) unless price.deleted? %>
@@ -14,11 +14,11 @@
14
14
  </thead>
15
15
  <tbody>
16
16
  <% variant_prices.each do |price| %>
17
- <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
17
+ <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %>">
18
18
  <td><%= price.variant.descriptive_name %></td>
19
19
  <td><%= price.display_country %></td>
20
20
  <td><%= price.currency %></td>
21
- <td class="align-right"><%= price.money.to_html %></td>
21
+ <td><%= price.money.to_html %></td>
22
22
  <td class="actions">
23
23
  <% if can?(:update, price) %>
24
24
  <%= link_to_edit(price, no_text: true) unless price.deleted? %>
@@ -1,5 +1,5 @@
1
1
  <tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">
2
- <td class="no-border">
2
+ <td>
3
3
  <% if f.object.persisted? && can?(:update_positions, f.object) %>
4
4
  <span class="handle"></span>
5
5
  <%= f.hidden_field :id %>
@@ -21,7 +21,8 @@
21
21
  <table class="index sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
22
22
  <thead>
23
23
  <tr data-hook="product_properties_header">
24
- <th colspan="2"><%= Spree::Property.model_name.human %></th>
24
+ <th></th>
25
+ <th><%= Spree::Property.model_name.human %></th>
25
26
  <th><%= Spree::ProductProperty.human_attribute_name(:value) %></th>
26
27
  <th class="actions"></th>
27
28
  </tr>
@@ -70,7 +71,8 @@
70
71
  <table class="index sortable" data-hook data-sortable-link="<%= update_positions_admin_product_variant_property_rule_values_url %>">
71
72
  <thead>
72
73
  <tr data-hook="variant_property_values_header">
73
- <th colspan="2"><%= Spree::Property.model_name.human %></th>
74
+ <th></th>
75
+ <th><%= Spree::Property.model_name.human %></th>
74
76
  <th><%= Spree::ProductProperty.human_attribute_name(:value) %></th>
75
77
  <th class="actions"></th>
76
78
  </tr>
@@ -56,26 +56,27 @@
56
56
  <table class="index" id="listing_products">
57
57
  <colgroup>
58
58
  <col style="width: 15%;">
59
- <col style="width: 10%;">
60
- <col style="width: 48%;">
61
- <col style="width: 10%;">
62
- <col style="width: 17%;">
59
+ <col style="width: 5%;">
60
+ <col style="width: 50%;">
61
+ <col style="width: 15%;">
62
+ <col style="width: 15%;">
63
63
  </colgroup>
64
64
  <thead>
65
65
  <tr data-hook="admin_products_index_headers">
66
66
  <th><%= Spree::Variant.human_attribute_name(:sku) %></th>
67
- <th colspan="2"><%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
68
- <th><%= sort_link @search,:master_default_price_amount, Spree::Product.human_attribute_name(:price), {}, {title: 'admin_products_listing_price_title'} %></th>
67
+ <th></th>
68
+ <th><%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
69
+ <th class="align-right"><%= sort_link @search,:master_default_price_amount, Spree::Product.human_attribute_name(:price), {}, {title: 'admin_products_listing_price_title'} %></th>
69
70
  <th data-hook="admin_products_index_header_actions" class="actions"></th>
70
71
  </tr>
71
72
  </thead>
72
73
  <tbody>
73
74
  <% @collection.each do |product| %>
74
- <tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
75
- <td class="align-center"><%= product.sku %></td>
75
+ <tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows">
76
+ <td><%= product.sku %></td>
76
77
  <td class="align-center"><%= render 'spree/admin/shared/image', image: product.display_image, size: :mini %></td>
77
78
  <td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
78
- <td class="align-center"><%= product.display_price.to_html %></td>
79
+ <td class="align-right"><%= product.display_price.to_html %></td>
79
80
  <td class="actions" data-hook="admin_products_index_row_actions">
80
81
  <%= link_to_edit product, no_text: true, class: 'edit' if can?(:edit, product) && !product.deleted? %>
81
82
  &nbsp;
@@ -1,6 +1,6 @@
1
1
  <%= render(
2
2
  "spree/admin/promotions/actions/promotion_calculators_with_custom_fields",
3
- calculators: Spree::Promotion::Actions::CreateItemAdjustments.calculators,
3
+ calculators: Rails.application.config.spree.calculators.promotion_actions_create_item_adjustments,
4
4
  promotion_action: promotion_action,
5
5
  param_prefix: param_prefix
6
6
  ) %>
@@ -12,7 +12,7 @@
12
12
  </div>
13
13
 
14
14
  <div class="col-6">
15
- <div class="settings field">
15
+ <div class="settings">
16
16
  <% calculators.each do |calculator_class| %>
17
17
  <% calculator = promotion_action.calculator.class == calculator_class ? promotion_action.calculator : calculator_class.new %>
18
18
  <div class="js-calculator-preferences" data-calculator-type="<%= calculator_class %>">
@@ -1,8 +1,5 @@
1
1
  <% calculator.preferences.keys.map do |key| %>
2
- <% field_name = "#{prefix}[calculator_attributes][preferred_#{key}]" %>
3
- <%= label_tag field_name, Spree.t(key.to_s) %>
4
- <%= preference_field_tag(
5
- field_name,
6
- calculator.get_preference(key),
7
- type: calculator.preference_type(key)) %>
2
+ <%= render "spree/admin/shared/preference_fields/#{calculator.preference_type(key)}",
3
+ name: "#{prefix}[calculator_attributes][preferred_#{key}]",
4
+ value: calculator.get_preference(key), label: Spree.t(key.to_s) %>
8
5
  <% end %>
@@ -1,11 +1,6 @@
1
- <div class="field">
2
- <%= label_tag "#{prefix}[calculator_attributes][preferred_base_amount]",
3
- Spree.t(:base_amount) %>
4
- <%= preference_field_tag(
5
- "#{prefix}[calculator_attributes][preferred_base_amount]",
6
- calculator.preferred_base_amount,
7
- type: calculator.preference_type(:base_amount)) %>
8
- </div>
1
+ <%= render "spree/admin/shared/preference_fields/#{calculator.preference_type(:base_amount)}",
2
+ name: "#{prefix}[calculator_attributes][preferred_base_amount]",
3
+ value: calculator.preferred_base_amount, label: Spree.t(:base_amount) %>
9
4
 
10
5
  <div class="field">
11
6
  <%= label_tag(
@@ -1,11 +1,6 @@
1
- <div class="field">
2
- <%= label_tag "#{prefix}[calculator_attributes][preferred_base_percent]",
3
- Spree.t(:base_percent) %>
4
- <%= preference_field_tag(
5
- "#{prefix}[calculator_attributes][preferred_base_percent]",
6
- calculator.preferred_base_percent,
7
- type: calculator.preference_type(:base_percent)) %>
8
- </div>
1
+ <%= render "spree/admin/shared/preference_fields/#{calculator.preference_type(:base_percent)}",
2
+ name: "#{prefix}[calculator_attributes][preferred_base_percent]",
3
+ value: calculator.preferred_base_percent, label: Spree.t(:base_percent) %>
9
4
 
10
5
  <div class="field">
11
6
  <%= label_tag(
@@ -61,35 +61,42 @@
61
61
 
62
62
  <% if @promotions.any? %>
63
63
  <table class="index">
64
- <colgroup>
65
- <col style="width: 20%">
66
- <col style="width: 10%">
67
- <col style="width: 30%">
68
- <col style="width: 10%">
69
- <col style="width: 10%">
70
- <col style="width: 10%">
71
- <col style="width: 10%">
72
- </colgroup>
73
64
  <thead>
74
65
  <tr>
75
66
  <th><%= Spree::Promotion.human_attribute_name(:name) %></th>
76
67
  <th><%= Spree::Promotion.human_attribute_name(:code) %></th>
77
- <th><%= Spree::Promotion.human_attribute_name(:description) %></th>
68
+ <th><%= Spree::Promotion.human_attribute_name(:status) %></th>
78
69
  <th><%= Spree::Promotion.human_attribute_name(:usage_limit) %></th>
79
- <th><%= Spree::Promotion.human_attribute_name(:promotion_uses) %></th>
70
+ <th><%= Spree::Promotion.human_attribute_name(:uses) %></th>
71
+ <th><%= Spree::Promotion.human_attribute_name(:starts_at) %></th>
80
72
  <th><%= Spree::Promotion.human_attribute_name(:expires_at) %></th>
81
73
  <th class="actions"></th>
82
74
  </tr>
83
75
  </thead>
84
76
  <tbody>
85
77
  <% @promotions.each do |promotion| %>
86
- <tr id="<%= spree_dom_id promotion %>" class="<%= cycle('odd', 'even')%>">
78
+ <tr id="<%= spree_dom_id promotion %>">
87
79
  <td><%= promotion.name %></td>
88
- <td class="align-center"><%= (promotion.codes.size == 1) ? promotion.codes.first.try!(:value) : Spree.t(:number_of_codes, count: promotion.codes.size) %></td>
89
- <td><%= promotion.description %></td>
90
- <td class="align-center"><%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %></td>
91
- <td class="align-center"><%= Spree.t(:current_promotion_usage, count: promotion.usage_count) %></td>
92
- <td class="align-center"><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
80
+ <td>
81
+ <%= (promotion.codes.size == 1) ? promotion.codes.first.try!(:value) : Spree.t(:number_of_codes, count: promotion.codes.size) %>
82
+ </td>
83
+ <td>
84
+ <span class="pill pill-<%= promotion.active? ? 'active' : 'inactive' %>">
85
+ <%= Spree.t(promotion.active?? :active : :inactive) %>
86
+ </span>
87
+ </td>
88
+ <td>
89
+ <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %>
90
+ </td>
91
+ <td>
92
+ <%= promotion.usage_count %>
93
+ </td>
94
+ <td>
95
+ <%= promotion.starts_at.to_date.to_s(:short_date) if promotion.starts_at %>
96
+ </td>
97
+ <td>
98
+ <%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %>
99
+ </td>
93
100
  <td class="actions">
94
101
  <% if can?(:edit, promotion) %>
95
102
  <%= link_to_edit promotion, no_text: true %>
@@ -1,11 +1,11 @@
1
- <div class="field alpha omega eight columns">
1
+ <div class="form-group">
2
2
  <%= label_tag "#{param_prefix}_preferred_role_ids", Spree.t('user_role_rule.choose_roles') %>
3
3
  <%= select_tag "#{param_prefix}[preferred_role_ids]",
4
4
  options_from_collection_for_select(
5
5
  Spree::Role.all, :id, :name, promotion_rule.preferred_role_ids
6
6
  ), class: 'custom-select fullwidth', multiple: true %>
7
7
  </div>
8
- <div class="field alpha omega eight columns">
8
+ <div class="form-group">
9
9
  <label>
10
10
  <%= Spree.t('user_role_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::UserRole::MATCH_POLICIES.map{ |s| [Spree.t("user_role_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), { class: 'custom-select'})).html_safe %>
11
11
  </label>
@@ -59,9 +59,9 @@
59
59
  </thead>
60
60
  <tbody>
61
61
  <% @properties.each do |property| %>
62
- <tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row" class="<%= cycle('odd', 'even')%>">
63
- <td style="padding-left:1em"><%= property.name %></td>
64
- <td style="padding-left:1em"><%= property.presentation %></td>
62
+ <tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row">
63
+ <td><%= property.name %></td>
64
+ <td><%= property.presentation %></td>
65
65
  <td class="actions">
66
66
  <% if can?(:update, property) %>
67
67
  <%= link_to_edit(property, no_text: true) %>
@@ -25,18 +25,20 @@
25
25
  <thead>
26
26
  <tr data-hook="named_types_header">
27
27
  <th><%= Spree::RefundReason.human_attribute_name(:name) %></th>
28
- <th><%= Spree::RefundReason.human_attribute_name(:active) %></th>
28
+ <th><%= Spree::RefundReason.human_attribute_name(:state) %></th>
29
29
  <th class="actions"></th>
30
30
  </tr>
31
31
  </thead>
32
32
  <tbody>
33
33
  <% @collection.each do |named_type| %>
34
- <tr id="<%= spree_dom_id named_type %>" data-hook="named_type_row" class="<%= cycle('odd', 'even')%>">
35
- <td class="align-center">
34
+ <tr id="<%= spree_dom_id named_type %>" data-hook="named_type_row">
35
+ <td>
36
36
  <%= named_type.name %>
37
37
  </td>
38
- <td class="align-center">
39
- <%= Spree.t(named_type.active? ? :say_yes : :say_no) %>
38
+ <td>
39
+ <span class="pill pill-<%= named_type.active? ? 'active' : 'inactive' %>">
40
+ <%= Spree.t(named_type.active? ? :active : :inactive) %>
41
+ </span>
40
42
  </td>
41
43
  <td class="actions">
42
44
  <% if can?(:update, named_type) && named_type.mutable? %>
@@ -23,7 +23,7 @@
23
23
  <div class="col-3">
24
24
  <div class="field">
25
25
  <%= f.label :amount %><br/>
26
- <%= f.text_field :amount, class: 'fullwidth' %>
26
+ <%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :amount, currency: @refund.currency, required: true %>
27
27
  </div>
28
28
  </div>
29
29
  <div class="col-3">
@@ -14,8 +14,8 @@
14
14
  </thead>
15
15
  <tbody>
16
16
  <% @reimbursement_types.each do |reimbursement_type| %>
17
- <tr id="<%= spree_dom_id reimbursement_type %>" data-hook="reimbursement_type_row" class="<%= cycle('odd', 'even')%>">
18
- <td class="align-center">
17
+ <tr id="<%= spree_dom_id reimbursement_type %>" data-hook="reimbursement_type_row">
18
+ <td>
19
19
  <%= reimbursement_type.name.humanize %>
20
20
  </td>
21
21
  <td>
@@ -32,23 +32,23 @@
32
32
  <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
33
33
  <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
34
34
  </td>
35
- <td class="align-center">
35
+ <td>
36
36
  <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
37
37
  </td>
38
- <td class='align-center'>
38
+ <td>
39
39
  <%= item_fields.select(:override_reimbursement_type_id,
40
40
  reimbursement_types.collect { |r| [r.name.humanize, r.id] },
41
41
  {include_blank: true},
42
42
  {class: 'custom-select fullwidth'}
43
43
  ) %>
44
44
  </td>
45
- <td class="align-center">
45
+ <td>
46
46
  <%= item_fields.text_field :amount, { class: 'refund-amount-input' } %>
47
47
  </td>
48
- <td class="align-center">
48
+ <td>
49
49
  <%= return_item.display_total %>
50
50
  </td>
51
- <td class="align-center">
51
+ <td>
52
52
  <% if return_item.exchange_processed? %>
53
53
  <%= return_item.exchange_variant.exchange_name %>
54
54
  <% else %>
@@ -82,7 +82,7 @@
82
82
  </thead>
83
83
  <tbody>
84
84
  <% @reimbursement_objects.each do |reimbursement_object| %>
85
- <tr id="<%= spree_dom_id(reimbursement_object) %>" data-hook="reimbursement_reimbursement_object_row" class="<%= cycle('odd', 'even')%>">
85
+ <tr id="<%= spree_dom_id(reimbursement_object) %>" data-hook="reimbursement_reimbursement_object_row">
86
86
  <td><%= reimbursement_object.class.name.demodulize %></td>
87
87
  <td><%= reimbursement_object.description %></td>
88
88
  <td><%= reimbursement_object.display_amount %></td>
@@ -19,10 +19,17 @@
19
19
  </thead>
20
20
  <tbody>
21
21
  <% @reimbursements.each do |reimbursement| %>
22
- <tr id="<%= spree_dom_id(reimbursement) %>" data-hook="reimbursement_row" class="<%= cycle('odd', 'even')%>">
22
+ <tr id="<%= spree_dom_id(reimbursement) %>" data-hook="reimbursement_row">
23
23
  <td><%= reimbursement.id %></td>
24
24
  <td><%= reimbursement.total %></td>
25
- <td><%= reimbursement.reimbursement_status %></td>
25
+ <td>
26
+ <span class="pill pill-<%= reimbursement.reimbursement_status %>">
27
+ <%= Spree.t(
28
+ reimbursement.reimbursement_status,
29
+ scope: :reimbursement_states
30
+ ) %>
31
+ </span>
32
+ </td>
26
33
  <td><%= pretty_time(reimbursement.created_at) %></td>
27
34
  </tr>
28
35
  <% end %>
@@ -30,19 +30,19 @@
30
30
  <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
31
31
  <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
32
32
  </td>
33
- <td class="align-center">
33
+ <td>
34
34
  <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
35
35
  </td>
36
- <td class='align-center'>
36
+ <td>
37
37
  <%= reimbursement_type_name(return_item.override_reimbursement_type) %>
38
38
  </td>
39
39
  <td>
40
40
  <%= return_item.exchange_variant.try(:exchange_name) %>
41
41
  </td>
42
- <td class="align-center">
42
+ <td>
43
43
  <%= return_item.display_amount %>
44
44
  </td>
45
- <td class="align-center">
45
+ <td>
46
46
  <%= return_item.display_total %>
47
47
  </td>
48
48
  </tr>
@@ -63,7 +63,7 @@
63
63
  </thead>
64
64
  <tbody>
65
65
  <% @reimbursement.refunds.each do |refund| %>
66
- <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row" class="reimbursement-refund <%= cycle('odd', 'even')%>">
66
+ <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row" class="reimbursement-refund">
67
67
  <td class="reimbursement-refund-description"><%= refund.description %></td>
68
68
  <td class="reimbursement-refund-amount"><%= refund.display_amount %></td>
69
69
  </tr>
@@ -83,7 +83,7 @@
83
83
  </thead>
84
84
  <tbody>
85
85
  <% @reimbursement.credits.each do |credit| %>
86
- <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row" class="reimbursement-credit <%= cycle('odd', 'even')%>">
86
+ <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row" class="reimbursement-credit">
87
87
  <td class="reimbursement-credit-description"><%= credit.description %></td>
88
88
  <td class="reimbursement-credit-amount"><%= credit.display_amount %></td>
89
89
  </tr>
@@ -11,8 +11,8 @@
11
11
  <tbody>
12
12
  <% @reports.each do |key, value| %>
13
13
  <tr data-hook="reports_row">
14
- <td class="align-center"><%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %></td>
15
- <td style="padding-left:1em"><%= value[:description] %></td>
14
+ <td><%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %></td>
15
+ <td><%= value[:description] %></td>
16
16
  </tr>
17
17
  <% end %>
18
18
  </tbody>
@@ -24,7 +24,7 @@
24
24
  </thead>
25
25
  <tbody>
26
26
  <% @totals.each do |key, row| %>
27
- <tr class="align-center">
27
+ <tr>
28
28
  <td><%= key %></td>
29
29
  <td><%= row[:item_total].format %></td>
30
30
  <td><%= row[:adjustment_total].format %></td>
@@ -24,7 +24,7 @@
24
24
  <% inventory_unit = return_item.inventory_unit %>
25
25
  <% editable = inventory_unit.shipped? && !inventory_unit.exchange_requested? && allow_return_item_changes && return_item.reimbursement.nil? %>
26
26
  <tr>
27
- <td class="return-item-checkbox align-center inventory-unit-checkbox">
27
+ <td class="return-item-checkbox inventory-unit-checkbox">
28
28
  <% if editable %>
29
29
  <%= item_fields.hidden_field :inventory_unit_id %>
30
30
  <%= item_fields.check_box :_destroy, {checked: return_item.persisted?, class: 'add-item', "data-price" => return_item.amount}, '0', '1' %>
@@ -34,11 +34,15 @@
34
34
  <div class="variant-name"><%= inventory_unit.variant.name %></div>
35
35
  <div class="variant-options"><%= inventory_unit.variant.options_text %></div>
36
36
  </td>
37
- <td class="return-item-state align-center"><%= inventory_unit.state.humanize %></td>
38
- <td class="return-item-charged align-center">
37
+ <td class="return-item-state">
38
+ <span class="pill pill-<%= inventory_unit.state %>">
39
+ <%= Spree.t(inventory_unit.state, scope: :inventory_states) %>
40
+ </span>
41
+ </td>
42
+ <td class="return-item-charged">
39
43
  <%= return_item.display_amount %>
40
44
  </td>
41
- <td class="return-item-pre-tax-refund-amount align-center">
45
+ <td class="return-item-pre-tax-refund-amount">
42
46
  <% if editable %>
43
47
  <%= item_fields.text_field :amount, { class: 'refund-amount-input' } %>
44
48
  <% else %>
@@ -52,7 +56,7 @@
52
56
  <%= return_item.preferred_reimbursement_type.try(:name) %>
53
57
  <% end %>
54
58
  </td>
55
- <td class="return-item-exchange-for align-center">
59
+ <td class="return-item-exchange-for">
56
60
  <% if editable %>
57
61
  <%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "custom-select fullwidth return-item-exchange-selection" } %>
58
62
  <% elsif return_item.exchange_processed? %>
@@ -9,8 +9,15 @@
9
9
  <%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Return Authorizations' } %>
10
10
 
11
11
  <% admin_breadcrumb(link_to plural_resource_name(Spree::ReturnAuthorization), spree.admin_order_return_authorizations_url) %>
12
- <% admin_breadcrumb("#{@return_authorization.number} (#{Spree.t(@return_authorization.state.downcase)})") %>
13
-
12
+ <% admin_breadcrumb(
13
+ """
14
+ #{ @return_authorization.number }
15
+ (#{ Spree.t(
16
+ @return_authorization.state,
17
+ scope: :return_authorization_states
18
+ ) })
19
+ """
20
+ ) %>
14
21
 
15
22
  <%= render partial: 'spree/shared/error_messages', locals: { target: @return_authorization } %>
16
23
 
@@ -19,17 +19,24 @@
19
19
  <tr>
20
20
  <th><%= Spree::ReturnAuthorization.human_attribute_name(:number) %></th>
21
21
  <th><%= Spree::ReturnAuthorization.human_attribute_name(:state) %></th>
22
- <th><%= Spree::ReturnAuthorization.human_attribute_name(:pre_tax_total) %></th>
22
+ <th><%= Spree::ReturnAuthorization.human_attribute_name(:total_excluding_vat) %></th>
23
23
  <th><%= Spree::ReturnAuthorization.human_attribute_name(:created_at) %></th>
24
24
  <th class="actions"></th>
25
25
  </tr>
26
26
  </thead>
27
27
  <tbody>
28
28
  <% @return_authorizations.each do |return_authorization| %>
29
- <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
29
+ <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row">
30
30
  <td><%= return_authorization.number %></td>
31
- <td><%= Spree.t(return_authorization.state.downcase) %></td>
32
- <td><%= return_authorization.display_pre_tax_total.to_html %></td>
31
+ <td>
32
+ <span class="pill pill-<%= return_authorization.state %>">
33
+ <%= Spree.t(
34
+ return_authorization.state,
35
+ scope: :return_authorization_states
36
+ ) %>
37
+ </span>
38
+ </td>
39
+ <td><%= return_authorization.display_total_excluding_vat.to_html %></td>
33
40
  <td><%= pretty_time(return_authorization.created_at) %></td>
34
41
  <td class="actions">
35
42
  <% if can? :update, return_authorization %>
@@ -0,0 +1,10 @@
1
+ json.products(@products) do |product|
2
+ json.id product.id
3
+ json.name product.name
4
+ end
5
+
6
+ json.count @products.count
7
+ json.total_count @products.total_count
8
+ json.current_page params[:page] ? params[:page].to_i : 1
9
+ json.per_page params[:per_page] || Kaminari.config.default_per_page
10
+ json.pages @products.total_pages
@@ -0,0 +1,37 @@
1
+ json.array!(@users) do |user|
2
+ json.id user.id
3
+ json.email user.email
4
+
5
+ address_fields = [:firstname, :lastname, :address1, :address2, :city, :zipcode, :phone, :state_name, :state_id, :country_id, :company]
6
+ json.ship_address do
7
+ if user.ship_address
8
+ json.(user.ship_address, *address_fields)
9
+ if user.ship_address.state
10
+ json.state do
11
+ json.name user.ship_address.state.name
12
+ end
13
+ end
14
+ if user.ship_address.country
15
+ json.country do
16
+ json.name user.ship_address.country.name
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ json.bill_address do
23
+ if user.bill_address
24
+ json.(user.bill_address, *address_fields)
25
+ if user.bill_address.state
26
+ json.state do
27
+ json.name user.bill_address.state.name
28
+ end
29
+ end
30
+ if user.bill_address.country
31
+ json.country do
32
+ json.name user.bill_address.country.name
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -11,7 +11,10 @@
11
11
  <% calculator = f.object.calculator.class == calculator_class ? f.object.calculator : calculator_class.new %>
12
12
  <div class="js-calculator-preferences" data-calculator-type="<%= calculator_class %>">
13
13
  <%= f.fields_for :calculator, calculator do |calculator_form| %>
14
- <%= preference_fields(calculator, calculator_form) %>
14
+ <% calculator.preferences.keys.each do |key| %>
15
+ <%= render "spree/admin/shared/preference_fields/#{calculator.preference_type(key)}",
16
+ form: calculator_form, attribute: "preferred_#{key}", label: Spree.t(key) %>
17
+ <% end %>
15
18
  <% end %>
16
19
  </div>
17
20
  <% end %>
@@ -0,0 +1,18 @@
1
+ <div class="modal fade" id="<%= target %>" role="dialog" aria-labelledby="<%= target %>" aria-hidden="true">
2
+ <div class="modal-dialog" role="document">
3
+ <div class="modal-content">
4
+ <div class="modal-header">
5
+ <h5 class="modal-title" id="<%= target %>"><%= title %></h5>
6
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
7
+ <span aria-hidden="true">&times;</span>
8
+ </button>
9
+ </div>
10
+ <div class="modal-body">
11
+ <%= content %>
12
+ </div>
13
+ <div class="modal-footer">
14
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </div>
@@ -1,5 +1,5 @@
1
1
  <% if can?(:update, resource) %>
2
2
  <%= link_to_with_icon 'edit', Spree.t('actions.edit'), '#', no_text: true, data: { action: 'edit', id: resource.id } %>
3
- <%= link_to_with_icon 'check', Spree.t('actions.update'), '#', no_text: true, data: update_data.merge(action: 'green', id: resource.id) %>
4
- <%= link_to_with_icon 'void', Spree.t('actions.cancel'), '#', no_text: true, data: { action: 'red', id: resource.id } %>
3
+ <%= link_to_with_icon 'check', Spree.t('actions.update'), '#', no_text: true, data: update_data.merge(action: 'save', id: resource.id) %>
4
+ <%= link_to_with_icon 'cancel', Spree.t('actions.cancel'), '#', no_text: true, data: { action: 'cancel', id: resource.id } %>
5
5
  <% end %>
@@ -1,4 +1,4 @@
1
- <td class="align-center" id="number-update-<%= resource_id %>">
1
+ <td id="number-update-<%= resource_id %>">
2
2
  <span class="js-number-update-text"><%= number_value %></span>
3
3
  <%= number_field_tag field_tag, number_value, id: "#{field_tag.to_s}_#{resource_id}", class: 'fullwidth js-number-update-input' %>
4
4
  </td>