spree_backend 4.2.4 → 4.3.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/config/spree_backend_manifest.js +129 -0
  4. data/app/assets/images/backend-arrows-fullscreen.svg +3 -0
  5. data/app/assets/images/backend-box.svg +3 -0
  6. data/app/assets/images/backend-circle-fill.svg +3 -0
  7. data/app/assets/images/backend-circle.svg +3 -0
  8. data/app/assets/images/backend-default-layout.svg +6 -0
  9. data/app/assets/images/backend-eye-slash-fill.svg +4 -0
  10. data/app/assets/images/backend-file-richtext.svg +4 -0
  11. data/app/assets/images/backend-fullscreen-exit.svg +3 -0
  12. data/app/assets/images/backend-fullscreen.svg +3 -0
  13. data/app/assets/images/backend-mobile.svg +5 -0
  14. data/app/assets/images/backend-pages.svg +10 -0
  15. data/app/assets/images/backend-phone.svg +4 -0
  16. data/app/assets/images/backend-reversed-layout.svg +6 -0
  17. data/app/assets/images/backend-spree-icon.svg +1 -0
  18. data/app/assets/images/backend-spree-logo.svg +6 -0
  19. data/app/assets/images/backend-store.svg +2 -13
  20. data/app/assets/images/backend-translate.svg +4 -0
  21. data/app/assets/images/backend-users.svg +2 -5
  22. data/app/assets/images/backend-window-sidebar.svg +4 -0
  23. data/app/assets/images/noimage/backend-missing-image.svg +4 -0
  24. data/app/assets/images/noimage/large.png +0 -0
  25. data/app/assets/images/noimage/mini.png +0 -0
  26. data/app/assets/images/noimage/product.png +0 -0
  27. data/app/assets/images/noimage/small.png +0 -0
  28. data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
  29. data/app/assets/javascripts/spree/backend/admin.js +45 -307
  30. data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
  31. data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
  32. data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
  33. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
  34. data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
  35. data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
  36. data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
  37. data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
  38. data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
  39. data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
  40. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
  41. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
  42. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
  43. data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
  44. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
  45. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +156 -0
  46. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +61 -0
  47. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
  48. data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
  49. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
  50. data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
  51. data/app/assets/javascripts/spree/backend/menus/menu.es6 +57 -0
  52. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
  53. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +13 -17
  54. data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
  55. data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
  56. data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
  57. data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
  58. data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
  59. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +7 -1
  60. data/app/assets/javascripts/spree/backend/taxons.js +74 -73
  61. data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
  62. data/app/assets/javascripts/spree/backend.js +28 -1
  63. data/app/assets/javascripts/spree.js +78 -0
  64. data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
  65. data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
  66. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
  67. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
  68. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
  69. data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
  70. data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
  71. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
  72. data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
  73. data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
  74. data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
  75. data/app/assets/stylesheets/spree/backend/shared/_base.scss +75 -25
  76. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
  77. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  78. data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
  79. data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
  80. data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
  81. data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
  82. data/app/controllers/spree/admin/base_controller.rb +63 -3
  83. data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
  84. data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
  85. data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
  86. data/app/controllers/spree/admin/errors_controller.rb +11 -0
  87. data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
  88. data/app/controllers/spree/admin/images_controller.rb +8 -22
  89. data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
  90. data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
  91. data/app/controllers/spree/admin/menus_controller.rb +32 -0
  92. data/app/controllers/spree/admin/option_types_controller.rb +1 -1
  93. data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
  94. data/app/controllers/spree/admin/orders_controller.rb +23 -31
  95. data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
  96. data/app/controllers/spree/admin/payments_controller.rb +5 -10
  97. data/app/controllers/spree/admin/prices_controller.rb +2 -2
  98. data/app/controllers/spree/admin/products_controller.rb +21 -10
  99. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  100. data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
  101. data/app/controllers/spree/admin/promotions_controller.rb +3 -3
  102. data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
  103. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  104. data/app/controllers/spree/admin/reports_controller.rb +5 -1
  105. data/app/controllers/spree/admin/resource_controller.rb +32 -5
  106. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  107. data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
  108. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  109. data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
  110. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
  111. data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
  112. data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
  113. data/app/controllers/spree/admin/stores_controller.rb +14 -17
  114. data/app/controllers/spree/admin/taxons_controller.rb +9 -5
  115. data/app/controllers/spree/admin/users_controller.rb +9 -7
  116. data/app/controllers/spree/admin/variants_controller.rb +16 -15
  117. data/app/helpers/spree/admin/base_helper.rb +52 -14
  118. data/app/helpers/spree/admin/cms_helper.rb +15 -0
  119. data/app/helpers/spree/admin/menu_helper.rb +30 -0
  120. data/app/helpers/spree/admin/stores_helper.rb +21 -0
  121. data/app/models/spree/backend_configuration.rb +2 -0
  122. data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
  123. data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
  124. data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
  125. data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
  126. data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
  127. data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
  128. data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
  129. data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
  130. data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
  131. data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
  132. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
  133. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +62 -0
  134. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +177 -0
  135. data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
  136. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
  137. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
  138. data/app/views/spree/admin/countries/index.html.erb +5 -3
  139. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
  140. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
  141. data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
  142. data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
  143. data/app/views/spree/admin/images/index.html.erb +8 -4
  144. data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
  145. data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
  146. data/app/views/spree/admin/menu_items/new.html.erb +11 -0
  147. data/app/views/spree/admin/menus/_form.html.erb +19 -0
  148. data/app/views/spree/admin/menus/edit.html.erb +57 -0
  149. data/app/views/spree/admin/menus/index.html.erb +90 -0
  150. data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
  151. data/app/views/spree/admin/menus/new.html.erb +22 -0
  152. data/app/views/spree/admin/option_types/_form.html.erb +3 -0
  153. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
  154. data/app/views/spree/admin/option_types/index.html.erb +5 -3
  155. data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
  156. data/app/views/spree/admin/orders/_line_items.html.erb +10 -8
  157. data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
  158. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +11 -9
  159. data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
  160. data/app/views/spree/admin/orders/index.html.erb +100 -101
  161. data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
  162. data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
  163. data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
  164. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  165. data/app/views/spree/admin/payments/_list.html.erb +9 -7
  166. data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
  167. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
  168. data/app/views/spree/admin/products/_autocomplete.js.erb +10 -6
  169. data/app/views/spree/admin/products/_form.html.erb +35 -5
  170. data/app/views/spree/admin/products/index.html.erb +15 -14
  171. data/app/views/spree/admin/products/new.html.erb +6 -1
  172. data/app/views/spree/admin/products/stock.html.erb +71 -68
  173. data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
  174. data/app/views/spree/admin/promotions/_form.html.erb +7 -0
  175. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
  176. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
  177. data/app/views/spree/admin/promotions/index.html.erb +33 -34
  178. data/app/views/spree/admin/properties/_form.html.erb +6 -0
  179. data/app/views/spree/admin/properties/index.html.erb +19 -3
  180. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  181. data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
  182. data/app/views/spree/admin/prototypes/index.html.erb +5 -3
  183. data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
  184. data/app/views/spree/admin/reports/index.html.erb +1 -1
  185. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  186. data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
  187. data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
  188. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
  189. data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
  190. data/app/views/spree/admin/roles/index.html.erb +5 -3
  191. data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
  192. data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
  193. data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
  194. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  195. data/app/views/spree/admin/shared/_header.html.erb +7 -10
  196. data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
  197. data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
  198. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
  199. data/app/views/spree/admin/shared/_paths.html.erb +8 -0
  200. data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
  201. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  202. data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
  203. data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
  204. data/app/views/spree/admin/shared/_translations.html.erb +2 -0
  205. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +14 -0
  206. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +14 -0
  207. data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
  208. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +28 -0
  209. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
  210. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
  211. data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
  212. data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
  213. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
  214. data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
  215. data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
  216. data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
  217. data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
  218. data/app/views/spree/admin/states/_state_list.html.erb +5 -3
  219. data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
  220. data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
  221. data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
  222. data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
  223. data/app/views/spree/admin/store_credits/index.html.erb +7 -5
  224. data/app/views/spree/admin/stores/_form.html.erb +12 -2
  225. data/app/views/spree/admin/stores/index.html.erb +12 -10
  226. data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
  227. data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
  228. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
  229. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  230. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
  231. data/app/views/spree/admin/users/_lifetime_stats.html.erb +16 -4
  232. data/app/views/spree/admin/users/index.html.erb +5 -3
  233. data/app/views/spree/admin/users/items.html.erb +1 -1
  234. data/app/views/spree/admin/variants/_autocomplete.js.erb +6 -2
  235. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
  236. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
  237. data/app/views/spree/admin/variants/_split.js.erb +9 -7
  238. data/app/views/spree/admin/variants/index.html.erb +8 -5
  239. data/app/views/spree/admin/zones/index.html.erb +5 -3
  240. data/app/views/spree/layouts/admin.html.erb +16 -16
  241. data/config/initializers/assets.rb +5 -1
  242. data/config/routes.rb +14 -2
  243. data/lib/generators/spree/backend/install/install_generator.rb +22 -0
  244. data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
  245. data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
  246. data/lib/spree/backend/engine.rb +4 -11
  247. data/lib/spree/backend.rb +7 -4
  248. data/lib/spree_backend.rb +0 -2
  249. data/spec/fixtures/files/favicon.ico +0 -0
  250. data/spec/fixtures/files/icon_512x512.png +0 -0
  251. data/spree_backend.gemspec +16 -11
  252. data/vendor/assets/javascripts/cleave.js +8 -0
  253. data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
  254. data/vendor/assets/javascripts/jsuri.js +458 -0
  255. data/vendor/assets/javascripts/sortable.js +2 -3709
  256. data/vendor/assets/javascripts/sweetalert2.js +2 -0
  257. metadata +208 -42
  258. data/app/assets/javascripts/spree/backend/address_states.js +0 -44
  259. data/app/assets/javascripts/spree/frontend/backend.js +0 -1
  260. data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
  261. data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
@@ -13,9 +13,11 @@
13
13
  <tr id="<%= spree_dom_id state %>" data-hook="states_row">
14
14
  <td><%= state.name %></td>
15
15
  <td class="text-center"><%= state.abbr %></td>
16
- <td class="actions actions-2 text-right">
17
- <%= link_to_edit(state, no_text: true) if can? :edit, state %>
18
- <%= link_to_delete(state, no_text: true) if can? :delete, state %>
16
+ <td class="actions">
17
+ <span class="d-flex justify-content-end">
18
+ <%= link_to_edit(state, no_text: true) if can? :edit, state %>
19
+ <%= link_to_delete(state, no_text: true) if can? :delete, state %>
20
+ </span>
19
21
  </td>
20
22
  </tr>
21
23
  <% end %>
@@ -26,9 +26,11 @@
26
26
  <td><%= display_name(stock_location) %></td>
27
27
  <td><%= link_to Spree.t(:stock_movements), spree.admin_stock_location_stock_movements_path(stock_location.id) %> </td>
28
28
  <td><%= active_badge(stock_location.active, label: Spree.t(state(stock_location))) %></td>
29
- <td class="actions actions-2 text-center">
30
- <%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
31
- <%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
29
+ <td class="actions">
30
+ <span class="d-flex justify-content-end">
31
+ <%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
32
+ <%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
33
+ </span>
32
34
  </td>
33
35
  </tr>
34
36
  <% end %>
@@ -9,12 +9,11 @@
9
9
  <% content_for :table_filter do %>
10
10
  <div data-hook="admin_orders_index_search">
11
11
  <%= search_form_for @q, url: admin_stock_transfers_path do |f| %>
12
-
13
12
  <div class="row mb-0">
14
13
  <div class="col-12 col-lg-4">
15
14
  <div class="form-group">
16
15
  <%= f.label :reference_cont, Spree.t(:reference_contains) %>
17
- <%= f.text_field :reference_cont, class: 'form-control' %>
16
+ <%= f.text_field :reference_cont, class: 'form-control js-filterable js-quick-search-target' %>
18
17
  </div>
19
18
  </div>
20
19
 
@@ -73,8 +72,10 @@
73
72
  <% end %>
74
73
  </td>
75
74
  <td><%= stock_transfer.created_at.strftime('%F %T %Z') %></td>
76
- <td class="actions actions-1">
77
- <%= link_to_with_icon 'show', Spree.t(:show), admin_stock_transfer_path(stock_transfer), class: 'btn btn-outline-secondary btn-sm', no_text: true, data: {action: 'view'} %>
75
+ <td class="actions">
76
+ <span class="d-flex justify-content-end">
77
+ <%= link_to_with_icon 'view.svg', Spree.t(:show), admin_stock_transfer_path(stock_transfer), class: 'btn btn-outline-secondary btn-sm', no_text: true, data: {action: 'view'} %>
78
+ </span>
78
79
  </td>
79
80
  </tr>
80
81
  <% end %>
@@ -8,12 +8,14 @@
8
8
  <tr>
9
9
  <td>{{name}}</td>
10
10
  <td class='text-center'>{{quantity}}</td>
11
- <td class='actions actions-1 text-center'>
12
- <button class='icon_link btn btn-danger btn-sm transfer_remove_variant' data-variant-id='{{id}}'>
13
- <span class='icon icon-delete' data-variant-id='{{id}}'></span>
14
- </button>
15
- <input type='hidden' id='variant[]' name='variant[]' value='{{id}}'>
16
- <input type='hidden' id='quantity[]' name='quantity[]' value='{{quantity}}'>
11
+ <td class='actions'>
12
+ <span class='d-flex justify-content-center'>
13
+ <button class='icon_link btn btn-danger btn-sm transfer_remove_variant' data-variant-id='{{id}}'>
14
+ <span class='icon icon-delete' data-variant-id='{{id}}'></span>
15
+ </button>
16
+ <input type='hidden' id='variant[]' name='variant[]' value='{{id}}'>
17
+ <input type='hidden' id='quantity[]' name='quantity[]' value='{{quantity}}'>
18
+ </span>
17
19
  </td>
18
20
  </tr>
19
21
  {{/each}}
@@ -76,7 +78,7 @@
76
78
  <%= label_tag :transfer_variant_quantity, Spree.t(:quantity) %>
77
79
  <div class="input-group">
78
80
  <%= number_field_tag :transfer_variant_quantity, 1, class: 'form-control', min: 1 %>
79
- <span class="input-group-btn">
81
+ <span class="input-group-btn ml-2">
80
82
  <%= button Spree.t(:add), 'add.svg', 'submit', class: "transfer_add_variant" %>
81
83
  </span>
82
84
  </div>
@@ -19,9 +19,11 @@
19
19
  <% @store_credit_categories.each do |store_credit_category| %>
20
20
  <tr id="<%= spree_dom_id store_credit_category %>" data-hook="admin_store_credit_categories_index_rows">
21
21
  <td><%= store_credit_category.name %></td>
22
- <td class="actions text-right">
23
- <%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
24
- <%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
22
+ <td class="actions">
23
+ <span class="d-flex justify-content-end">
24
+ <%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
25
+ <%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
26
+ </span>
25
27
  </td>
26
28
  </tr>
27
29
  <% end %>
@@ -32,11 +32,13 @@
32
32
  <td><%= store_credit.category_name %></td>
33
33
  <td><%= store_credit.created_by_email %></td>
34
34
  <td><%= l store_credit.created_at.to_date %></td>
35
- <td class="actions actions-2 text-center" data-hook="admin_store_credits_index_row_actions">
36
- <% if store_credit.amount_used.zero? %>
37
- <%= link_to_edit_url spree.edit_admin_user_store_credit_path(@user, store_credit), no_text: true if can?(:edit, store_credit) %>
38
- <%= link_to_delete store_credit, no_text: true, url: spree.admin_user_store_credit_path(@user, store_credit) if can?(:destroy, store_credit) %>
39
- <% end %>
35
+ <td class="actions" data-hook="admin_store_credits_index_row_actions">
36
+ <span class="d-flex justify-content-end">
37
+ <% if store_credit.amount_used.zero? %>
38
+ <%= link_to_edit_url spree.edit_admin_user_store_credit_path(@user, store_credit), no_text: true if can?(:edit, store_credit) %>
39
+ <%= link_to_delete store_credit, no_text: true, url: spree.admin_user_store_credit_path(@user, store_credit) if can?(:destroy, store_credit) %>
40
+ <% end %>
41
+ </span>
40
42
  </td>
41
43
  </tr>
42
44
  <% end %>
@@ -25,10 +25,20 @@
25
25
  <% end %>
26
26
  <%= f.field_container :mailer_logo, class: ['form-group'] do %>
27
27
  <%= f.label :mailer_logo, Spree.t(:mailer_logo) %><br>
28
- <%= f.file_field :mailer_logo, accept: 'image/png, image/jpeg' %>
28
+ <%= f.file_field :mailer_logo, accept: Spree::Store::MAILER_LOGO_CONTENT_TYPES.join(',') %>
29
29
  <%= f.error_message_on :mailer_logo %>
30
30
  <% end %>
31
31
  <% end %>
32
+ <%= f.field_container :favicon_image, class: ['form-group'] do %>
33
+ <% if @store.favicon_image.attached? && @store.favicon_image.variable? %>
34
+ <%= image_tag main_app.url_for(@store.favicon_image.variant(resize: '104x104')) %>
35
+ <% end %>
36
+ <%= f.field_container :favicon_image, class: ['form-group'] do %>
37
+ <%= f.label :favicon_image, "#{Spree.t(:favicon)} (#{Spree.t(:favicon_upload_info)})" %><br>
38
+ <%= f.file_field :favicon_image, accept: Spree::Store::FAVICON_CONTENT_TYPES.join(',') %>
39
+ <%= f.error_message_on :favicon_image %>
40
+ <% end %>
41
+ <% end %>
32
42
  <%= f.field_container :name, class: ['form-group'] do %>
33
43
  <%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
34
44
  <%= f.text_field :name, class: 'form-control', required: true %>
@@ -166,7 +176,7 @@
166
176
  <% end %>
167
177
  <%= f.field_container :default_country_id, class: ['form-group'] do %>
168
178
  <%= f.label :default_country_id, Spree.t('i18n.default_country') %>
169
- <%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id || Spree::Config[:default_country_id]), {}, { class: 'select2' } %>
179
+ <%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id), {}, { class: 'select2' } %>
170
180
  <%= f.error_message_on :default_country_id %>
171
181
  <small class="form-text text-muted">
172
182
  <%= Spree.t('store_form.default_country_help') %>
@@ -25,17 +25,19 @@
25
25
  <td><%= store.supported_currencies_list.map(&:iso_code).join(', ') %></td>
26
26
  <td><%= store.supported_locales_list.map {|l| locale_presentation(l).first }.join(', ') %></td>
27
27
  <td><%= active_badge(store.default) %></td>
28
- <td class="actions actions-2 text-right" data-hook="admin_stores_index_row_actions">
29
- <%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
28
+ <td class="actions" data-hook="admin_stores_index_row_actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
30
31
 
31
- <% if can?(:edit, store) %>
32
- <% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
33
- <% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
34
- <% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
35
- <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
36
- <% end %>
32
+ <% if can?(:edit, store) %>
33
+ <% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
34
+ <% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
35
+ <% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
36
+ <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
37
+ <% end %>
37
38
 
38
- <%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>
39
+ <%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>
40
+ </span>
39
41
  </td>
40
42
  </tr>
41
43
  <% end %>
@@ -44,6 +46,6 @@
44
46
  </div>
45
47
  <% else %>
46
48
  <div class="alert alert-info no-objects-found">
47
- <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::StoreCredit)) %>
49
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Store)) %>
48
50
  </div>
49
51
  <% end %>
@@ -28,9 +28,11 @@
28
28
  <td><%= tax_category.tax_code %></td>
29
29
  <td><%= tax_category.description %></td>
30
30
  <td><%= active_badge(tax_category.is_default?) %></td>
31
- <td class="actions actions-2 text-right">
32
- <%= link_to_edit(tax_category, no_text: true) if can? :edit, tax_category %>
33
- <%= link_to_delete(tax_category, no_text: true) if can? :delete, tax_category %>
31
+ <td class="actions">
32
+ <span class="d-flex justify-content-end">
33
+ <%= link_to_edit(tax_category, no_text: true) if can? :edit, tax_category %>
34
+ <%= link_to_delete(tax_category, no_text: true) if can? :delete, tax_category %>
35
+ </span>
34
36
  </tr>
35
37
  <% end %>
36
38
  </tbody>
@@ -31,9 +31,11 @@
31
31
  <td><%= active_badge(tax_rate.included_in_price?) %></td>
32
32
  <td><%= active_badge(tax_rate.show_rate_in_label?) %></td>
33
33
  <td><%= tax_rate.calculator.to_s %></td>
34
- <td class="actions actions-2 text-right">
35
- <%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
36
- <%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
34
+ <td class="actions">
35
+ <span class="d-flex justify-content-end">
36
+ <%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
37
+ <%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
38
+ </span>
37
39
  </td>
38
40
  </tr>
39
41
  <% end %>
@@ -14,9 +14,11 @@
14
14
  <%= svg_icon name: "sort.svg", width: '18', height: '18' %>
15
15
  </td>
16
16
  <td><%= taxonomy.name %></td>
17
- <td class="actions actions-2 text-right">
18
- <%= link_to_edit taxonomy.id, no_text: true if can?(:edit, taxonomy) %>
19
- <%= link_to_delete taxonomy, no_text: true if can?(:delete, taxonomy) %>
17
+ <td class="actions">
18
+ <span class="d-flex justify-content-end">
19
+ <%= link_to_edit taxonomy.id, no_text: true if can?(:edit, taxonomy) %>
20
+ <%= link_to_delete taxonomy, no_text: true if can?(:delete, taxonomy) %>
21
+ </span>
20
22
  </td>
21
23
  </tr>
22
24
  <% end %>
@@ -39,7 +39,7 @@
39
39
 
40
40
  <%= f.field_container :description, class: ['form-group'] do %>
41
41
  <%= f.label :description, Spree.t(:description) %>
42
- <%= f.text_area :description, class: 'form-control', rows: 6 %>
42
+ <%= f.text_area :description, class: "form-control #{'spree-rte' if taxon_wysiwyg_editor_enabled? }", rows: 20 %>
43
43
  <% end %>
44
44
 
45
45
  <%= f.field_container :meta_title, class: ['form-group'] do %>
@@ -8,8 +8,7 @@
8
8
  </div>
9
9
 
10
10
  <div class="card-body">
11
- <%= f.fields_for :bill_address, (@user.bill_address || Spree::Address.default(@user, "bill")) do |ba_form| %>
12
- <% ba_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
11
+ <%= f.fields_for :bill_address, @user.bill_address || @user.addresses.new(country: current_store.default_country) do |ba_form| %>
13
12
  <%= render partial: 'spree/admin/shared/address_form', locals: { f: ba_form, type: "billing" } %>
14
13
  <% end %>
15
14
  </div>
@@ -30,8 +29,7 @@
30
29
  <%= check_box_tag 'user[use_billing]', '1', checked, class: 'checkbox' %>
31
30
  <%= label_tag :use_billing, Spree.t(:use_billing_address), for: 'user_use_billing', id: 'use_billing', class: 'form-check-label' %>
32
31
  </p>
33
- <%= f.fields_for :ship_address, (@user.ship_address || Spree::Address.default(@user, "ship")) do |sa_form| %>
34
- <% sa_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
32
+ <%= f.fields_for :ship_address, @user.ship_address || @user.addresses.new(country: current_store.default_country) do |sa_form| %>
35
33
  <%= render partial: 'spree/admin/shared/address_form', locals: { f: sa_form, type: "shipping" } %>
36
34
  <% end %>
37
35
  </div>
@@ -8,19 +8,31 @@
8
8
  <table class="table" id="user-lifetime-stats" data-hook>
9
9
  <tr>
10
10
  <td width="30%"><%= Spree.t(:total_sales) %>:</td>
11
- <td><%= @user.display_lifetime_value.to_html %></td>
11
+ <td>
12
+ <% @user.report_values_for(:lifetime_value, current_store).each do |value| %>
13
+ <div><%= value %></div>
14
+ <% end %>
15
+ </td>
12
16
  </tr>
13
17
  <tr>
14
18
  <td><%= Spree.t(:num_orders) %>:</td>
15
- <td><%= @user.order_count %></td>
19
+ <td><%= @user.order_count(current_store) %></td>
16
20
  </tr>
17
21
  <tr>
18
22
  <td><%= Spree.t(:average_order_value) %>:</td>
19
- <td><%= @user.display_average_order_value.to_html %></td>
23
+ <td>
24
+ <% @user.report_values_for(:average_order_value, current_store).each do |value| %>
25
+ <div><%= value %></div>
26
+ <% end %>
27
+ </td>
20
28
  </tr>
21
29
  <tr>
22
30
  <td><%= Spree.t('admin.user.store_credits') %>:</td>
23
- <td id="store_credit"><%= Spree::Money.new(@user.total_available_store_credit) %></td>
31
+ <td id="store_credit">
32
+ <% @user.available_store_credits(current_store).each do |value| %>
33
+ <div><%= value %></div>
34
+ <% end %>
35
+ </td>
24
36
  </tr>
25
37
  <tr>
26
38
  <td><%= Spree.t(:member_since) %>:</td>
@@ -59,9 +59,11 @@
59
59
  <% @users.each do |user| %>
60
60
  <tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
61
61
  <td class='user_email'><%= link_to user.email, edit_admin_user_url(user) %></td>
62
- <td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
63
- <%= link_to_edit user, no_text: true if can?(:edit, user) %>
64
- <%= link_to_delete user, no_text: true if can?(:delete, user) %>
62
+ <td data-hook="admin_users_index_row_actions" class="actions">
63
+ <span class="d-flex justify-content-end">
64
+ <%= link_to_edit user, no_text: true if can?(:edit, user) %>
65
+ <%= link_to_delete user, no_text: true if can?(:delete, user) %>
66
+ </span>
65
67
  </td>
66
68
  </tr>
67
69
  <% end %>
@@ -27,7 +27,7 @@
27
27
  <tr class="stock-item" data-item-quantity="<%= item.quantity %>">
28
28
  <td class="order-completed-at"><%= order_time(order.completed_at) if order.completed_at %></td>
29
29
  <td class="item-image">
30
- <%= mini_image(item.variant) %>
30
+ <%= small_image(item.variant) %>
31
31
  </td>
32
32
  <td class="item-name">
33
33
  <%= item.name %>
@@ -2,9 +2,13 @@
2
2
  <div class='variant-autocomplete-item media align-items-center'>
3
3
  <figure class='variant-image media-left mb-0 mr-3'>
4
4
  {{#if variant.image }}
5
- <img src='{{variant.image}}' class="thumbnail mb-0" />
5
+ <div class="admin-product-image-container small-img">
6
+ <img src='{{variant.image}}' class="thumbnail mb-0" />
7
+ </div>
6
8
  {{ else }}
7
- <img src='<%= image_path("noimage/mini.png") %>' class="thumbnail mb-0" />
9
+ <div class="admin-product-image-container small-img">
10
+ <%= inline_svg_tag "noimage/backend-missing-image.svg", class: "noimage", size: "60%*60%" %>
11
+ </div>
8
12
  {{/if}}
9
13
  </figure>
10
14
 
@@ -21,10 +21,12 @@
21
21
  <td class="text-center">
22
22
  <input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
23
23
  </td>
24
- <td class="actions actions-1 text-center">
25
- <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
26
- <%= svg_icon name: "add.svg", width: '16', height: '16' %>
27
- </button>
24
+ <td class="actions">
25
+ <span class="d-flex justify-content-center">
26
+ <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
27
+ <%= svg_icon name: "add.svg", width: '16', height: '16' %>
28
+ </button>
29
+ </span>
28
30
  </td>
29
31
  {{else}}
30
32
  {{#if variant.is_backorderable}}
@@ -35,10 +37,12 @@
35
37
  <td class="text-center">
36
38
  <input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
37
39
  </td>
38
- <td class="actions actions-1 text-center">
39
- <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
40
- <%= svg_icon name: "add.svg", width: '16', height: '16' %>
41
- </button>
40
+ <td class="actions">
41
+ <span class="d-flex justify-content-center">
42
+ <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
43
+ <%= svg_icon name: "add.svg", width: '16', height: '16' %>
44
+ </button>
45
+ </span>
42
46
  </td>
43
47
  {{else}}
44
48
  <td class="text-center"><%= Spree.t(:out_of_stock) %></td>
@@ -51,10 +55,12 @@
51
55
  <td class="text-center">
52
56
  <input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
53
57
  </td>
54
- <td class="actions actions-1 text-center">
55
- <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
56
- <%= svg_icon name: "add.svg", width: '16', height: '16' %>
57
- </button>
58
+ <td class="actions">
59
+ <span class="d-flex justify-content-center">
60
+ <button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
61
+ <%= svg_icon name: "add.svg", width: '16', height: '16' %>
62
+ </button>
63
+ </span>
58
64
  </td>
59
65
  {{/if}}
60
66
  </tr>
@@ -17,10 +17,12 @@
17
17
  <td>
18
18
  <input class="quantity form-control input-sm" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
19
19
  </td>
20
- <td class="actions actions-1">
21
- <button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
22
- <%= svg_icon name: "add", width: '16', height: '16' %>
23
- </button>
20
+ <td class="actions">
21
+ <span class="d-flex justify-content-center">
22
+ <button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
23
+ <%= svg_icon name: "add", width: '16', height: '16' %>
24
+ </button>
25
+ </span>
24
26
  </td>
25
27
  {{else}}
26
28
  {{#if this.available}}
@@ -31,10 +33,12 @@
31
33
  <td>
32
34
  <input class="quantity form-control input-sm" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
33
35
  </td>
34
- <td class="actions actions-1">
35
- <button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
36
- <%= svg_icon name: "add", width: '16', height: '16' %>
37
- </button>
36
+ <td class="actions">
37
+ <span class="d-flex justify-content-center">
38
+ <button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
39
+ <%= svg_icon name: "add", width: '16', height: '16' %>
40
+ </button>
41
+ </span>
38
42
  </td>
39
43
  {{else}}
40
44
  <td><%= Spree.t(:out_of_stock) %></td>
@@ -21,13 +21,15 @@
21
21
  <td>
22
22
  <input class="quantity form-control" id="item_quantity" type="number" min="1" value="1" max="{{max_quantity}}">
23
23
  </td>
24
- <td class='actions text-center'>
25
- <a href='#' class='cancel-split with-tip btn btn-sm btn-outline-secondary' title='Cancel'>
26
- <%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
27
- </a>
28
- <a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-success' title='Save'>
29
- <%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
30
- </a>
24
+ <td class='actions'>
25
+ <span class='d-flex justify-content-center'>
26
+ <a href='#' class='cancel-split with-tip btn btn-sm btn-outline-secondary' title='Cancel'>
27
+ <%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
28
+ </a>
29
+ <a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-success' title='Save'>
30
+ <%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
31
+ </a>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  </script>