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
@@ -11,7 +11,7 @@
11
11
  <strong><%= Spree.t(:failed_payment_attempts) %>:</strong>
12
12
  </td>
13
13
  <td>
14
- <span class="label label-<%= @order.payments.failed.size > 0 ? 'void' : 'complete' %>">
14
+ <span class="badge badge-<%= @order.payments.failed.size > 0 ? 'void' : 'complete' %>">
15
15
  <%= link_to "#{Spree.t 'payments_count', count: @order.payments.failed.size, default: pluralize(@order.payments.failed.size, Spree.t(:payment))}", spree.admin_order_payments_path(@order) %>
16
16
  </span>
17
17
  </td>
@@ -20,7 +20,7 @@
20
20
  <tr>
21
21
  <td><strong><%= Spree.t(:avs_response) %>:</strong></td>
22
22
  <td>
23
- <span class="label label-<%= latest_payment.is_avs_risky? ? 'void' : 'complete' %>">
23
+ <span class="badge badge-<%= latest_payment.is_avs_risky? ? 'void' : 'complete' %>">
24
24
  <% if latest_payment.is_avs_risky? %>
25
25
  <%= "#{Spree.t(:error)}: #{avs_response_code[latest_payment.avs_response]}" %>
26
26
  <% else %>
@@ -33,7 +33,7 @@
33
33
  <tr>
34
34
  <td><strong><%= Spree.t(:cvv_response) %>:</strong></td>
35
35
  <td>
36
- <span class="label label-<%= latest_payment.is_cvv_risky? ? 'void' : 'complete' %>">
36
+ <span class="badge badge-<%= latest_payment.is_cvv_risky? ? 'void' : 'complete' %>">
37
37
  <% if latest_payment.is_cvv_risky? %>
38
38
  <%= "#{Spree.t(:error)}: #{cvv_response_code[latest_payment.cvv_response_code]}" %>
39
39
  <% else %>
@@ -1,16 +1,16 @@
1
- <div id="<%= "shipment_#{shipment.id}" %>" data-hook="admin_shipment_form" class="panel panel-default">
1
+ <div id="<%= "shipment_#{shipment.id}" %>" data-hook="admin_shipment_form" class="card mb-3">
2
2
 
3
3
  <%= render partial: "spree/admin/variants/split", formats: :js %>
4
4
 
5
- <div class="panel-heading stock-location no-borderb" data-hook="stock-location">
6
- <h1 class="panel-title">
5
+ <div class="card-header stock-location no-borderb" data-hook="stock-location">
6
+ <h1 class="d-flex flex-wrap align-items-center card-title mb-0 h5">
7
7
  <span class="shipment-number"><%= shipment.number %></span>
8
8
  -
9
9
  <span class="shipment-state"><%= Spree.t("shipment_states.#{shipment.state}") %></span>
10
10
  <%= Spree.t(:package_from) %>
11
11
  <strong class="stock-location-name" data-hook="stock-location-name">'<%= shipment.stock_location.name %>'</strong>
12
12
  <% if shipment.ready? and can? :update, shipment %>
13
- <%= link_to Spree.t(:ship), 'javascript:;', class: 'ship pull-right btn btn-success', data: { 'shipment-number' => shipment.number } %>
13
+ <%= link_to Spree.t(:ship), 'javascript:;', class: 'ship ml-auto btn btn-success', data: { 'shipment-number' => shipment.number } %>
14
14
  <div class='clearfix'></div>
15
15
  <% end %>
16
16
  </h1>
@@ -75,7 +75,7 @@
75
75
  <label><%= Spree.t(:tracking_number) %>:</label>
76
76
  <%= text_field_tag :tracking, shipment.tracking, class: "form-control" %>
77
77
  </td>
78
- <td class="actions">
78
+ <td class="actions text-center">
79
79
  <% if can? :update, shipment %>
80
80
  <%= link_to_with_icon 'cancel', Spree.t('actions.cancel'), "#", class: 'cancel-tracking btn btn-primary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
81
81
  <%= link_to_with_icon 'save', Spree.t('actions.save'), "#", class: 'save-tracking btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
@@ -33,7 +33,7 @@
33
33
 
34
34
  <td class="cart-item-delete actions actions-3 text-center" data-hook="cart_item_delete">
35
35
  <% if((!shipment.shipped?) && can?(:update, item.line_item)) %>
36
- <%= link_to_with_icon 'pencil', Spree.t('actions.edit'), "#", class: 'edit-item btn btn-default btn-sm', title: Spree.t('actions.edit'), no_text: true %>
36
+ <%= link_to_with_icon 'pencil', Spree.t('actions.edit'), "#", class: 'edit-item btn btn-outline-secondary btn-sm', title: Spree.t('actions.edit'), no_text: true %>
37
37
  <%= link_to_with_icon 'cancel', Spree.t('actions.cancel'), "#", class: 'cancel-item btn btn-primary btn-sm', data: { action: 'cancel' }, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
38
38
  <%= link_to_with_icon 'ok', Spree.t('actions.save'), "#", class: 'save-item btn btn-success btn-sm', data: {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none', no_text: true %>
39
39
  <%= link_to_with_icon 'split', Spree.t('split'), "#", class: 'split-item btn btn-primary btn-sm', data: {action: 'split', 'variant-id' => item.variant.id}, title: Spree.t('split'), no_text: true %>
@@ -1,16 +1,16 @@
1
1
  <div data-hook="admin_customer_detail_form_fields">
2
2
 
3
- <div class="panel panel-default" data-hook="customer_guest">
3
+ <div class="card mb-3" data-hook="customer_guest">
4
4
 
5
- <div class="panel-heading">
6
- <h1 class="panel-title">
5
+ <div class="card-header">
6
+ <h1 class="card-title mb-0 h5">
7
7
  <%= Spree.t(:account) %>
8
8
  </h1>
9
9
  </div>
10
10
 
11
- <div class="panel-body">
11
+ <div class="card-body">
12
12
  <div data-hook="customer_fields" class="row">
13
- <div class="col-xs-12 col-md-8">
13
+ <div class="col-12 col-lg-8">
14
14
  <div class="form-group">
15
15
  <%= f.label :email, Spree.t(:email) %>
16
16
  <% if can? :edit, @order.user %>
@@ -20,14 +20,14 @@
20
20
  <% end %>
21
21
  </div>
22
22
  </div>
23
- <div class="col-xs-12 col-md-4">
23
+ <div class="col-12 col-lg-4">
24
24
  <div class="form-group">
25
25
  <strong><%= label_tag nil, Spree.t(:guest_checkout) %></strong>
26
26
  <% guest = @order.user.nil? %>
27
27
 
28
28
  <% if @order.completed? %>
29
29
  <div>
30
- <span class="badge">
30
+ <span class="badge badge-secondary">
31
31
  <%= guest ? Spree.t(:say_yes) : Spree.t(:say_no) %>
32
32
  <%= hidden_field_tag :guest_checkout, guest %>
33
33
  </span>
@@ -55,13 +55,13 @@
55
55
  </div>
56
56
 
57
57
  <div class="row">
58
- <div data-hook="bill_address_wrapper" class="col-xs-12 col-md-6">
59
- <div class="panel panel-default">
60
- <div class="panel-heading">
61
- <h1 class="panel-title"><%= Spree.t(:billing_address) %></h1>
58
+ <div data-hook="bill_address_wrapper" class="col-12 col-lg-6">
59
+ <div class="card mb-3">
60
+ <div class="card-header">
61
+ <h1 class="card-title mb-0 h5"><%= Spree.t(:billing_address) %></h1>
62
62
  </div>
63
63
 
64
- <div class="panel-body">
64
+ <div class="card-body">
65
65
  <% if can? :edit, @order.user %>
66
66
  <%= f.fields_for :bill_address do |ba_form| %>
67
67
  <%= render 'spree/admin/shared/address_form', f: ba_form, type: "billing" %>
@@ -73,12 +73,12 @@
73
73
  </div>
74
74
  </div>
75
75
 
76
- <div class="col-xs-12 col-md-6" data-hook="ship_address_wrapper">
77
- <div class="panel panel-default">
78
- <div class="panel-heading">
79
- <h1 class="panel-title"><%= Spree.t(:shipping_address) %></h1>
76
+ <div class="col-12 col-lg-6" data-hook="ship_address_wrapper">
77
+ <div class="card mb-3">
78
+ <div class="card-header">
79
+ <h1 class="card-title mb-0 h5"><%= Spree.t(:shipping_address) %></h1>
80
80
  </div>
81
- <div class="panel-body">
81
+ <div class="card-body">
82
82
  <% if can? :edit, @order.user %>
83
83
  <%= f.fields_for :ship_address do |sa_form| %>
84
84
  <div class="form-group">
@@ -5,13 +5,13 @@
5
5
  <% end %>
6
6
 
7
7
  <% if can? :edit, @order.user %>
8
- <div id="select-customer" class="panel panel-default" data-hook>
9
- <div class="panel-heading">
10
- <h1 class="panel-title">
8
+ <div id="select-customer" class="card mb-3" data-hook>
9
+ <div class="card-header">
10
+ <h1 class="card-title mb-0 h5">
11
11
  <%= Spree.t(:customer_search) %>
12
12
  </h1>
13
13
  </div>
14
- <div class="panel-body">
14
+ <div class="card-body">
15
15
  <%= hidden_field_tag :customer_search, nil, class: 'error-message' %>
16
16
  <%= render partial: "spree/admin/orders/customer_details/autocomplete", formats: :js %>
17
17
  </div>
@@ -3,7 +3,11 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_order), new_admin_order_url, class: "btn-success", icon: 'add', id: 'admin_new_order' %>
6
+ <%= button_link_to Spree.t(:new_order),
7
+ new_admin_order_url,
8
+ class: "btn-success",
9
+ icon: 'add',
10
+ id: 'admin_new_order' %>
7
11
  <% end if can? :create, Spree::Order %>
8
12
 
9
13
  <% content_for :table_filter do %>
@@ -11,32 +15,42 @@
11
15
 
12
16
  <%= search_form_for [:admin, @search] do |f| %>
13
17
  <div class="row">
14
- <div class="date-range-filter col-xs-12 col-md-8">
18
+ <div class="date-range-filter col-12 col-lg-8">
15
19
  <div class="form-group">
16
20
  <%= label_tag :q_created_at_gt, Spree.t(:date_range) %>
17
- <div class="row no-padding-bottom">
18
- <div class="col-xs-12 col-md-6">
21
+ <div class="row pb-0">
22
+ <div class="col-12 col-lg-6">
19
23
  <div class="input-group">
20
- <%= f.text_field :created_at_gt, class: 'datepicker datepicker-from form-control js-filterable', value: params[:q][:created_at_gt], placeholder: Spree.t(:start) %>
21
- <span class="input-group-addon">
22
- <i class="icon icon-calendar"></i>
23
- </span>
24
+ <%= f.text_field :created_at_gt,
25
+ class: 'datepicker datepicker-from form-control js-filterable',
26
+ value: params[:q][:created_at_gt],
27
+ placeholder: Spree.t(:start) %>
28
+ <div class="input-group-append">
29
+ <span class="input-group-text">
30
+ <i class="icon icon-calendar"></i>
31
+ </span>
32
+ </div>
24
33
  </div>
25
34
 
26
35
  </div>
27
- <div class="col-xs-12 col-md-6">
36
+ <div class="col-12 col-lg-6">
28
37
  <div class="input-group">
29
- <%= f.text_field :created_at_lt, class: 'datepicker datepicker-to form-control js-filterable', value: params[:q][:created_at_lt], placeholder: Spree.t(:stop) %>
30
- <span class="input-group-addon">
31
- <i class="icon icon-calendar"></i>
32
- </span>
38
+ <%= f.text_field :created_at_lt,
39
+ class: 'datepicker datepicker-to form-control js-filterable',
40
+ value: params[:q][:created_at_lt],
41
+ placeholder: Spree.t(:stop) %>
42
+ <div class="input-group-append">
43
+ <span class="input-group-text">
44
+ <i class="icon icon-calendar"></i>
45
+ </span>
46
+ </div>
33
47
  </div>
34
48
  </div>
35
49
  </div>
36
50
  </div>
37
51
  </div>
38
52
 
39
- <div class="col-xs-12 col-md-4">
53
+ <div class="col-12 col-lg-4">
40
54
  <div class="form-group">
41
55
  <%= label_tag :q_number_cont, Spree.t(:order_number, number: '') %>
42
56
  <%= f.text_field :number_cont, class: 'form-control js-quick-search-target js-filterable' %>
@@ -47,21 +61,24 @@
47
61
 
48
62
  <div class="row">
49
63
 
50
- <div class="col-xs-12 col-md-4">
64
+ <div class="col-12 col-lg-4">
51
65
  <div class="form-group">
52
66
  <%= label_tag :q_state_eq, Spree.t(:status) %>
53
- <%= f.select :state_eq, Spree::Order.state_machines[:state].states.map {|s| [Spree.t("order_state.#{s.name}"), s.value]}, { include_blank: true }, class: 'select2 js-filterable' %>
67
+ <%= f.select :state_eq,
68
+ Spree::Order.state_machines[:state].states.map {|s| [Spree.t("order_state.#{s.name}"), s.value]},
69
+ { include_blank: true },
70
+ class: 'select2 js-filterable' %>
54
71
  </div>
55
72
  </div>
56
73
 
57
- <div class="col-xs-12 col-md-4">
74
+ <div class="col-12 col-lg-4">
58
75
  <div class="form-group">
59
76
  <%= label_tag :q_payment_state_eq, Spree.t(:payment_state) %>
60
77
  <%= f.select :payment_state_eq, Spree::Order::PAYMENT_STATES.map {|s| [Spree.t("payment_states.#{s}"), s]}, { include_blank: true }, class: 'select2 js-filterable' %>
61
78
  </div>
62
79
  </div>
63
80
 
64
- <div class="col-xs-12 col-md-4">
81
+ <div class="col-12 col-lg-4">
65
82
  <div class="form-group">
66
83
  <%= label_tag :q_shipment_state_eq, Spree.t(:shipment_state) %>
67
84
  <%= f.select :shipment_state_eq, Spree::Order::SHIPMENT_STATES.map {|s| [Spree.t("shipment_states.#{s}"), s]}, { include_blank: true }, class: 'select2 js-filterable' %>
@@ -72,21 +89,21 @@
72
89
 
73
90
  <div class="row">
74
91
 
75
- <div class="col-xs-12 col-md-4">
92
+ <div class="col-12 col-lg-4">
76
93
  <div class="form-group">
77
94
  <%= label_tag :q_bill_address_firstname_start, Spree.t(:first_name_begins_with) %>
78
95
  <%= f.text_field :bill_address_firstname_start, class: 'form-control js-filterable' %>
79
96
  </div>
80
97
  </div>
81
98
 
82
- <div class="col-xs-12 col-md-4">
99
+ <div class="col-12 col-lg-4">
83
100
  <div class="form-group">
84
101
  <%= label_tag :q_bill_address_lastname_start, Spree.t(:last_name_begins_with) %>
85
102
  <%= f.text_field :bill_address_lastname_start, class: 'form-control js-filterable' %>
86
103
  </div>
87
104
  </div>
88
105
 
89
- <div class="col-xs-12 col-md-4">
106
+ <div class="col-12 col-lg-4">
90
107
  <div class="form-group">
91
108
  <%= label_tag :q_email_cont, Spree.t(:email) %>
92
109
  <%= f.text_field :email_cont, class: 'form-control js-filterable' %>
@@ -97,46 +114,46 @@
97
114
 
98
115
  <div class="row">
99
116
 
100
- <div class="col-xs-12 col-md-4">
117
+ <div class="col-12 col-lg-4">
101
118
  <div class="form-group">
102
119
  <%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
103
120
  <%= f.text_field :line_items_variant_sku_eq, class: 'form-control js-filterable' %>
104
121
  </div>
105
122
  </div>
106
123
 
107
- <div class="col-xs-12 col-md-4">
124
+ <div class="col-12 col-lg-4">
108
125
  <div class="form-group">
109
126
  <%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
110
127
  <%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2 js-filterable' %>
111
128
  </div>
112
129
  </div>
113
130
 
114
- <div class="col-xs-12 col-md-4">
131
+ <div class="col-12 col-lg-4">
115
132
  <div class="form-group">
116
133
  <%= label_tag :q_store_id_in, Spree.t(:store) %>
117
134
  <%= f.select :store_id_in, Spree::Store.order(:name).pluck(:name, :id), { include_blank: true }, class: 'select2 js-filterable' %>
118
135
  </div>
119
136
  </div>
120
137
 
121
- <div class="col-xs-12 col-md-4">
138
+ <div class="col-12 col-lg-4">
122
139
  <div class="form-group">
123
140
  <%= label_tag :q_channel_eq, Spree.t(:channel) %>
124
141
  <%= f.select :channel_eq, Spree::Order.distinct.pluck(:channel), { include_blank: true }, class: 'select2 js-filterable' %>
125
142
  </div>
126
143
  </div>
127
144
 
128
- <div class="col-xs-12 col-md-4">
145
+ <div class="col-12 col-lg-4">
129
146
 
130
147
  <div class="form-group">
131
148
 
132
- <div class="checkbox">
149
+ <div class="checkbox mt-2">
133
150
  <%= label_tag 'q_completed_at_not_null' do %>
134
151
  <%= f.check_box :completed_at_not_null, {checked: @show_only_completed}, '1', '0' %>
135
152
  <%= Spree.t(:show_only_complete_orders) %>
136
153
  <% end %>
137
154
  </div>
138
155
 
139
- <div class="checkbox">
156
+ <div class="checkbox mt-2">
140
157
  <%= label_tag 'q_considered_risky_eq' do %>
141
158
  <%= f.check_box :considered_risky_eq, {checked: (params[:q][:considered_risky_eq] == '1')}, '1', '' %>
142
159
  <%= Spree.t(:show_only_considered_risky) %>
@@ -190,24 +207,30 @@
190
207
  </td>
191
208
  <td><%= link_to order.number, edit_admin_order_path(order) %></td>
192
209
  <td>
193
- <span class="label label-<%= order.considered_risky ? 'considered_risky' : 'considered_safe' %>">
210
+ <span class="badge badge-<%= order.considered_risky ? 'considered_risky' : 'considered_safe' %>">
194
211
  <%= order.considered_risky ? Spree.t("risky") : Spree.t("safe") %>
195
212
  </span>
196
213
  </td>
197
214
  <td>
198
- <span class="label label-<%= order.state.downcase %>"><%= Spree.t("order_state.#{order.state.downcase}") %></span>
215
+ <span class="badge badge-<%= order.state.downcase %>"><%= Spree.t("order_state.#{order.state.downcase}") %></span>
199
216
  <span class="icon icon-filter filterable js-add-filter" data-ransack-field="q_state_eq" data-ransack-value="<%= order.state %>"></span>
200
217
  </td>
201
218
  <td>
202
219
  <% if order.payment_state %>
203
- <span class="label label-<%= order.payment_state %>"><%= link_to Spree.t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) %></span>
204
- <span class="icon icon-filter filterable js-add-filter" data-ransack-field="q_payment_state_eq" data-ransack-value="<%= order.payment_state %>"></span>
220
+
221
+ <%= link_to Spree.t("payment_states.#{order.payment_state}"),
222
+ admin_order_payments_path(order),
223
+ class: "badge badge-#{order.payment_state}" %>
224
+
225
+ <span class="icon icon-filter filterable js-add-filter"
226
+ data-ransack-field="q_payment_state_eq"
227
+ data-ransack-value="<%= order.payment_state %>"></span>
205
228
  <% end %>
206
229
  </td>
207
230
  <% if Spree::Order.checkout_step_names.include?(:delivery) %>
208
231
  <td>
209
232
  <% if order.shipment_state %>
210
- <span class="label label-<%= order.shipment_state %>"><%= Spree.t("shipment_states.#{order.shipment_state}") %></span>
233
+ <span class="badge badge-<%= order.shipment_state %>"><%= Spree.t("shipment_states.#{order.shipment_state}") %></span>
211
234
  <span class="icon icon-filter filterable js-add-filter" data-ransack-field="q_shipment_state_eq" data-ransack-value="<%= order.shipment_state %>"></span>
212
235
  <% end %>
213
236
  </td>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div data-hook="payment_method" class="row">
4
4
 
5
- <div class="col-xs-12 col-md-4">
5
+ <div class="col-12 col-md-4">
6
6
  <div id="preference-settings" data-hook class="form-group">
7
7
  <%= f.label :type, Spree.t(:provider) %>
8
8
  <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {id: 'gtwy-type', class: 'select2'}) %>
@@ -25,14 +25,14 @@
25
25
  </div>
26
26
  <div data-hook="active" class="form-group">
27
27
  <strong><%= Spree.t(:active) %></strong>
28
- <div class="radio">
28
+ <div class="radio my-2">
29
29
  <%= label_tag :payment_method_active_true do %>
30
30
  <%= radio_button :payment_method, :active, true %>
31
31
  <%= Spree.t(:say_yes) %>
32
32
  <% end %>
33
33
  </div>
34
34
 
35
- <div class="radio">
35
+ <div class="radio my-2">
36
36
  <%= label_tag :payment_method_active_false do %>
37
37
  <%= radio_button :payment_method, :active, false %>
38
38
  <%= Spree.t(:say_no) %>
@@ -41,7 +41,7 @@
41
41
  </div>
42
42
  </div>
43
43
 
44
- <div class="col-xs-12 col-md-8">
44
+ <div class="col-12 col-md-8">
45
45
  <%= field_container :payment_method, :name, class: ['form-group'], 'data-hook' => 'name' do %>
46
46
  <%= label_tag :payment_method_name, Spree.t(:name) %>
47
47
  <%= text_field :payment_method, :name, class: 'form-control' %>
@@ -19,16 +19,16 @@
19
19
  <td class="text-center"><%= payment_method_name(payment) %></td>
20
20
  <td class="text-center"><%= payment.transaction_id %></td>
21
21
  <td class="text-center">
22
- <span class="label label-<%= payment.state %>">
22
+ <span class="badge badge-<%= payment.state %>">
23
23
  <%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
24
24
  </span>
25
25
  </td>
26
26
  <td class="actions actions-2 text-center">
27
27
  <% payment.actions.each do |action| %>
28
28
  <% if action == 'credit' %>
29
- <%= link_to_with_icon('refund', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-default btn-sm") if can?(:create, Spree::Refund) %>
29
+ <%= link_to_with_icon('refund', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %>
30
30
  <% else %>
31
- <%= link_to_with_icon(action, Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-default btn-sm") if can?(action.to_sym, payment) %>
31
+ <%= link_to_with_icon(action, Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %>
32
32
  <% end %>
33
33
  <% end %>
34
34
  </td>
@@ -20,7 +20,7 @@
20
20
 
21
21
  <% if @payments.any? %>
22
22
 
23
- <div data-hook="payment_list" class="panel panel-default no-border-bottom table-wrapper">
23
+ <div data-hook="payment_list" class="mb-3">
24
24
  <%= render partial: 'list', locals: { payments: @payments } %>
25
25
  </div>
26
26
 
@@ -2,8 +2,16 @@
2
2
  <%= render 'spree/admin/shared/error_messages', target: @product %>
3
3
 
4
4
  <% content_for :page_actions do %>
5
- <%= button_link_to(Spree.t(:add_product_properties), "javascript:;", { icon: 'add', :'data-target' => "tbody#product_properties", class: 'btn-success spree_add_fields' }) %>
6
- <span class="js-new-ptype-link"><%= button_link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, { icon: 'properties', remote: true, 'data-update' => 'prototypes', class: 'btn-default' } %></span>
5
+ <%= button_link_to(
6
+ Spree.t(:add_product_properties),
7
+ "javascript:;",
8
+ { icon: 'add', :'data-target' => "tbody#product_properties", class: 'btn-success spree_add_fields' }) %>
9
+
10
+ <span class="js-new-ptype-link">
11
+ <%= button_link_to Spree.t(:select_from_prototype),
12
+ available_admin_prototypes_url,
13
+ { icon: 'properties', remote: true, 'data-update' => 'prototypes', class: 'btn-outline-secondary' } %>
14
+ </span>
7
15
  <% end if can? :create, Spree::ProductProperty %>
8
16
 
9
17
  <%= form_for @product, url: spree.admin_product_url(@product), method: :put do |f| %>