spree_backend 3.7.14.1 → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/app/assets/javascripts/spree/backend.js +2 -1
  4. data/app/assets/javascripts/spree/backend/admin.js +75 -66
  5. data/app/assets/javascripts/spree/backend/calculator.js +3 -3
  6. data/app/assets/javascripts/spree/backend/gateway.js +1 -1
  7. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -24
  8. data/app/assets/javascripts/spree/backend/promotions.js +4 -4
  9. data/app/assets/javascripts/spree/backend/shipments.js +32 -33
  10. data/app/assets/javascripts/spree/backend/taxonomy.js +75 -72
  11. data/app/assets/stylesheets/spree/backend/components/_badges.scss +46 -0
  12. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +7 -23
  13. data/app/assets/stylesheets/spree/backend/components/_filters.scss +16 -6
  14. data/app/assets/stylesheets/spree/backend/components/_main.scss +4 -6
  15. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +21 -0
  16. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +2 -10
  17. data/app/assets/stylesheets/spree/backend/components/_page_header.scss +0 -23
  18. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +25 -69
  19. data/app/assets/stylesheets/spree/backend/components/_tables.scss +53 -12
  20. data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +2 -2
  21. data/app/assets/stylesheets/spree/backend/global/_variables.scss +10 -13
  22. data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +33 -20
  23. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +23 -18
  24. data/app/assets/stylesheets/spree/backend/shared/_base.scss +0 -8
  25. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +5 -38
  26. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -6
  27. data/app/controllers/spree/admin/customer_returns_controller.rb +2 -2
  28. data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
  29. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  30. data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
  31. data/app/controllers/spree/admin/products_controller.rb +2 -2
  32. data/app/controllers/spree/admin/reimbursement_types_controller.rb +1 -1
  33. data/app/controllers/spree/admin/resource_controller.rb +1 -1
  34. data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
  35. data/app/controllers/spree/admin/stores_controller.rb +5 -0
  36. data/app/controllers/spree/admin/taxons_controller.rb +1 -1
  37. data/app/controllers/spree/admin/users_controller.rb +2 -2
  38. data/app/helpers/spree/admin/base_helper.rb +9 -4
  39. data/app/helpers/spree/admin/customer_returns_helper.rb +1 -1
  40. data/app/helpers/spree/admin/navigation_helper.rb +41 -25
  41. data/app/helpers/spree/admin/orders_helper.rb +2 -2
  42. data/app/views/kaminari/{_first_page.html.erb → twitter-bootstrap-4/_first_page.html.erb} +5 -3
  43. data/app/views/kaminari/{_gap.html.erb → twitter-bootstrap-4/_gap.html.erb} +5 -1
  44. data/app/views/kaminari/{_last_page.html.erb → twitter-bootstrap-4/_last_page.html.erb} +5 -3
  45. data/app/views/kaminari/{_next_page.html.erb → twitter-bootstrap-4/_next_page.html.erb} +5 -7
  46. data/app/views/kaminari/{_page.html.erb → twitter-bootstrap-4/_page.html.erb} +8 -2
  47. data/app/views/kaminari/{_paginator.html.erb → twitter-bootstrap-4/_paginator.html.erb} +3 -1
  48. data/app/views/kaminari/{_prev_page.html.erb → twitter-bootstrap-4/_prev_page.html.erb} +5 -7
  49. data/app/views/spree/admin/adjustments/_adjustment.html.erb +14 -4
  50. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +6 -6
  51. data/app/views/spree/admin/adjustments/index.html.erb +7 -5
  52. data/app/views/spree/admin/countries/_form.html.erb +13 -1
  53. data/app/views/spree/admin/customer_returns/index.html.erb +2 -2
  54. data/app/views/spree/admin/general_settings/edit.html.erb +14 -14
  55. data/app/views/spree/admin/images/_form.html.erb +2 -2
  56. data/app/views/spree/admin/images/edit.html.erb +6 -6
  57. data/app/views/spree/admin/option_types/_form.html.erb +2 -2
  58. data/app/views/spree/admin/option_types/edit.html.erb +5 -5
  59. data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -5
  60. data/app/views/spree/admin/orders/_add_product.html.erb +5 -5
  61. data/app/views/spree/admin/orders/_adjustments.html.erb +4 -3
  62. data/app/views/spree/admin/orders/_line_items.html.erb +4 -4
  63. data/app/views/spree/admin/orders/_risk_analysis.html.erb +3 -3
  64. data/app/views/spree/admin/orders/_shipment.html.erb +5 -5
  65. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
  66. data/app/views/spree/admin/orders/customer_details/_form.html.erb +17 -17
  67. data/app/views/spree/admin/orders/customer_details/edit.html.erb +4 -4
  68. data/app/views/spree/admin/orders/index.html.erb +56 -33
  69. data/app/views/spree/admin/payment_methods/_form.html.erb +4 -4
  70. data/app/views/spree/admin/payments/_list.html.erb +3 -3
  71. data/app/views/spree/admin/payments/index.html.erb +1 -1
  72. data/app/views/spree/admin/product_properties/index.html.erb +10 -2
  73. data/app/views/spree/admin/products/_add_stock_form.html.erb +6 -6
  74. data/app/views/spree/admin/products/_form.html.erb +26 -31
  75. data/app/views/spree/admin/products/edit.html.erb +1 -1
  76. data/app/views/spree/admin/products/index.html.erb +5 -5
  77. data/app/views/spree/admin/products/new.html.erb +5 -5
  78. data/app/views/spree/admin/products/stock.html.erb +3 -3
  79. data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
  80. data/app/views/spree/admin/promotions/_form.html.erb +7 -7
  81. data/app/views/spree/admin/promotions/_promotion_action.html.erb +4 -4
  82. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +12 -5
  83. data/app/views/spree/admin/promotions/_rules.html.erb +5 -5
  84. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +5 -5
  85. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +5 -5
  86. data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +3 -3
  87. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +10 -6
  88. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +10 -6
  89. data/app/views/spree/admin/promotions/edit.html.erb +5 -5
  90. data/app/views/spree/admin/promotions/index.html.erb +3 -3
  91. data/app/views/spree/admin/promotions/rules/_country.html.erb +2 -2
  92. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +4 -4
  93. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +8 -8
  94. data/app/views/spree/admin/promotions/rules/_product.html.erb +2 -2
  95. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +2 -2
  96. data/app/views/spree/admin/promotions/rules/_user.html.erb +2 -2
  97. data/app/views/spree/admin/properties/_form.html.erb +2 -2
  98. data/app/views/spree/admin/properties/index.html.erb +3 -3
  99. data/app/views/spree/admin/prototypes/_prototypes.html.erb +10 -2
  100. data/app/views/spree/admin/reimbursement_types/_form.html.erb +6 -6
  101. data/app/views/spree/admin/reports/sales_total.html.erb +4 -2
  102. data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
  103. data/app/views/spree/admin/return_index/customer_returns.html.erb +3 -3
  104. data/app/views/spree/admin/return_index/return_authorizations.html.erb +15 -9
  105. data/app/views/spree/admin/shared/_account_nav.html.erb +60 -48
  106. data/app/views/spree/admin/shared/_address_form.html.erb +11 -4
  107. data/app/views/spree/admin/shared/_calculator_fields.html.erb +4 -4
  108. data/app/views/spree/admin/shared/_content_header.html.erb +4 -4
  109. data/app/views/spree/admin/shared/_header.html.erb +18 -21
  110. data/app/views/spree/admin/shared/_index_table_options.html.erb +4 -5
  111. data/app/views/spree/admin/shared/_main_menu.html.erb +37 -35
  112. data/app/views/spree/admin/shared/_order_summary.html.erb +6 -7
  113. data/app/views/spree/admin/shared/_order_tabs.html.erb +47 -20
  114. data/app/views/spree/admin/shared/_product_tabs.html.erb +35 -11
  115. data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
  116. data/app/views/spree/admin/shared/_table_filter.html.erb +7 -5
  117. data/app/views/spree/admin/shared/_version.html.erb +4 -2
  118. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
  119. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -1
  120. data/app/views/spree/admin/shared/sub_menu/_product.html.erb +1 -1
  121. data/app/views/spree/admin/shared/sub_menu/_promotion.html.erb +1 -1
  122. data/app/views/spree/admin/shared/sub_menu/_returns.html.erb +1 -1
  123. data/app/views/spree/admin/shipping_methods/_form.html.erb +21 -21
  124. data/app/views/spree/admin/states/_form.html.erb +2 -2
  125. data/app/views/spree/admin/stock_locations/_form.html.erb +6 -6
  126. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
  127. data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
  128. data/app/views/spree/admin/stock_transfers/index.html.erb +34 -32
  129. data/app/views/spree/admin/stock_transfers/new.html.erb +13 -11
  130. data/app/views/spree/admin/stores/_form.html.erb +5 -6
  131. data/app/views/spree/admin/stores/index.html.erb +3 -1
  132. data/app/views/spree/admin/tax_categories/_form.html.erb +1 -1
  133. data/app/views/spree/admin/tax_rates/_form.html.erb +11 -9
  134. data/app/views/spree/admin/taxons/_form.html.erb +4 -4
  135. data/app/views/spree/admin/users/_addresses_form.html.erb +10 -10
  136. data/app/views/spree/admin/users/_form.html.erb +2 -2
  137. data/app/views/spree/admin/users/_lifetime_stats.html.erb +3 -3
  138. data/app/views/spree/admin/users/_sidebar.html.erb +26 -11
  139. data/app/views/spree/admin/users/addresses.html.erb +4 -2
  140. data/app/views/spree/admin/users/edit.html.erb +8 -8
  141. data/app/views/spree/admin/users/index.html.erb +3 -3
  142. data/app/views/spree/admin/users/items.html.erb +2 -2
  143. data/app/views/spree/admin/users/orders.html.erb +2 -2
  144. data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
  145. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -1
  146. data/app/views/spree/admin/variants/_form.html.erb +2 -2
  147. data/app/views/spree/admin/variants/_split.js.erb +3 -3
  148. data/app/views/spree/admin/variants/index.html.erb +2 -2
  149. data/app/views/spree/admin/variants/new.html.erb +8 -6
  150. data/app/views/spree/admin/zones/_country_members.html.erb +4 -4
  151. data/app/views/spree/admin/zones/_form.html.erb +9 -9
  152. data/app/views/spree/admin/zones/_state_members.html.erb +4 -4
  153. data/app/views/spree/admin/zones/index.html.erb +2 -2
  154. data/app/views/spree/layouts/admin.html.erb +9 -6
  155. data/lib/spree/backend.rb +3 -2
  156. data/lib/spree_backend.rb +2 -1
  157. data/spree_backend.gemspec +3 -2
  158. metadata +39 -27
  159. data/app/assets/stylesheets/spree/backend/components/_labels.scss +0 -55
  160. data/app/assets/stylesheets/spree/backend/components/_panels.scss +0 -3
  161. data/app/assets/stylesheets/spree/backend/components/_wells.scss +0 -3
  162. data/app/assets/stylesheets/spree/backend/sections/_account.scss +0 -20
@@ -1,12 +1,12 @@
1
- <div class="panel-heading">
2
- <h1 class="panel-title">
1
+ <div class="card-header">
2
+ <h1 class="card-title mb-0 h5">
3
3
  <%= Spree.t(:add_stock) %>
4
4
  </h1>
5
5
  </div>
6
- <div class="panel-body">
6
+ <div class="card-body">
7
7
  <%= form_for [:admin, Spree::StockMovement.new], url: admin_stock_items_path do |f| %>
8
8
  <div data-hook="admin_stock_movements_form_fields" class="row">
9
- <div class="col-xs-12 col-md-2">
9
+ <div class="col-12 col-lg-2">
10
10
  <div class="form-group">
11
11
  <%= f.field_container :quantity do %>
12
12
  <%= f.label :quantity, Spree.t(:quantity) %>
@@ -14,7 +14,7 @@
14
14
  <% end %>
15
15
  </div>
16
16
  </div>
17
- <div class="col-xs-12 col-md-5">
17
+ <div class="col-12 col-lg-5">
18
18
  <div class="form-group">
19
19
  <%= f.field_container :stock_location do %>
20
20
  <%= label_tag :stock_location_id, Spree.t(:stock_location) %>
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
  </div>
26
26
 
27
- <div class="col-xs-12 col-md-5">
27
+ <div class="col-12 col-lg-5">
28
28
  <div class="form-group">
29
29
  <%= f.field_container :variant_id do %>
30
30
  <%= label_tag 'variant_id', Spree.t(:variant) %>
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="row">
5
5
 
6
- <div class="col-xs-12 col-md-8" data-hook="admin_product_form_left">
6
+ <div class="col-12 col-md-8" data-hook="admin_product_form_left">
7
7
  <div data-hook="admin_product_form_name">
8
8
  <%= f.field_container :name, class: ['form-group'] do %>
9
9
  <%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', class: 'required')) %>
@@ -29,7 +29,7 @@
29
29
  </div>
30
30
  </div>
31
31
 
32
- <div class="col-xs-12 col-md-4" data-hook="admin_product_form_right">
32
+ <div class="col-12 col-md-4" data-hook="admin_product_form_right">
33
33
  <div data-hook="admin_product_form_price">
34
34
  <%= f.field_container :price, class: ['form-group'] do %>
35
35
  <%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', class: "required")) %>
@@ -85,51 +85,53 @@
85
85
  </div>
86
86
 
87
87
  <% if @product.has_variants? %>
88
- <div data-hook="admin_product_form_multiple_variants" class="well">
89
- <%= f.label :skus, Spree.t(:sku).pluralize %>
90
- <div class="info marginb">
91
- <%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.size) %>
92
- <ul class="text_list">
93
- <% @product.variants.first(5).each do |variant| %>
94
- <li><%= variant.sku %></li>
88
+ <div data-hook="admin_product_form_multiple_variants" class="card bg-light mb-3">
89
+ <div class="card-body">
90
+ <%= f.label :skus, Spree.t(:sku).pluralize %>
91
+ <div class="info marginb">
92
+ <%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.size) %>
93
+ <ul class="text_list">
94
+ <% @product.variants.first(5).each do |variant| %>
95
+ <li><%= variant.sku %></li>
96
+ <% end %>
97
+ </ul>
98
+ <% if @product.variants.size > 5 %>
99
+ <em>
100
+ <%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.size - 5) %>
101
+ </em>
95
102
  <% end %>
96
- </ul>
97
- <% if @product.variants.size > 5 %>
98
- <em>
99
- <%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.size - 5) %>
100
- </em>
101
- <% end %>
102
- </div>
103
- <div class="info-actions">
104
- <% if can?(:admin, Spree::Variant) %>
105
- <%= link_to_with_icon 'variants', Spree.t(:manage_variants), spree.admin_product_variants_url(@product), class: "btn btn-default" %>
106
- <% end %>
103
+ </div>
104
+ <div class="info-actions">
105
+ <% if can?(:admin, Spree::Variant) %>
106
+ <%= link_to_with_icon 'variants', Spree.t(:manage_variants), spree.admin_product_variants_url(@product), class: "btn btn-outline-secondary" %>
107
+ <% end %>
108
+ </div>
107
109
  </div>
108
110
  </div>
109
111
  <% else %>
110
112
  <div id="shipping_specs" class="row">
111
- <div class="col-xs-12 col-md-6">
113
+ <div class="col-12 col-md-6">
112
114
  <div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
113
115
  <%= f.label :weight, Spree.t(:weight) %>
114
116
  <%= f.text_field :weight, value: number_with_precision(@product.weight, precision: 2), size: 4, class: 'form-control' %>
115
117
  </div>
116
118
  </div>
117
119
 
118
- <div class="col-xs-12 col-md-6">
120
+ <div class="col-12 col-md-6">
119
121
  <div id="shipping_specs_height_field" data-hook="admin_product_form_height" class="form-group">
120
122
  <%= f.label :height, Spree.t(:height) %>
121
123
  <%= f.text_field :height, value: number_with_precision(@product.height, precision: 2), size: 4, class: 'form-control' %>
122
124
  </div>
123
125
  </div>
124
126
 
125
- <div class="col-xs-12 col-md-6">
127
+ <div class="col-12 col-md-6">
126
128
  <div id="shipping_specs_width_field" data-hook="admin_product_form_width" class="form-group">
127
129
  <%= f.label :width, Spree.t(:width) %>
128
130
  <%= f.text_field :width, value: number_with_precision(@product.width, precision: 2), size: 4, class: 'form-control' %>
129
131
  </div>
130
132
  </div>
131
133
 
132
- <div class="col-xs-12 col-md-6">
134
+ <div class="col-12 col-md-6">
133
135
  <div id="shipping_specs_depth_field" data-hook="admin_product_form_depth" class="form-group">
134
136
  <%= f.label :depth, Spree.t(:depth) %>
135
137
  <%= f.text_field :depth, value: number_with_precision(@product.depth, precision: 2), size: 4, class: 'form-control' %>
@@ -195,13 +197,6 @@
195
197
  <% end %>
196
198
  </div>
197
199
 
198
- <div data-hook="admin_product_form_tag_list">
199
- <%= f.field_container :tag_list, class: ['form-group'] do %>
200
- <%= f.label :tag_list, Spree.t(:tags) %>
201
- <%= f.hidden_field :tag_list, value: @product.tag_list.join(','), class: 'tag_picker' %>
202
- <% end %>
203
- </div>
204
-
205
200
  <div data-hook="admin_product_form_meta">
206
201
  <div data-hook="admin_product_form_meta_title">
207
202
  <%= f.field_container :meta_title, class: ['form-group'] do %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :page_actions do %>
2
2
  <% if frontend_available? %>
3
- <%= button_link_to Spree.t(:preview_product), product_url(@product), { class: "btn-default", icon: 'eye-open', id: 'admin_preview_product', target: :_blank } %>
3
+ <%= button_link_to Spree.t(:preview_product), product_url(@product), { class: "btn-outline-secondary", icon: 'eye-open', id: 'admin_preview_product', target: :_blank } %>
4
4
  <% end %>
5
5
  <% if can?(:create, Spree::Product) %>
6
6
  <%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
@@ -12,27 +12,27 @@
12
12
  <%= search_form_for [:admin, @search] do |f| %>
13
13
  <%- locals = {f: f} %>
14
14
  <div data-hook="admin_products_index_search" class="row">
15
- <div class="col-xs-12 col-md-6">
15
+ <div class="col-12 col-lg-6">
16
16
  <div class="form-group">
17
17
  <%= f.label :name_cont, Spree.t(:name) %>
18
18
  <%= f.text_field :name_cont, size: 15, class: "form-control js-quick-search-target js-filterable" %>
19
19
  </div>
20
20
  </div>
21
- <div class="col-xs-12 col-md-6">
21
+ <div class="col-12 col-lg-6">
22
22
  <div class="form-group">
23
23
  <%= f.label :variants_including_master_sku_cont, Spree.t(:sku) %>
24
24
  <%= f.text_field :variants_including_master_sku_cont, size: 15, class: "form-control js-filterable" %>
25
25
  </div>
26
26
  </div>
27
- <div class="col-xs-12 col-md-12">
28
- <div class="field checkbox">
27
+ <div class="col-12">
28
+ <div class="field checkbox mb-2">
29
29
  <label>
30
30
  <%= f.check_box :deleted_at_null, {checked: params[:q][:deleted_at_null] == '0'}, '0', '1' %>
31
31
  <%= Spree.t(:show_deleted) %>
32
32
  </label>
33
33
  </div>
34
34
 
35
- <div class="field checkbox">
35
+ <div class="field checkbox mb-2">
36
36
  <label>
37
37
  <%= f.check_box :not_discontinued, {checked: params[:q][:not_discontinued] == '0'}, '0', '1' %>
38
38
  <%= Spree.t(:show_discontinued ) %>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <div data-hook="new_product_attrs" class="row">
17
17
  <% unless @product.has_variants? %>
18
- <div data-hook="new_product_sku" class="col-xs-12 col-md-4">
18
+ <div data-hook="new_product_sku" class="col-12 col-md-4">
19
19
  <%= f.field_container :sku, class: ['form-group'] do %>
20
20
  <%= f.label :sku, Spree.t(:sku) %>
21
21
  <%= f.text_field :sku, size: 16, class: 'form-control' %>
@@ -24,14 +24,14 @@
24
24
  </div>
25
25
  <% end %>
26
26
 
27
- <div data-hook="new_product_prototype" class="col-xs-12 col-md-4">
27
+ <div data-hook="new_product_prototype" class="col-12 col-md-4">
28
28
  <%= f.field_container :prototype, class: ['form-group'] do %>
29
29
  <%= f.label :prototype_id, Spree.t(:prototype) %>
30
30
  <%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {include_blank: true}, {class: 'select2'} %>
31
31
  <% end %>
32
32
  </div>
33
33
 
34
- <div data-hook="new_product_price" class="col-xs-12 col-md-4">
34
+ <div data-hook="new_product_price" class="col-12 col-md-4">
35
35
  <%= f.field_container :price, class: ['form-group'] do %>
36
36
  <%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span>
37
37
  <%= f.text_field :price, value: number_to_currency(@product.price, unit: ''), class: 'form-control', required: :required %>
@@ -39,7 +39,7 @@
39
39
  <% end %>
40
40
  </div>
41
41
 
42
- <div data-hook="new_product_available_on" class="col-xs-12 col-md-4">
42
+ <div data-hook="new_product_available_on" class="col-12 col-md-4">
43
43
  <%= f.field_container :available_on, class: ['form-group'] do %>
44
44
  <%= f.label :available_on, Spree.t(:available_on) %>
45
45
  <%= f.error_message_on :available_on %>
@@ -47,7 +47,7 @@
47
47
  <% end %>
48
48
  </div>
49
49
 
50
- <div data-hook="new_product_shipping_category" class="col-xs-12 col-md-4">
50
+ <div data-hook="new_product_shipping_category" class="col-12 col-md-4">
51
51
  <%= f.field_container :shipping_category, class: ['form-group'] do %>
52
52
  <%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span>
53
53
  <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', required: :required }) %>
@@ -2,12 +2,12 @@
2
2
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @product } %>
3
3
 
4
4
  <% if can? :create, Spree::StockMovement %>
5
- <div id="add_stock_form" class="panel panel-default">
5
+ <div id="add_stock_form" class="card mb-3">
6
6
  <%= render 'add_stock_form' %>
7
7
  </div>
8
8
  <% end %>
9
9
 
10
- <div class="panel panel-default">
10
+ <div class="card mb-3">
11
11
  <table class="table table-bordered" id="listing_product_stock">
12
12
  <thead>
13
13
  <tr data-hook="admin_product_stock_management_index_headers">
@@ -41,7 +41,7 @@
41
41
  </td>
42
42
 
43
43
  <td colspan="3" class="stock_location_info">
44
- <table class="table table-bordered no-marginb">
44
+ <table class="table table-bordered mb-0">
45
45
  <thead>
46
46
  <th><%= Spree.t(:stock_location) %></th>
47
47
  <th class="text-center"><%= Spree.t(:count_on_hand) %></th>
@@ -1,10 +1,10 @@
1
- <div class="panel-heading">
2
- <h1 class="panel-title">
1
+ <div class="card-header">
2
+ <h1 class="card-title mb-0 h5">
3
3
  <%= Spree.t(:promotion_actions) %>
4
4
  </h1>
5
5
  </div>
6
- <div id="action_fields" class="panel-body">
7
- <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), remote: true, id: 'new_promotion_action_form' do %>
6
+ <div id="action_fields" class="card-body">
7
+ <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), remote: true, id: 'new_promotion_action_form', class: 'mb-3' do %>
8
8
  <% options = options_for_select( Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ Spree.t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>
9
9
 
10
10
  <div class="form-group">
@@ -1,7 +1,7 @@
1
1
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion } %>
2
2
 
3
3
  <div class="row" id="general_fields" >
4
- <div class="col-xs-6 col-md-3">
4
+ <div class="col-6 col-md-3">
5
5
  <%= f.field_container :name, class: ['form-group'] do %>
6
6
  <%= f.label :name %>
7
7
  <%= f.text_field :name, class: 'form-control' %>
@@ -33,7 +33,7 @@
33
33
  <% end %>
34
34
  </div>
35
35
 
36
- <div class="col-xs-12 col-md-6">
36
+ <div class="col-12 col-md-6">
37
37
  <%= f.field_container :description, class: ['form-group'] do %>
38
38
  <%= f.label :description %>
39
39
  <%= f.text_area :description, rows: 7, class: 'form-control' %>
@@ -45,23 +45,23 @@
45
45
  <% end %>
46
46
  </div>
47
47
 
48
- <div id="expiry_fields" class="col-xs-6 col-md-3">
48
+ <div id="expiry_fields" class="col-6 col-md-3">
49
49
  <%= f.field_container :usage_limit do %>
50
50
  <%= f.label :usage_limit %>
51
51
  <%= f.number_field :usage_limit, min: 0, class: 'form-control' %>
52
- <p class="help-block">
52
+ <small class="form-text text-muted">
53
53
  <%= Spree.t(:current_promotion_usage, count: @promotion.credits_count) %>
54
- </p>
54
+ </small>
55
55
  <% end %>
56
56
 
57
57
  <div id="starts_at_field" class="form-group">
58
58
  <%= f.label :starts_at %>
59
- <%= f.text_field :starts_at, value: datepicker_field_value(@promotion.starts_at), class: 'datepicker datepicker-from form-control' %>
59
+ <%= f.datetime_field :starts_at, class: 'form-control' %>
60
60
  </div>
61
61
 
62
62
  <div id="expires_at_field" class="form-group">
63
63
  <%= f.label :expires_at %>
64
- <%= f.text_field :expires_at, value: datepicker_field_value(@promotion.expires_at), class: 'datepicker datepicker-to form-control' %>
64
+ <%= f.datetime_field :expires_at, class: 'form-control' %>
65
65
  </div>
66
66
  </div>
67
67
  </div>
@@ -1,8 +1,8 @@
1
- <div class="promotion_action promotion-block <%= promotion_action.type.to_s.demodulize.underscore %> panel panel-default" id="<%= dom_id promotion_action %>">
1
+ <div class="promotion_action promotion-block <%= promotion_action.type.to_s.demodulize.underscore %> card mb-3" id="<%= dom_id promotion_action %>">
2
2
  <% type_name = promotion_action.class.name.demodulize.underscore %>
3
- <div class="panel-heading">
4
- <%= link_to_with_icon 'delete', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), remote: true, method: :delete, class: 'delete pull-right' %>
5
- <h3 class="panel-title promotion-title"><%= Spree.t("promotion_action_types.#{type_name}.description") %></h3>
3
+ <div class="card-header d-flex justify-content-between">
4
+ <%= link_to_with_icon 'delete', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), remote: true, method: :delete, class: 'delete order-2' %>
5
+ <h3 class="card-title h5 mb-0 promotion-title"><%= Spree.t("promotion_action_types.#{type_name}.description") %></h3>
6
6
  </div>
7
7
  <% param_prefix = "promotion[promotion_actions_attributes][#{promotion_action.id}]" %>
8
8
  <%= hidden_field_tag "#{param_prefix}[id]", promotion_action.id %>
@@ -1,11 +1,18 @@
1
- <div class="promotion_rule promotion-block panel panel-default" id="<%= dom_id promotion_rule %>">
1
+ <div class="promotion_rule promotion-block card mb-3" id="<%= dom_id promotion_rule %>">
2
2
  <% type_name = promotion_rule.class.name.demodulize.underscore %>
3
- <div class="panel-heading">
4
- <%= link_to_with_icon 'delete', '', spree.admin_promotion_promotion_rule_path(@promotion, promotion_rule), remote: true, method: :delete, class: 'delete pull-right' %>
5
- <h3 class='panel-title promotion-title <%= 'no-text' if type_name == 'user_logged_in' || type_name == 'first_order'%>'><%= Spree.t("promotion_rule_types.#{type_name}.description") %></h3>
3
+ <div class="card-header d-flex justify-content-between">
4
+ <%= link_to_with_icon 'delete', '',
5
+ spree.admin_promotion_promotion_rule_path(@promotion, promotion_rule),
6
+ remote: true,
7
+ method: :delete,
8
+ class: 'delete order-2' %>
9
+ <h3 class='card-title h5 mb-0 promotion-title'>
10
+ <%= Spree.t("promotion_rule_types.#{type_name}.description") %>
11
+ </h3>
6
12
  </div>
7
13
  <% param_prefix = "promotion[promotion_rules_attributes][#{promotion_rule.id}]" %>
8
14
  <%= hidden_field_tag "#{param_prefix}[id]", promotion_rule.id %>
9
15
 
10
- <%= render partial: "spree/admin/promotions/rules/#{type_name}", locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } %>
16
+ <%= render partial: "spree/admin/promotions/rules/#{type_name}",
17
+ locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } %>
11
18
  </div>
@@ -1,11 +1,11 @@
1
- <div class="panel-heading">
2
- <h1 class="panel-title">
1
+ <div class="card-header">
2
+ <h1 class="card-title mb-0 h5">
3
3
  <%= Spree.t(:rules) %>
4
4
  </h1>
5
5
  </div>
6
- <div id="rule_fields" class="panel-body">
6
+ <div id="rule_fields" class="card-body">
7
7
 
8
- <%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), remote: true, id: 'new_product_rule_form' do %>
8
+ <%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), remote: true, id: 'new_product_rule_form', class: 'mb-3' do %>
9
9
 
10
10
  <div class="form-group">
11
11
  <%= label_tag :promotion_rule_type, Spree.t(:add_rule_of_type) %>
@@ -20,7 +20,7 @@
20
20
  <%= form_for @promotion, url: object_url, method: :put do |f| %>
21
21
  <div id="promotion-policy-select">
22
22
  <% Spree::Promotion::MATCH_POLICIES.each do |policy| %>
23
- <div class="radio">
23
+ <div class="radio my-2">
24
24
  <%= f.label "match_policy_#{policy}" do %>
25
25
  <%= f.radio_button :match_policy, policy %>
26
26
  <%= Spree.t "promotion_form.match_policies.#{policy}" %>
@@ -1,6 +1,6 @@
1
- <div class="panel-body calculator-fields">
2
- <div class="row no-marginb">
3
- <div class="form-group col-xs-12 col-md-6 no-marginb">
1
+ <div class="card-body calculator-fields">
2
+ <div class="row mb-0">
3
+ <div class="form-group col-12 col-md-6 mb-0">
4
4
  <% field_name = "#{param_prefix}[calculator_type]" %>
5
5
  <%= label_tag field_name, Spree.t(:calculator) %>
6
6
  <%= select_tag field_name,
@@ -8,7 +8,7 @@
8
8
  class: 'type-select select2' %>
9
9
  </div>
10
10
  <% unless promotion_action.new_record? %>
11
- <div class="form-group col-xs-12 col-md-6 no-marginb settings">
11
+ <div class="form-group col-12 col-md-6 mb-0 settings">
12
12
  <% type_name = promotion_action.calculator.type.demodulize.underscore %>
13
13
  <% if lookup_context.exists?("fields",
14
14
  ["spree/admin/promotions/calculators/#{type_name}"], true) %>
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  </div>
25
25
  <% if promotion_action.calculator.respond_to?(:preferences) %>
26
- <div class="alert alert-info js-warning margint no-marginb">
26
+ <div class="alert alert-info js-warning margint mb-0">
27
27
  <%= Spree.t(:calculator_settings_warning) %>
28
28
  </div>
29
29
  <% end %>
@@ -1,6 +1,6 @@
1
- <div class="panel-body calculator-fields">
2
- <div class="row no-marginb">
3
- <div class="form-group col-xs-12 col-md-6 no-marginb">
1
+ <div class="card-body calculator-fields">
2
+ <div class="row mb-0">
3
+ <div class="form-group col-12 col-md-6 mb-0">
4
4
  <% field_name = "#{param_prefix}[calculator_type]" %>
5
5
  <%= label_tag field_name, Spree.t(:calculator) %>
6
6
  <%= select_tag field_name,
@@ -8,7 +8,7 @@
8
8
  class: 'type-select select2' %>
9
9
  </div>
10
10
  <% unless promotion_action.new_record? %>
11
- <div class="form-group col-xs-12 col-md-6 no-marginb settings">
11
+ <div class="form-group col-12 col-md-6 mb-0 settings">
12
12
  <% promotion_action.calculator.preferences.keys.map do |key| %>
13
13
  <% field_name = "#{param_prefix}[calculator_attributes][preferred_#{key}]" %>
14
14
  <%= label_tag field_name, Spree.t(key.to_s) %>
@@ -21,7 +21,7 @@
21
21
  <% end %>
22
22
  </div>
23
23
  <% if promotion_action.calculator.respond_to?(:preferences) %>
24
- <div class="alert alert-info js-warning margint no-marginb">
24
+ <div class="alert alert-info js-warning margint mb-0">
25
25
  <%= Spree.t(:calculator_settings_warning) %>
26
26
  </div>
27
27
  <% end %>
@@ -1,4 +1,4 @@
1
- <div class="panel-body calculator-fields">
1
+ <div class="card-body calculator-fields">
2
2
  <% promotion_action.promotion_action_line_items.each do |item| %>
3
3
  <% variant = item.variant %>
4
4
 
@@ -15,9 +15,9 @@
15
15
  <% line_item_prefix = "#{param_prefix}[promotion_action_line_items_attributes][#{index}]" %>
16
16
  <div class="form-group">
17
17
  <%= label_tag "#{line_item_prefix}_variant_id", Spree.t(:variant) %>
18
- <%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: "variant_autocomplete fullwidth-input" %>
18
+ <%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: "variant_autocomplete" %>
19
19
  </div>
20
- <div class="form-group no-marginb">
20
+ <div class="form-group mb-0">
21
21
  <%= label_tag "#{line_item_prefix}_quantity", Spree.t(:quantity) %>
22
22
  <%= number_field_tag "#{line_item_prefix}[quantity]", line_item.quantity, min: 1, class: 'form-control' %>
23
23
  </div>