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
@@ -7,7 +7,7 @@
7
7
  type: calculator.preference_type(:base_amount)) %>
8
8
  </div>
9
9
 
10
- <div class="form-group no-marginb">
10
+ <div class="form-group mb-0">
11
11
  <%= label_tag nil, Spree.t(:tiers) %>
12
12
  <%= content_tag :div, nil, class: "hidden js-original-tiers",
13
13
  data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
@@ -21,22 +21,26 @@
21
21
  </script>
22
22
 
23
23
  <script type="text/x-handlebars-template" id="tier-fields-template">
24
- <div class="tier panel panel-default">
25
- <div class="panel-body">
24
+ <div class="tier card mb-3">
25
+ <div class="card-body p-3">
26
26
  <div class="form-group">
27
27
  <div class="input-group">
28
- <span class="input-group-addon">$</span>
28
+ <div class="input-group-prepend">
29
+ <div class="input-group-text">$</div>
30
+ </div>
29
31
  <input class="js-base-input form-control" type="text" value={{baseField.value}}>
30
32
  </div>
31
33
  </div>
32
34
  <div class="form-group">
33
35
  <div class="input-group">
34
- <span class="input-group-addon">$</span>
36
+ <div class="input-group-prepend">
37
+ <div class="input-group-text">$</div>
38
+ </div>
35
39
  <input class="js-value-input form-control"
36
40
  name="{{valueField.name}}" type="text" value={{valueField.value}}>
37
41
  </div>
38
42
  </div>
39
- <a class="js-remove-tier btn btn-default btn-sm"><span class="icon icon-delete"></span></a>
43
+ <a class="js-remove-tier btn btn-outline-secondary btn-sm"><span class="icon icon-delete"></span></a>
40
44
  </div>
41
45
  </div>
42
46
  </script>
@@ -7,7 +7,7 @@
7
7
  type: calculator.preference_type(:base_percent)) %>
8
8
  </div>
9
9
 
10
- <div class="form-group no-marginb">
10
+ <div class="form-group mb-0">
11
11
  <%= label_tag nil, Spree.t(:tiers) %>
12
12
  <%= content_tag :div, nil, class: "hidden js-original-tiers",
13
13
  data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
@@ -21,22 +21,26 @@
21
21
  </script>
22
22
 
23
23
  <script type="text/x-handlebars-template" id="tier-fields-template">
24
- <div class="tier panel panel-default">
25
- <div class="panel-body">
24
+ <div class="tier card mb-3">
25
+ <div class="card-body p-3">
26
26
  <div class="form-group">
27
27
  <div class="input-group">
28
- <span class="input-group-addon">$</span>
28
+ <div class="input-group-prepend">
29
+ <div class="input-group-text">$</div>
30
+ </div>
29
31
  <input class="js-base-input form-control" type="text" value={{baseField.value}}>
30
32
  </div>
31
33
  </div>
32
34
  <div class="form-group">
33
35
  <div class="input-group">
34
- <span class="input-group-addon">%</span>
36
+ <div class="input-group-prepend">
37
+ <div class="input-group-text">%</div>
38
+ </div>
35
39
  <input class="js-value-input form-control"
36
40
  name="{{valueField.name}}" type="text" value={{valueField.value}}>
37
41
  </div>
38
42
  </div>
39
- <a class="js-remove-tier btn btn-default btn-sm"><span class="icon icon-delete"></span></a>
43
+ <a class="js-remove-tier btn btn-outline-secondary btn-sm"><span class="icon icon-delete"></span></a>
40
44
  </div>
41
45
  </div>
42
46
  </script>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <%= form_for @promotion, url: object_url, method: :put do |f| %>
7
7
  <div class="row">
8
- <div class="col-xs-12">
8
+ <div class="col-12">
9
9
  <%= render partial: 'form', locals: { f: f } %>
10
10
  <%= render partial: 'spree/admin/shared/edit_resource_links' %>
11
11
  </div>
@@ -14,14 +14,14 @@
14
14
  <% end %>
15
15
 
16
16
  <div id="promotion-filters" class="row">
17
- <div id="rules_container" class="col-xs-12 col-md-6">
18
- <div class="panel panel-default">
17
+ <div id="rules_container" class="col-12 col-md-6">
18
+ <div class="card ">
19
19
  <%= render partial: 'rules' %>
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div id="actions_container" class="col-xs-12 col-md-6">
24
- <div class="panel panel-default">
23
+ <div id="actions_container" class="col-12 col-md-6">
24
+ <div class="card ">
25
25
  <%= render partial: 'actions' %>
26
26
  </div>
27
27
  </div>
@@ -10,7 +10,7 @@
10
10
  <div data-hook="admin_promotions_index_search">
11
11
  <%= search_form_for [:admin, @search] do |f| %>
12
12
  <div class="row">
13
- <div class="col-xs-12 col-md-6">
13
+ <div class="col-12 col-lg-6">
14
14
  <div class="form-group">
15
15
  <%= label_tag :q_name_cont, Spree.t(:name) %>
16
16
  <%= f.text_field :name_cont, tabindex: 1, class: "form-control js-quick-search-target js-filterable" %>
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  </div>
24
24
 
25
- <div class="col-xs-12 col-md-6">
25
+ <div class="col-12 col-lg-6">
26
26
  <div class="form-group">
27
27
  <%= label_tag :q_path_cont, Spree.t(:path) %>
28
28
  <%= f.text_field :path_cont, tabindex: 1, class: "form-control js-filterable" %>
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
  <% end %>
44
44
 
45
- <%= paginate @promotions %>
45
+ <%= paginate @promotions, theme: 'twitter-bootstrap-4' %>
46
46
 
47
47
  <% if @promotions.any? %>
48
48
  <table class="table">
@@ -1,5 +1,5 @@
1
- <div class="panel-body">
2
- <div class="form-group no-marginb">
1
+ <div class="card-body">
2
+ <div class="form-group mb-0">
3
3
  <%= label_tag Spree.t('country_rule.label') %>
4
4
  <%= select_tag("#{param_prefix}[preferred_country_id]", options_for_select(Spree::Country.pluck(:name, :id), promotion_rule.preferred_country_id), { class: 'select_product form-control' }) %>
5
5
  </div>
@@ -1,10 +1,10 @@
1
- <div class="panel-body">
2
- <div class="row no-marginb">
3
- <div class="form-group col-xs-12 col-md-6 no-marginb">
1
+ <div class="card-body">
2
+ <div class="row mb-0">
3
+ <div class="form-group col-12 col-md-6 mb-0">
4
4
  <%= select_tag "#{param_prefix}[preferred_operator_min]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS_MIN.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator_min), { class: 'select2 select_item_total marginb' } %>
5
5
  <%= select_tag "#{param_prefix}[preferred_operator_max]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS_MAX.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator_max), { class: 'select2 select_item_total' } %>
6
6
  </div>
7
- <div class="form-group col-xs-12 col-md-6 no-marginb">
7
+ <div class="form-group col-12 col-md-6 mb-0">
8
8
  <%= text_field_tag "#{param_prefix}[preferred_amount_min]", promotion_rule.preferred_amount_min, class: 'form-control marginb' %>
9
9
  <%= text_field_tag "#{param_prefix}[preferred_amount_max]", promotion_rule.preferred_amount_max, class: 'form-control' %>
10
10
  </div>
@@ -1,4 +1,4 @@
1
- <div class="panel-body">
1
+ <div class="card-body">
2
2
  <div class="promo-rule-option-values">
3
3
  <div class="js-promo-rule-option-values"></div>
4
4
 
@@ -17,24 +17,24 @@
17
17
  </script>
18
18
 
19
19
  <script type="text/x-handlebars-template" id="promo-rule-option-value-template">
20
- <div class="promo-rule-option-value panel panel-default">
21
- <div class="panel-heading">
20
+ <div class="promo-rule-option-value panel ">
21
+ <div class="card-header">
22
22
  <a class="js-remove-promo-rule-option-value delete pull-right">
23
23
  <span class="icon icon-delete"></span>
24
24
  </a>
25
- <div class="col-xs-12 col-md-6">
25
+ <div class="col-12 col-md-6">
26
26
  <label><%= Spree.t(:product) %></label>
27
27
  </div>
28
- <div class="col-xs-12 col-md-5">
28
+ <div class="col-12 col-md-5">
29
29
  <label><%= Spree.t(:option_values) %></label>
30
30
  </div>
31
31
  <div class="clearfix"></div>
32
32
  </div>
33
- <div class="panel-body row">
34
- <div class="col-xs-12 col-md-6">
33
+ <div class="card-body row">
34
+ <div class="col-12 col-md-6">
35
35
  <input class="js-promo-rule-option-value-product-select fullwidth" type="hidden" value="{{ productSelect.value }}">
36
36
  </div>
37
- <div class="col-xs-12 col-md-6">
37
+ <div class="col-12 col-md-6">
38
38
  <input class="js-promo-rule-option-value-option-values-select fullwidth" name="<%= param_prefix %>[preferred_eligible_values][{{ productSelect.value }}]" type="hidden" value={{optionValuesSelect.value}}>
39
39
  </div>
40
40
  </div>
@@ -1,9 +1,9 @@
1
- <div class="panel-body">
1
+ <div class="card-body">
2
2
  <div class="form-group products_rule_products">
3
3
  <%= label_tag "#{param_prefix}_product_ids_string", Spree.t('product_rule.choose_products') %>
4
4
  <%= hidden_field_tag "#{param_prefix}[product_ids_string]", promotion_rule.product_ids.join(","), class: "product_picker" %>
5
5
  </div>
6
- <div class="form-group no-marginb">
6
+ <div class="form-group mb-0">
7
7
  <%= label_tag Spree.t('product_rule.label') %>
8
8
  <%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [Spree.t("product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_product form-control'}) %>
9
9
  </div>
@@ -1,9 +1,9 @@
1
- <div class="panel-body">
1
+ <div class="card-body">
2
2
  <div class="form-group taxons_rule_taxons">
3
3
  <%= label_tag "#{param_prefix}_taxon_ids_string", Spree.t('taxon_rule.choose_taxons') %>
4
4
  <%= hidden_field_tag "#{param_prefix}[taxon_ids_string]", promotion_rule.taxon_ids.join(","), class: "taxon_picker", id: 'product_taxon_ids' %>
5
5
  </div>
6
- <div class="form-group no-marginb">
6
+ <div class="form-group mb-0">
7
7
  <%= label_tag Spree.t('taxon_rule.label') %>
8
8
  <%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [Spree.t("taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_taxon form-control'}) %>
9
9
  </div>
@@ -1,5 +1,5 @@
1
- <div class="panel-body">
2
- <div class="form-group no-marginb">
1
+ <div class="card-body">
2
+ <div class="form-group mb-0">
3
3
  <%= label_tag Spree.t('user_rule.choose_users') %>
4
4
  <input type='hidden' name='<%= param_prefix %>[user_ids_string]' class='user_picker' value='<%= promotion_rule.user_ids.join(",") %>'>
5
5
  </div>
@@ -1,12 +1,12 @@
1
1
  <div data-hook="admin_property_form" class="row">
2
- <div class="col-xs-12 col-md-6">
2
+ <div class="col-12 col-md-6">
3
3
  <%= f.field_container :name, class: ['form-group'] do %>
4
4
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
5
5
  <%= f.text_field :name, class: 'form-control' %>
6
6
  <%= f.error_message_on :name %>
7
7
  <% end %>
8
8
  </div>
9
- <div class="col-xs-12 col-md-6">
9
+ <div class="col-12 col-md-6">
10
10
  <%= f.field_container :presentation, class: ['form-group'] do %>
11
11
  <%= f.label :presentation, Spree.t(:presentation) %> <span class="required">*</span>
12
12
  <%= f.text_field :presentation, class: 'form-control' %>
@@ -13,14 +13,14 @@
13
13
  <%- locals = {f: f} %>
14
14
 
15
15
  <div class="row">
16
- <div class="col-xs-12 col-md-6">
16
+ <div class="col-12 col-lg-6">
17
17
  <div data-hook="admin_property_index_search" class="form-group">
18
18
  <%= f.label :name_cont, Spree.t(:name) %>
19
19
  <%= f.text_field :name_cont, class: "form-control js-quick-search-target js-filterable" %>
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div class="col-xs-12 col-md-6">
23
+ <div class="col-12 col-lg-6">
24
24
  <div class="form-group">
25
25
  <%= f.label :presentation_cont, Spree.t(:presentation) %>
26
26
  <%= f.text_field :presentation_cont, class: "form-control js-filterable" %>
@@ -65,4 +65,4 @@
65
65
  </div>
66
66
  <% end %>
67
67
 
68
- <%= paginate @collection %>
68
+ <%= paginate @collection, theme: 'twitter-bootstrap-4' %>
@@ -10,12 +10,20 @@
10
10
  <tr id="row_<%= prototype.id %>" data-hook="available_row">
11
11
  <td><%= prototype.name %></td>
12
12
  <td class="actions actions-1">
13
- <%= link_to_with_icon 'save', Spree.t(:select), select_admin_prototype_url(prototype), class: ' btn btn-default btn-sm ajax select_properties_from_prototype', no_text: true %>
13
+ <%= link_to_with_icon 'save',
14
+ Spree.t(:select),
15
+ select_admin_prototype_url(prototype),
16
+ class: 'btn btn-success btn-sm ajax select_properties_from_prototype',
17
+ no_text: true %>
14
18
  </td>
15
19
  </tr>
16
20
  <% end %>
17
21
  <% if @prototypes.empty? %>
18
- <tr data-hook="available_none"><td colspan="2"><% Spree.t(:none) %>.</td></tr>
22
+ <tr data-hook="available_none">
23
+ <td colspan="2">
24
+ <% Spree.t(:none) %>.
25
+ </td>
26
+ </tr>
19
27
  <% end %>
20
28
  </tbody>
21
29
  </table>
@@ -1,5 +1,5 @@
1
1
  <div data-hook="admin_reimbursement_type_form_fields" class="row">
2
- <div class="col-xs-12 col-md-8">
2
+ <div class="col-12 col-md-8">
3
3
  <%= f.field_container :name, class: ['form-group'] do %>
4
4
  <%= f.label :name, Spree.t(:name) %>
5
5
  <%= f.text_field :name, class:'form-control' %>
@@ -7,7 +7,7 @@
7
7
  <% end %>
8
8
  </div>
9
9
  <%- if @reimbursement_type.new_record? %>
10
- <div class="col-xs-12 col-md-8">
10
+ <div class="col-12 col-md-8">
11
11
  <%= f.field_container :type, class: ['form-group'] do %>
12
12
  <%= f.label :type, Spree.t(:type) %>
13
13
  <%= f.select :type, options_for_select(Spree::ReimbursementType::KINDS), {:include_blank => false}, { :class => 'select2' } %>
@@ -15,16 +15,16 @@
15
15
  <% end %>
16
16
  </div>
17
17
  <% end %>
18
- <div class="col-xs-12 col-md-5">
18
+ <div class="col-12 col-md-5">
19
19
  <%= f.field_container :active, class: ['form-inline'] do %>
20
- <%= f.check_box :active, class: 'form-control' %>
20
+ <%= f.check_box :active, class: 'form-control mr-1' %>
21
21
  <%= f.label :active, Spree.t(:active) %>
22
22
  <%= f.error_message_on :active %>
23
23
  <% end %>
24
24
  </div>
25
- <div class="col-xs-12 col-md-5">
25
+ <div class="col-12 col-md-5">
26
26
  <%= f.field_container :mutable, class: ['form-inline'] do %>
27
- <%= f.check_box :mutable, class: 'form-control' %>
27
+ <%= f.check_box :mutable, class: 'form-control mr-1' %>
28
28
  <%= f.label :mutable, Spree.t(:mutable) %>
29
29
  <%= f.error_message_on :mutable %>
30
30
  <% end %>
@@ -3,8 +3,10 @@
3
3
  <%= Spree.t(:sales_totals) %>
4
4
  <% end %>
5
5
 
6
- <div class="well">
7
- <%= render partial: 'spree/admin/shared/report_order_criteria' %>
6
+ <div class="card bg-light mb-3">
7
+ <div class="card-body">
8
+ <%= render partial: 'spree/admin/shared/report_order_criteria' %>
9
+ </div>
8
10
  </div>
9
11
 
10
12
  <table class="table table-bordered admin-report" data-hook="sales_total">
@@ -26,7 +26,7 @@
26
26
  <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row">
27
27
  <td><%= return_authorization.number %></td>
28
28
  <td>
29
- <span class="label label-<%= return_authorization.state %>">
29
+ <span class="badge badge-<%= return_authorization.state %>">
30
30
  <%= Spree.t("return_authorization_states.#{return_authorization.state}") %>
31
31
  </span>
32
32
  </td>
@@ -6,7 +6,7 @@
6
6
  <div data-hook="admin_return_authorisations_index_filters">
7
7
  <%= search_form_for [:admin, @search], url: spree.admin_customer_returns_path do |f| %>
8
8
  <div class="row">
9
- <div class="col-xs-12">
9
+ <div class="col-12">
10
10
  <div class="form-group">
11
11
  <%= f.label :number_cont, Spree.t(:number) %>
12
12
  <%= f.text_field :number_cont, class: "form-control js-quick-search-target js-filterable" %>
@@ -42,9 +42,9 @@
42
42
  <td><%= link_to customer_return.order.number, spree.edit_admin_order_path(customer_return.order) %></td>
43
43
  <td>
44
44
  <% if customer_return.fully_reimbursed? %>
45
- <span class="label label-success"><%= Spree.t(:reimbursed) %></span>
45
+ <span class="badge badge-success"><%= Spree.t(:reimbursed) %></span>
46
46
  <% else %>
47
- <span class="label label-info"><%= Spree.t(:incomplete) %></span>
47
+ <span class="badge badge-info"><%= Spree.t(:incomplete) %></span>
48
48
  <% end %>
49
49
  </td>
50
50
  <td><%= customer_return.display_pre_tax_total.to_html %></td>
@@ -3,14 +3,20 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_tabs do %>
6
- <li class="<%= "active" if params[:q][:state_eq].blank? %>">
7
- <%= link_to Spree.t(:all), spree.admin_return_authorizations_path %>
6
+ <li class="nav-item">
7
+ <%= link_to Spree.t(:all),
8
+ spree.admin_return_authorizations_path,
9
+ class: "nav-link #{'active' if params[:q][:state_eq].blank?}" %>
8
10
  </li>
9
- <li class="<%= "active" if params[:q][:state_eq] == "authorized" %>">
10
- <%= link_to Spree.t(:authorized), params.merge({q: {state_eq: :authorized}}).permit! %>
11
+ <li class="nav-item">
12
+ <%= link_to Spree.t(:authorized),
13
+ params.merge({q: {state_eq: :authorized}}).permit!,
14
+ class: "nav-link #{'active' if params[:q][:state_eq] == 'authorized'}" %>
11
15
  </li>
12
- <li class="<%= "active" if params[:q][:state_eq] == "canceled" %>">
13
- <%= link_to Spree.t(:canceled), params.merge({q: {state_eq: :canceled}}).permit! %>
16
+ <li class="nav-item">
17
+ <%= link_to Spree.t(:canceled),
18
+ params.merge({q: {state_eq: :canceled}}).permit!,
19
+ class: "nav-link #{'active' if params[:q][:state_eq] == 'canceled'}" %>
14
20
  </li>
15
21
  <% end %>
16
22
 
@@ -18,13 +24,13 @@
18
24
  <div data-hook="admin_return_authorisations_index_filters">
19
25
  <%= search_form_for [:admin, @search], url: spree.admin_return_authorizations_path do |f| %>
20
26
  <div class="row">
21
- <div class="col-xs-12 col-md-6">
27
+ <div class="col-12 col-lg-6">
22
28
  <div class="form-group">
23
29
  <%= f.label :number_cont, Spree.t(:number) %>
24
30
  <%= f.text_field :number_cont, class: "form-control js-quick-search-target js-filterable" %>
25
31
  </div>
26
32
  </div>
27
- <div class="col-xs-12 col-md-6">
33
+ <div class="col-12 col-lg-6">
28
34
  <div class="form-group">
29
35
  <%= label_tag :q_state_eq, Spree.t(:status) %>
30
36
  <%= f.select :state_eq, Spree::ReturnAuthorization.state_machines[:state].states.collect {|s| [Spree.t("return_authorization_states.#{s.name}"), s.value]}, {include_blank: true}, class: 'select2 js-filterable' %>
@@ -58,7 +64,7 @@
58
64
  <td><%= link_to return_authorization.number, spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization) %></td>
59
65
  <td><%= link_to return_authorization.order.number, spree.edit_admin_order_path(return_authorization.order) %></td>
60
66
  <td>
61
- <span class="label label-<%= return_authorization.state %>"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
67
+ <span class="badge badge-<%= return_authorization.state %>"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
62
68
  </td>
63
69
  <td class="actions actions-1 text-right">
64
70
  <%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true if can?(:edit, return_authorization) %>
@@ -1,61 +1,73 @@
1
1
  <% if try_spree_current_user %>
2
- <ul class="nav navbar-nav">
3
- <li class="dropdown user user-menu">
4
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">
5
- <i class="glyphicon glyphicon-user"></i>
6
- <span><%= try_spree_current_user.email %> <i class="caret"></i></span>
7
- </a>
8
- <ul class="dropdown-menu">
9
- <% if spree.respond_to? :root_path %>
10
- <li>
11
- <%= link_to spree.root_path, target: :blank do %>
12
- <i class="glyphicon glyphicon-new-window"></i>
2
+ <ul class="nav navbar-nav align-items-end h-100 justify-content-center">
3
+ <li class="dropdown user user-menu h-100">
4
+ <div class="dropdown d-flex align-items-center h-100">
5
+ <button class="dropdown-toggle btn btn-link text-white h-100" data-toggle="dropdown">
6
+ <i class="glyphicon glyphicon-user"></i>
7
+ <span>
8
+ <%= try_spree_current_user.email %> <i class="caret"></i>
9
+ </span>
10
+ </button>
11
+
12
+ <ul class="dropdown-menu position-absolute mt-0 rounded-0 border-top-0">
13
+ <% if spree.respond_to? :root_path %>
14
+ <li class="dropdown-item p-0">
15
+ <%= link_to spree.root_path, target: :blank, class: 'd-block text-dark py-2 px-4' do %>
16
+ <i class="glyphicon glyphicon-new-window"></i>
17
+ &nbsp;
18
+ <%= Spree.t(:back_to_store) %>
19
+ <% end %>
20
+ </li>
21
+ <% end %>
22
+
23
+ <% if can?(:manage, try_spree_current_user) %>
24
+ <li class="dropdown-item p-0">
25
+ <%= link_to spree.edit_admin_user_path(try_spree_current_user), class: 'd-block text-dark py-2 px-4' do %>
26
+ <i class="glyphicon glyphicon-user"></i>
27
+ &nbsp;
28
+ <%= Spree.t(:account) %>
29
+ <% end %>
30
+ </li>
31
+ <% end %>
32
+
33
+ <% if spree.respond_to? :admin_logout_path %>
34
+ <li class="dropdown-item p-0">
35
+ <%= link_to spree.admin_logout_path, class: 'd-block text-dark py-2 px-4' do %>
36
+ <i class="glyphicon glyphicon-log-out"></i>
37
+ &nbsp;
38
+ <%= Spree.t(:logout) %>
39
+ <% end %>
40
+ </li>
41
+ <% end %>
42
+
43
+ <div class="dropdown-divider"></div>
44
+
45
+ <li class="dropdown-item p-0">
46
+ <%= link_to 'http://guides.spreecommerce.org', target: :blank, class: 'd-block text-dark py-2 px-4' do %>
47
+ <i class="glyphicon glyphicon-info-sign"></i>
13
48
  &nbsp;
14
- <%= Spree.t(:back_to_store) %>
49
+ <%= Spree.t(:help_center) %>
15
50
  <% end %>
16
51
  </li>
17
- <% end %>
18
- <% if can?(:manage, try_spree_current_user) %>
19
- <li>
20
- <%= link_to spree.edit_admin_user_path(try_spree_current_user) do %>
21
- <i class="glyphicon glyphicon-user"></i>
52
+
53
+ <li class="dropdown-item p-0">
54
+ <%= link_to 'http://slack.spreecommerce.org', target: :blank, class: 'd-block text-dark py-2 px-4' do %>
55
+ <i class="glyphicon glyphicon-comment"></i>
22
56
  &nbsp;
23
- <%= Spree.t(:account) %>
57
+ <%= Spree.t(:join_slack) %>
24
58
  <% end %>
25
59
  </li>
26
- <% end %>
27
- <% if spree.respond_to? :admin_logout_path %>
28
- <li>
29
- <%= link_to spree.admin_logout_path do %>
30
- <i class="glyphicon glyphicon-log-out"></i>
60
+
61
+ <li class="dropdown-item p-0">
62
+ <%= link_to 'https://github.com/spree-contrib', target: :blank, class: 'd-block text-dark py-2 px-4' do %>
63
+ <i class="glyphicon glyphicon-download"></i>
31
64
  &nbsp;
32
- <%= Spree.t(:logout) %>
65
+ <%= Spree.t(:extensions_directory) %>
33
66
  <% end %>
34
67
  </li>
35
- <% end %>
36
- <hr />
37
- <li>
38
- <%= link_to 'http://guides.spreecommerce.org', target: :blank do %>
39
- <i class="glyphicon glyphicon-info-sign"></i>
40
- &nbsp;
41
- <%= Spree.t(:help_center) %>
42
- <% end %>
43
- </li>
44
- <li>
45
- <%= link_to 'http://slack.spreecommerce.org', target: :blank do %>
46
- <i class="glyphicon glyphicon-comment"></i>
47
- &nbsp;
48
- <%= Spree.t(:join_slack) %>
49
- <% end %>
50
- </li>
51
- <li>
52
- <%= link_to 'https://github.com/spree-contrib', target: :blank do %>
53
- <i class="glyphicon glyphicon-download"></i>
54
- &nbsp;
55
- <%= Spree.t(:extensions_directory) %>
56
- <% end %>
57
- </li>
58
- </ul>
68
+ </ul>
69
+ </div>
70
+
59
71
  </li>
60
72
  </ul>
61
73
  <% end %>