spree_backend 4.2.7 → 4.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) 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/large.png +0 -0
  24. data/app/assets/images/noimage/mini.png +0 -0
  25. data/app/assets/images/noimage/product.png +0 -0
  26. data/app/assets/images/noimage/small.png +0 -0
  27. data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
  28. data/app/assets/javascripts/spree/backend/admin.js +45 -307
  29. data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
  30. data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
  31. data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
  32. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
  33. data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
  34. data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
  35. data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
  36. data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
  37. data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
  38. data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
  39. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
  40. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
  41. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
  42. data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
  43. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
  44. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +143 -0
  45. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +61 -0
  46. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
  47. data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
  48. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
  49. data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
  50. data/app/assets/javascripts/spree/backend/menus/menu.es6 +58 -0
  51. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
  52. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +7 -17
  53. data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
  54. data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
  55. data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
  56. data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
  57. data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
  58. data/app/assets/javascripts/spree/backend/taxons.js +74 -73
  59. data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
  60. data/app/assets/javascripts/spree/backend.js +28 -1
  61. data/app/assets/javascripts/spree.js +78 -0
  62. data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
  63. data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
  64. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
  65. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
  66. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
  67. data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
  68. data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
  69. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
  70. data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
  71. data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
  72. data/app/assets/stylesheets/spree/backend/shared/_base.scss +28 -26
  73. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
  74. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  75. data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
  76. data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
  77. data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
  78. data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
  79. data/app/controllers/spree/admin/base_controller.rb +63 -3
  80. data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
  81. data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
  82. data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
  83. data/app/controllers/spree/admin/errors_controller.rb +11 -0
  84. data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
  85. data/app/controllers/spree/admin/images_controller.rb +8 -22
  86. data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
  87. data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
  88. data/app/controllers/spree/admin/menus_controller.rb +32 -0
  89. data/app/controllers/spree/admin/option_types_controller.rb +1 -1
  90. data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
  91. data/app/controllers/spree/admin/orders_controller.rb +22 -30
  92. data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
  93. data/app/controllers/spree/admin/payments_controller.rb +5 -10
  94. data/app/controllers/spree/admin/prices_controller.rb +2 -2
  95. data/app/controllers/spree/admin/products_controller.rb +21 -10
  96. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  97. data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
  98. data/app/controllers/spree/admin/promotions_controller.rb +3 -3
  99. data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
  100. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  101. data/app/controllers/spree/admin/reports_controller.rb +5 -1
  102. data/app/controllers/spree/admin/resource_controller.rb +35 -5
  103. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  104. data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
  105. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  106. data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
  107. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
  108. data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
  109. data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
  110. data/app/controllers/spree/admin/stores_controller.rb +14 -17
  111. data/app/controllers/spree/admin/taxons_controller.rb +9 -5
  112. data/app/controllers/spree/admin/users_controller.rb +9 -7
  113. data/app/controllers/spree/admin/variants_controller.rb +16 -15
  114. data/app/helpers/spree/admin/base_helper.rb +52 -14
  115. data/app/helpers/spree/admin/cms_helper.rb +15 -0
  116. data/app/helpers/spree/admin/menu_helper.rb +30 -0
  117. data/app/helpers/spree/admin/stores_helper.rb +21 -0
  118. data/app/models/spree/backend_configuration.rb +2 -0
  119. data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
  120. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
  121. data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
  122. data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
  123. data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
  124. data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
  125. data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
  126. data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
  127. data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
  128. data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
  129. data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
  130. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
  131. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +62 -0
  132. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +177 -0
  133. data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
  134. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
  135. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
  136. data/app/views/spree/admin/countries/index.html.erb +5 -3
  137. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
  138. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
  139. data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
  140. data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
  141. data/app/views/spree/admin/images/index.html.erb +5 -3
  142. data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
  143. data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
  144. data/app/views/spree/admin/menu_items/new.html.erb +11 -0
  145. data/app/views/spree/admin/menus/_form.html.erb +19 -0
  146. data/app/views/spree/admin/menus/edit.html.erb +57 -0
  147. data/app/views/spree/admin/menus/index.html.erb +90 -0
  148. data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
  149. data/app/views/spree/admin/menus/new.html.erb +22 -0
  150. data/app/views/spree/admin/option_types/_form.html.erb +3 -0
  151. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
  152. data/app/views/spree/admin/option_types/index.html.erb +5 -3
  153. data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
  154. data/app/views/spree/admin/orders/_line_items.html.erb +9 -7
  155. data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
  156. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +10 -8
  157. data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
  158. data/app/views/spree/admin/orders/index.html.erb +100 -101
  159. data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
  160. data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
  161. data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
  162. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  163. data/app/views/spree/admin/payments/_list.html.erb +9 -7
  164. data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
  165. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
  166. data/app/views/spree/admin/products/_autocomplete.js.erb +5 -5
  167. data/app/views/spree/admin/products/_form.html.erb +24 -5
  168. data/app/views/spree/admin/products/index.html.erb +14 -13
  169. data/app/views/spree/admin/products/new.html.erb +6 -1
  170. data/app/views/spree/admin/products/stock.html.erb +71 -68
  171. data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
  172. data/app/views/spree/admin/promotions/_form.html.erb +7 -0
  173. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
  174. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
  175. data/app/views/spree/admin/promotions/index.html.erb +33 -34
  176. data/app/views/spree/admin/properties/_form.html.erb +6 -0
  177. data/app/views/spree/admin/properties/index.html.erb +9 -3
  178. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  179. data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
  180. data/app/views/spree/admin/prototypes/index.html.erb +5 -3
  181. data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
  182. data/app/views/spree/admin/reports/index.html.erb +1 -1
  183. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  184. data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
  185. data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
  186. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
  187. data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
  188. data/app/views/spree/admin/roles/index.html.erb +5 -3
  189. data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
  190. data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
  191. data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
  192. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  193. data/app/views/spree/admin/shared/_header.html.erb +7 -10
  194. data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
  195. data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
  196. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
  197. data/app/views/spree/admin/shared/_paths.html.erb +8 -0
  198. data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
  199. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  200. data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
  201. data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
  202. data/app/views/spree/admin/shared/_translations.html.erb +2 -0
  203. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +14 -0
  204. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +14 -0
  205. data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
  206. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +28 -0
  207. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
  208. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
  209. data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
  210. data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
  211. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
  212. data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
  213. data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
  214. data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
  215. data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
  216. data/app/views/spree/admin/states/_state_list.html.erb +5 -3
  217. data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
  218. data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
  219. data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
  220. data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
  221. data/app/views/spree/admin/store_credits/index.html.erb +7 -5
  222. data/app/views/spree/admin/stores/_form.html.erb +12 -2
  223. data/app/views/spree/admin/stores/index.html.erb +12 -10
  224. data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
  225. data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
  226. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
  227. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  228. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
  229. data/app/views/spree/admin/users/index.html.erb +5 -3
  230. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
  231. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
  232. data/app/views/spree/admin/variants/_split.js.erb +9 -7
  233. data/app/views/spree/admin/variants/index.html.erb +8 -5
  234. data/app/views/spree/admin/zones/index.html.erb +5 -3
  235. data/app/views/spree/layouts/admin.html.erb +16 -16
  236. data/config/initializers/assets.rb +5 -1
  237. data/config/routes.rb +16 -4
  238. data/lib/generators/spree/backend/install/install_generator.rb +22 -0
  239. data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
  240. data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
  241. data/lib/spree/backend/engine.rb +4 -11
  242. data/lib/spree/backend.rb +7 -4
  243. data/lib/spree_backend.rb +0 -2
  244. data/spec/fixtures/files/favicon.ico +0 -0
  245. data/spec/fixtures/files/icon_512x512.png +0 -0
  246. data/spree_backend.gemspec +9 -4
  247. data/vendor/assets/javascripts/cleave.js +8 -0
  248. data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
  249. data/vendor/assets/javascripts/jsuri.js +458 -0
  250. data/vendor/assets/javascripts/sortable.js +2 -3709
  251. data/vendor/assets/javascripts/sweetalert2.js +2 -0
  252. metadata +193 -22
  253. data/app/assets/javascripts/spree/backend/address_states.js +0 -44
  254. data/app/assets/javascripts/spree/frontend/backend.js +0 -1
  255. data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
  256. data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
  257. /data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
@@ -0,0 +1,16 @@
1
+ <%= f.field_container :destination, class: ['form-group'] do %>
2
+ <%= f.label :destination, Spree.t(:url) %>
3
+ <%= f.text_field :destination, class: 'form-control' %>
4
+ <%= f.error_message_on :destination %>
5
+ <small class="form-text text-muted">
6
+ <%= raw Spree.t('admin.navigation.url_info') %>
7
+ </small>
8
+ <% end %>
9
+
10
+ <%= f.field_container :new_window do %>
11
+ <div class="custom-control custom-checkbox">
12
+ <%= f.check_box :new_window, class: 'custom-control-input' %>
13
+ <%= f.label :new_window, Spree.t('admin.navigation.open_link_in_new_window'), class: 'custom-control-label' %>
14
+ <%= f.error_message_on :new_window %>
15
+ </div>
16
+ <% end %>
@@ -25,11 +25,13 @@
25
25
  <td class="align-center">
26
26
  <%= active_badge(named_type.active, label: Spree.t(named_type.active? ? :active : :inactive)) %>
27
27
  </td>
28
- <td class="actions actions-1 text-right">
29
- <% if named_type.mutable? %>
30
- <%= link_to_edit(named_type, no_text: true) if can? :edit, named_type %>
31
- <%= link_to_delete(named_type, no_text: true) if can? :delete, named_type %>
32
- <% end %>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <% if named_type.mutable? %>
31
+ <%= link_to_edit(named_type, no_text: true) if can? :edit, named_type %>
32
+ <%= link_to_delete(named_type, no_text: true) if can? :delete, named_type %>
33
+ <% end %>
34
+ </span>
33
35
  </td>
34
36
  </tr>
35
37
  <% end %>
@@ -6,15 +6,13 @@
6
6
  <%= configurations_sidebar_menu_item(Spree.t(:zones), spree.admin_zones_path) if can? :manage, Spree::Zone %>
7
7
  <%= configurations_sidebar_menu_item(Spree.t(:countries), spree.admin_countries_path) if can? :manage, Spree::Country %>
8
8
 
9
- <% if country = Spree::Country.find_by(id: Spree::Config[:default_country_id]) || Spree::Country.first %>
9
+ <% if country = current_store.default_country %>
10
10
  <%= configurations_sidebar_menu_item(Spree.t(:states), spree.admin_country_states_path(country)) if can? :manage, Spree::Country %>
11
11
  <% end %>
12
12
 
13
13
  <%= configurations_sidebar_menu_item(Spree.t(:payment_methods), spree.admin_payment_methods_path) if can? :manage, Spree::PaymentMethod %>
14
14
  <%= configurations_sidebar_menu_item(Spree.t(:shipping_methods), spree.admin_shipping_methods_path) if can? :manage, Spree::ShippingMethod %>
15
15
  <%= configurations_sidebar_menu_item(Spree.t(:shipping_categories), spree.admin_shipping_categories_path) if can? :manage, Spree::ShippingCategory %>
16
- <%= configurations_sidebar_menu_item(Spree.t(:stock_transfers), spree.admin_stock_transfers_path) if can? :manage, Spree::StockTransfer %>
17
- <%= configurations_sidebar_menu_item(Spree.t(:stock_locations), spree.admin_stock_locations_path) if can? :manage, Spree::StockLocation %>
18
16
  <%= configurations_sidebar_menu_item(Spree.t(:store_credit_categories), spree.admin_store_credit_categories_path) if can? :manage, Spree::StoreCreditCategory %>
19
17
  <%= configurations_sidebar_menu_item(Spree.t(:refund_reasons), spree.admin_refund_reasons_path) if can? :manage, Spree::RefundReason %>
20
18
  <%= configurations_sidebar_menu_item(Spree.t(:reimbursement_types), spree.admin_reimbursement_types_path) if can? :manage, Spree::ReimbursementType %>
@@ -0,0 +1,4 @@
1
+ <ul id="sidebar-content" class="border-top bg-white collapse nav nav-pills nav-stacked" data-hook="admin_content">
2
+ <%= tab :menus, match_path: '/menus', label: Spree.t('admin.tab.navigation') %>
3
+ <%= tab :cms_pages, match_path: '/cms_pages', label: Spree.t('admin.tab.pages') %>
4
+ </ul>
@@ -0,0 +1,4 @@
1
+ <ul id="sidebar-stock" class="border-top bg-white collapse nav nav-pills nav-stacked" data-hook="admin_stock_sub_tabs">
2
+ <%= tab(:stock_transfers, spree.admin_stock_transfers_path) if can? :manage, Spree::StockTransfer %>
3
+ <%= tab(:stock_locations, spree.admin_stock_locations_path) if can? :manage, Spree::StockLocation %>
4
+ </ul>
@@ -19,9 +19,11 @@
19
19
  <% @shipping_categories.each do |shipping_category| %>
20
20
  <tr id="<%= spree_dom_id shipping_category %>" data-hook="category_row">
21
21
  <td><%= shipping_category.name %></td>
22
- <td class="actions actions-2 text-right">
23
- <%= link_to_edit(shipping_category, no_text: true) if can? :edit, shipping_category %>
24
- <%= link_to_delete(shipping_category, no_text: true) if can? :edit, shipping_category %>
22
+ <td class="actions">
23
+ <span class="d-flex justify-content-end">
24
+ <%= link_to_edit(shipping_category, no_text: true) if can? :edit, shipping_category %>
25
+ <%= link_to_delete(shipping_category, no_text: true) if can? :edit, shipping_category %>
26
+ </span>
25
27
  </td>
26
28
  </tr>
27
29
  <% end %>
@@ -29,9 +29,11 @@
29
29
  </td>
30
30
  <td><%= shipping_method.calculator.description %></td>
31
31
  <td class="text-center"><%= shipping_method.display_on.blank? ? Spree.t(:none) : Spree.t(shipping_method.display_on) %></td>
32
- <td data-hook="admin_shipping_methods_index_row_actions" class="actions actions-2 text-right">
33
- <%= link_to_edit(shipping_method, no_text: true) if can? :edit, shipping_method %>
34
- <%= link_to_delete(shipping_method, no_text: true) if can? :delete, shipping_method %>
32
+ <td class="actions" data-hook="admin_shipping_methods_index_row_actions">
33
+ <span class="d-flex justify-content-end">
34
+ <%= link_to_edit(shipping_method, no_text: true) if can? :edit, shipping_method %>
35
+ <%= link_to_delete(shipping_method, no_text: true) if can? :delete, shipping_method %>
36
+ </span>
35
37
  </td>
36
38
  </tr>
37
39
  <% end %>
@@ -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>
@@ -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 %>
@@ -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>
@@ -10,7 +10,7 @@
10
10
  <tr>
11
11
  <th colspan="2"><%= Spree.t(:options) %></th>
12
12
  <th><%= Spree.t(:price) %></th>
13
- <th><%= Spree.t(:sku) %></th>
13
+ <th><%= sort_link @search, :sku, Spree.t(:sku) %></th>
14
14
  <th class="actions"></th>
15
15
  </tr>
16
16
  </thead>
@@ -25,9 +25,11 @@
25
25
  <td><%= variant.options_text %></td>
26
26
  <td><%= display_price(variant) %></td>
27
27
  <td><%= variant.sku %></td>
28
- <td class="actions actions-2 text-right">
29
- <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
30
- <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
31
+ <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  <% end %>
@@ -63,6 +65,7 @@
63
65
  <% content_for :page_actions do %>
64
66
  <%= product_preview_link(@product) %>
65
67
  <%= button_link_to(Spree.t(:new_variant), spree.new_admin_product_variant_url(@product), { icon: 'add.svg', :'data-update' => 'new_variant', class: 'btn-success', id: 'new_var_link' }) if can? :create, Spree::Variant %>
66
- <%= button_link_to (@deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active)), spree.admin_product_variants_url(@product, deleted: @deleted.blank? ? "on" : "off"), { class: 'btn-outline-secondary', icon: 'filter.svg' } %>
68
+ <%= button_link_to (@deleted == '1' ? Spree.t(:show_active) : Spree.t(:show_deleted)), spree.admin_product_variants_url(@product, { q: { deleted_at_null: @deleted == '1' ? "0" : "1" } }), { class: 'btn-outline-secondary', icon: 'filter.svg' } %>
67
69
  <% end %>
68
70
  <% end %>
71
+ <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
@@ -25,9 +25,11 @@
25
25
  <td><%= zone.name %></td>
26
26
  <td><%= zone.description %></td>
27
27
  <td><%= active_badge(zone.default_tax?) %></td>
28
- <td class="actions actions-2 text-right">
29
- <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
30
- <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
31
+ <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
32
+ </span>
31
33
  </td>
32
34
  </tr>
33
35
  <% end %>