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
@@ -55,11 +55,18 @@
55
55
  <%= field_container f.object, :state, class: ["form-group", "#{type}-row"] do %>
56
56
  <%= f.label :state_id, Spree.t(:state) %>
57
57
  <span id="<%= s_or_b %>state">
58
+ <% if f.object.country.try(:states) %>
59
+
58
60
  <%= f.text_field :state_name,
59
- style: "display: #{f.object.country.states.empty? ? 'block' : 'none' };",
60
- disabled: !f.object.country.states.empty?, class: 'form-control state_name' %>
61
- <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, { include_blank: true }, { class: 'select2', style: "display: #{f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty? } %>
62
- </span>
61
+ style: "display: #{f.object.country.try(:states) && f.object.country.states.empty? ? 'block' : 'none' };",
62
+ disabled: !(f.object.country.try(:states) && f.object.country.states.empty?), class: 'form-control state_name' %>
63
+ <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, { include_blank: true }, { class: 'select2', style: "display: #{ f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty? } %>
64
+ <% else %>
65
+ <div>
66
+ <em>No country set.</em>
67
+ </div>
68
+ <% end %>
69
+ </span>
63
70
  <%= error_message_on f.object, :state_id %>
64
71
  <% end %>
65
72
 
@@ -1,12 +1,12 @@
1
- <div id="calculator_fields" data-hook class="panel panel-default">
1
+ <div id="calculator_fields" data-hook class="card mb-3">
2
2
 
3
- <div class="panel-heading">
4
- <h1 class="panel-title">
3
+ <div class="card-header">
4
+ <h1 class="card-title mb-0 h5">
5
5
  <%= Spree.t(:calculator) %>
6
6
  </h1>
7
7
  </div>
8
8
 
9
- <div id="preference-settings" data-hook class="panel-body">
9
+ <div id="preference-settings" data-hook class="card-body">
10
10
  <div class="form-group">
11
11
  <%= f.label(:calculator_type, Spree.t(:calculator), for: 'calc_type') %>
12
12
  <%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2'}) %>
@@ -1,8 +1,8 @@
1
1
  <% if content_for?(:page_title) || content_for?(:page_actions) %>
2
2
  <div class="content-header <%= "with-page-tabs" if content_for?(:page_tabs) %> page-header">
3
- <div class="row">
3
+ <div class="row align-items-center <%= if content_for?(:page_tabs) then "pb-0" else "border-bottom" end %> mb-4">
4
4
  <% if content_for?(:page_title) %>
5
- <h1 class="col-xs-<%= content_for?(:page_actions) ? '6' : '12' %>">
5
+ <h1 class="h4 pl-0 mb-0 col-<%= content_for?(:page_actions) ? '6' : '12' %>">
6
6
  <%= yield :page_title %>
7
7
  <% if content_for?(:page_title_small) %>
8
8
  <small><%= yield :page_title_small %></small>
@@ -11,13 +11,13 @@
11
11
  <% end %>
12
12
 
13
13
  <% if content_for?(:page_actions) %>
14
- <div class="page-actions col-xs-6" data-hook="toolbar">
14
+ <div class="page-actions col-6 pr-0" data-hook="toolbar">
15
15
  <%= yield :page_actions %>
16
16
  </div>
17
17
  <% end %>
18
18
 
19
19
  <% if content_for?(:page_tabs) %>
20
- <ul class="nav nav-tabs">
20
+ <ul class="nav nav-tabs w-100 mt-4">
21
21
  <%= yield :page_tabs %>
22
22
  </ul>
23
23
  <% end %>
@@ -1,26 +1,23 @@
1
1
  <header class="header logged-in">
2
2
 
3
- <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
4
- <div class="container-fluid">
5
- <div class="row">
6
- <div class="navbar-header col-xs-3 col-md-2">
7
- <%= link_to(
8
- image_tag(Spree::Config[:admin_interface_logo], id: 'logo'),
9
- spree.admin_path,
10
- class: "logo navbar-brand"
11
- ) %>
12
- <span class="navbar-toggle" id="sidebar-toggle">
13
- <span class="icon-bar"></span>
14
- <span class="icon-bar"></span>
15
- <span class="icon-bar"></span>
16
- </span>
17
- </div>
18
- <div class="col-xs-9 col-md-10">
19
- <div class="navbar-right">
20
- <%= render partial: 'spree/admin/shared/account_nav' %>
21
- </div>
22
- </div>
23
- </div>
3
+ <nav class="navbar fixed-top navbar-dark align-items-stretch" role="navigation">
4
+ <div class="navbar-header col-3 col-md-2">
5
+ <%= link_to(
6
+ image_tag(Spree::Config[:admin_interface_logo], id: 'logo'),
7
+ spree.admin_path,
8
+ class: "logo navbar-brand"
9
+ ) %>
10
+ <button
11
+ id="sidebar-toggle"
12
+ class="navbar-toggler h-100 position-absolute m-0 p-0"
13
+ type="button"
14
+ aria-expanded="false"
15
+ aria-label="Toggle navigation">
16
+ <span class="navbar-toggler-icon"></span>
17
+ </button>
18
+ </div>
19
+ <div class="col-9 col-md-10 pr-0">
20
+ <%= render partial: 'spree/admin/shared/account_nav' %>
24
21
  </div>
25
22
  </nav>
26
23
 
@@ -5,15 +5,14 @@
5
5
  <% end %>
6
6
 
7
7
  <div class="row index-pagination-row">
8
- <div class="col-xs-6">
9
- <%= paginate collection %>
8
+ <div class="col-6">
9
+ <%= paginate collection, theme: 'twitter-bootstrap-4' %>
10
10
  </div>
11
- <div class="col-xs-6">
11
+ <div class="col-6 justify-content-end">
12
12
  <div class="pagination-wrap">
13
- <%= form_tag(per_page_dropdown_params(args), { method: :get, class: 'js-per-page-form form-inline' }) do %>
13
+ <%= form_tag(per_page_dropdown_params(args), { method: :get, class: 'js-per-page-form form-inline justify-content-end' }) do %>
14
14
  <%= per_page_dropdown %>
15
15
  <% end %>
16
- <div class="clearfix"></div>
17
16
  </div>
18
17
  </div>
19
18
  </div>
@@ -1,41 +1,43 @@
1
- <% if can? :admin, Spree::Order %>
2
- <ul class="nav nav-sidebar">
3
- <%= tab *Spree::BackendConfiguration::ORDER_TABS, icon: 'shopping-cart' %>
4
- </ul>
5
- <% end %>
1
+ <nav>
2
+ <% if can? :admin, Spree::Order %>
3
+ <ul class="nav nav-sidebar border-bottom">
4
+ <%= tab *Spree::BackendConfiguration::ORDER_TABS, icon: 'shopping-cart' %>
5
+ </ul>
6
+ <% end %>
6
7
 
7
- <% if can?(:admin, Spree::ReturnAuthorization) || can?(:admin, Spree::CustomerReturn) %>
8
- <ul class="nav nav-sidebar">
9
- <%= main_menu_tree Spree.t(:returns), icon: "transfer", sub_menu: "returns", url: "#sidebar-returns" %>
10
- </ul>
11
- <% end %>
8
+ <% if can?(:admin, Spree::ReturnAuthorization) || can?(:admin, Spree::CustomerReturn) %>
9
+ <ul class="nav nav-sidebar border-bottom">
10
+ <%= main_menu_tree Spree.t(:returns), icon: "transfer", sub_menu: "returns", url: "#sidebar-returns" %>
11
+ </ul>
12
+ <% end %>
12
13
 
13
- <% if can? :admin, Spree::Product %>
14
- <ul class="nav nav-sidebar">
15
- <%= main_menu_tree Spree.t(:products), icon: "th-large", sub_menu: "product", url: "#sidebar-product" %>
16
- </ul>
17
- <% end %>
14
+ <% if can? :admin, Spree::Product %>
15
+ <ul class="nav nav-sidebar border-bottom">
16
+ <%= main_menu_tree Spree.t(:products), icon: "th-large", sub_menu: "product", url: "#sidebar-product" %>
17
+ </ul>
18
+ <% end %>
18
19
 
19
- <% if can? :admin, Spree::Admin::ReportsController %>
20
- <ul class="nav nav-sidebar">
21
- <%= tab *Spree::BackendConfiguration::REPORT_TABS, icon: 'file' %>
22
- </ul>
23
- <% end %>
20
+ <% if can? :admin, Spree::Admin::ReportsController %>
21
+ <ul class="nav nav-sidebar border-bottom">
22
+ <%= tab *Spree::BackendConfiguration::REPORT_TABS, icon: 'file' %>
23
+ </ul>
24
+ <% end %>
24
25
 
25
- <% if can? :admin, Spree::Promotion %>
26
- <ul class="nav nav-sidebar">
27
- <%= main_menu_tree Spree.t(:promotions), icon: "gift", sub_menu: "promotion", url: "#sidebar-promotions" %>
28
- </ul>
29
- <% end %>
26
+ <% if can? :admin, Spree::Promotion %>
27
+ <ul class="nav nav-sidebar border-bottom">
28
+ <%= main_menu_tree Spree.t(:promotions), icon: "gift", sub_menu: "promotion", url: "#sidebar-promotions" %>
29
+ </ul>
30
+ <% end %>
30
31
 
31
- <% if Spree.user_class && can?(:admin, Spree.user_class) %>
32
- <ul class="nav nav-sidebar">
33
- <%= tab *Spree::BackendConfiguration::USER_TABS, url: spree.admin_users_path, icon: 'user' %>
34
- </ul>
35
- <% end %>
32
+ <% if Spree.user_class && can?(:admin, Spree.user_class) %>
33
+ <ul class="nav nav-sidebar border-bottom">
34
+ <%= tab *Spree::BackendConfiguration::USER_TABS, url: spree.admin_users_path, icon: 'user' %>
35
+ </ul>
36
+ <% end %>
36
37
 
37
- <% if can? :admin, current_store %>
38
- <ul class="nav nav-sidebar">
39
- <%= main_menu_tree Spree.t(:configurations), icon: "wrench", sub_menu: "configuration", url: "#sidebar-configuration" %>
40
- </ul>
41
- <% end %>
38
+ <% if can? :admin, current_store %>
39
+ <ul class="nav nav-sidebar border-bottom">
40
+ <%= main_menu_tree Spree.t(:configurations), icon: "wrench", sub_menu: "configuration", url: "#sidebar-configuration" %>
41
+ </ul>
42
+ <% end %>
43
+ </nav>
@@ -1,8 +1,7 @@
1
- <div class="panel panel-default">
2
- <div class="panel-heading">
3
- <h3 class="panel-title"><%= Spree.t(:summary) %></h3>
1
+ <div class="card mb-3">
2
+ <div class="card-header">
3
+ <h3 class="card-title mb-0 h5"><%= Spree.t(:summary) %></h3>
4
4
  </div>
5
-
6
5
  <table class="table table-condensed table-bordered" id="order_tab_summary" data-hook>
7
6
  <tbody class="additional-info">
8
7
  <tr>
@@ -10,7 +9,7 @@
10
9
  <strong><%= Spree.t(:status) %>:</strong>
11
10
  </td>
12
11
  <td>
13
- <span class="state label label-<%= @order.state %>">
12
+ <span class="state badge badge-<%= @order.state %>">
14
13
  <%= Spree.t(@order.state, scope: :order_state) %>
15
14
  </span>
16
15
  </td>
@@ -76,7 +75,7 @@
76
75
  <strong><%= Spree.t(:shipment) %>:</strong>
77
76
  </td>
78
77
  <td id='shipment_status'>
79
- <span class="state label label-<%= @order.shipment_state %>">
78
+ <span class="state badge badge-<%= @order.shipment_state %>">
80
79
  <%= Spree.t(@order.shipment_state, scope: :shipment_states, default: [:missing, "none"]) %>
81
80
  </span>
82
81
  </td>
@@ -86,7 +85,7 @@
86
85
  <strong><%= Spree.t(:payment) %>:</strong>
87
86
  </td>
88
87
  <td id='payment_status'>
89
- <span class="state label label-<%= @order.payment_state %>">
88
+ <span class="state badge badge-<%= @order.payment_state %>">
90
89
  <%= Spree.t(@order.payment_state, scope: :payment_states, default: [:missing, "none"]) %>
91
90
  </span>
92
91
  </td>
@@ -4,62 +4,89 @@
4
4
  <% end %>
5
5
 
6
6
  <% content_for :sidebar do %>
7
- <ul class="nav nav-pills nav-stacked" data-hook="admin_order_tabs">
7
+ <ul class="nav flex-column nav-pills" data-hook="admin_order_tabs">
8
8
  <% if ((can? :update, @order) && (@order.shipments.size.zero? || @order.shipments.shipped.size.zero?)) %>
9
- <li<%== ' class="active"' if current == :cart %> data-hook='admin_order_tabs_cart_details'>
10
- <%= link_to_with_icon 'edit', Spree.t(:cart), cart_admin_order_url(@order) %>
9
+ <li data-hook='admin_order_tabs_cart_details'>
10
+ <%= link_to_with_icon 'edit',
11
+ Spree.t(:cart),
12
+ cart_admin_order_url(@order),
13
+ class: "#{'active' if current == :cart} nav-link" %>
11
14
  </li>
12
15
  <% end %>
13
16
 
14
- <% if ((can?(:update, @order) && can?(:display, Spree::Store)) && (@order.shipments.size.zero? || @order.shipments.shipped.size.zero?)) %>
15
- <li<%== ' class="active"' if current == :store %> data-hook='admin_order_tabs_store_details'>
16
- <%= link_to_with_icon 'home', Spree.t(:store), store_admin_order_url(@order) %>
17
+ <% if ((can?(:update, @order) && can?(:read, Spree::Store)) && (@order.shipments.size.zero? || @order.shipments.shipped.size.zero?)) %>
18
+ <li data-hook='admin_order_tabs_store_details'>
19
+ <%= link_to_with_icon 'home',
20
+ Spree.t(:store),
21
+ store_admin_order_url(@order),
22
+ class: "#{'active' if current == :store} nav-link" %>
17
23
  </li>
18
24
  <% end %>
19
25
 
20
26
  <% if can?(:update, @order) && @order.checkout_steps.include?("address") %>
21
- <li<%== ' class="active"' if current == :customer_details %> data-hook='admin_order_tabs_customer_details'>
22
- <%= link_to_with_icon 'user', Spree.t(:customer), spree.admin_order_customer_url(@order) %>
27
+ <li data-hook='admin_order_tabs_customer_details'>
28
+ <%= link_to_with_icon 'user',
29
+ Spree.t(:customer),
30
+ spree.admin_order_customer_url(@order),
31
+ class: "#{'active' if current == :customer_details} nav-link" %>
23
32
  </li>
24
33
  <% end %>
25
34
 
26
35
  <% if can? :update, @order %>
27
- <li<%== ' class="active"' if current == :shipments %> data-hook='admin_order_tabs_shipment_details'>
28
- <%= link_to_with_icon 'road', Spree.t(:shipments), edit_admin_order_url(@order) %>
36
+ <li data-hook='admin_order_tabs_shipment_details'>
37
+ <%= link_to_with_icon 'road',
38
+ Spree.t(:shipments),
39
+ edit_admin_order_url(@order),
40
+ class: "#{'active' if current == :shipments} nav-link" %>
29
41
  </li>
30
42
  <% end %>
31
43
 
32
44
  <% if can? :index, Spree::Adjustment %>
33
- <li<%== ' class="active"' if current == :adjustments %> data-hook='admin_order_tabs_adjustments'>
34
- <%= link_to_with_icon 'wrench', Spree.t(:adjustments), spree.admin_order_adjustments_url(@order) %>
45
+ <li data-hook='admin_order_tabs_adjustments'>
46
+ <%= link_to_with_icon 'wrench',
47
+ Spree.t(:adjustments),
48
+ spree.admin_order_adjustments_url(@order),
49
+ class: "#{'active' if current == :adjustments} nav-link" %>
35
50
  </li>
36
51
  <% end %>
37
52
 
38
53
  <% if can?(:index, Spree::Payment) %>
39
- <li<%== ' class="active"' if current == :payments %> data-hook='admin_order_tabs_payments'>
40
- <%= link_to_with_icon 'credit-card', Spree.t(:payments), spree.admin_order_payments_url(@order) %>
54
+ <li data-hook='admin_order_tabs_payments'>
55
+ <%= link_to_with_icon 'credit-card',
56
+ Spree.t(:payments),
57
+ spree.admin_order_payments_url(@order),
58
+ class: "#{'active' if current == :payments} nav-link" %>
41
59
  </li>
42
60
  <% end %>
43
61
 
44
62
  <% if can? :index, Spree::ReturnAuthorization %>
45
63
  <% if @order.completed? %>
46
- <li<%== ' class="active"' if current == :return_authorizations %> data-hook='admin_order_tabs_return_authorizations'>
47
- <%= link_to_with_icon 'transfer', Spree.t(:return_authorizations), spree.admin_order_return_authorizations_url(@order) %>
64
+ <li data-hook='admin_order_tabs_return_authorizations'>
65
+ <%= link_to_with_icon 'transfer',
66
+ Spree.t(:return_authorizations),
67
+ spree.admin_order_return_authorizations_url(@order),
68
+ class: "#{'active' if current == :return_authorizations} nav-link" %>
48
69
  </li>
49
70
  <% end %>
50
71
  <% end %>
51
72
 
52
73
  <% if can? :index, Spree::CustomerReturn %>
53
74
  <% if @order.completed? %>
54
- <li<%== ' class="active"' if current == :customer_returns %>>
55
- <%= link_to_with_icon 'transfer', Spree.t(:customer_returns), spree.admin_order_customer_returns_url(@order) %>
75
+ <li>
76
+ <%= link_to_with_icon 'transfer',
77
+ Spree.t(:customer_returns),
78
+ spree.admin_order_customer_returns_url(@order),
79
+ class: "#{'active' if current == :customer_returns} nav-link" %>
56
80
  </li>
57
81
  <% end %>
58
82
  <% end %>
59
83
 
60
84
  <% if can? :update, @order %>
61
- <li<%== ' class="active"' if current == :state_changes %> data-hook='admin_order_tabs_state_changes'>
62
- <%= link_to_with_icon 'refresh', Spree::StateChange.human_attribute_name(:state_changes), spree.admin_order_state_changes_url(@order) %>
85
+ <li data-hook='admin_order_tabs_state_changes'>
86
+ <%= link_to_with_icon 'refresh',
87
+ Spree::StateChange.human_attribute_name(:state_changes),
88
+ spree.admin_order_state_changes_url(@order),
89
+ class: "#{'active' if current == :state_changes} nav-link" %>
63
90
  </li>
64
91
  <% end %>
65
92
  </ul>
@@ -4,21 +4,45 @@
4
4
  <% end %>
5
5
 
6
6
  <% content_for :sidebar do %>
7
- <ul class="nav nav-pills nav-stacked" data-hook="admin_product_tabs">
8
- <%= content_tag :li, class: ('active' if current == :details) do %>
9
- <%= link_to_with_icon 'edit', Spree.t(:details), edit_admin_product_url(@product) %>
7
+ <ul class="nav flex-column nav-pills" data-hook="admin_product_tabs">
8
+ <%= content_tag :li do %>
9
+ <%= link_to_with_icon 'edit',
10
+ Spree.t(:details),
11
+ edit_admin_product_url(@product),
12
+ class: "nav-link #{'active' if current == :details}" %>
13
+
10
14
  <% end if can?(:admin, Spree::Product) %>
11
- <%= content_tag :li, class: ('active' if current == :images) do %>
12
- <%= link_to_with_icon 'picture', Spree.t(:images), spree.admin_product_images_url(@product) %>
15
+
16
+ <%= content_tag :li do %>
17
+ <%= link_to_with_icon 'picture',
18
+ Spree.t(:images),
19
+ spree.admin_product_images_url(@product),
20
+ class: "nav-link #{'active' if current == :images}" %>
21
+
13
22
  <% end if can?(:admin, Spree::Image) && !@product.deleted? %>
14
- <%= content_tag :li, class: ('active' if current == :variants) do %>
15
- <%= link_to_with_icon 'th-large', Spree.t(:variants), spree.admin_product_variants_url(@product) %>
23
+
24
+ <%= content_tag :li do %>
25
+ <%= link_to_with_icon 'th-large',
26
+ Spree.t(:variants),
27
+ spree.admin_product_variants_url(@product),
28
+ class: "nav-link #{'active' if current == :variants}" %>
29
+
16
30
  <% end if can?(:admin, Spree::Variant) && !@product.deleted? %>
17
- <%= content_tag :li, class: ('active' if current == :properties) do %>
18
- <%= link_to_with_icon 'list-alt', Spree.t(:properties), spree.admin_product_product_properties_url(@product) %>
31
+
32
+ <%= content_tag :li do %>
33
+ <%= link_to_with_icon 'list-alt',
34
+ Spree.t(:properties),
35
+ spree.admin_product_product_properties_url(@product),
36
+ class: "nav-link #{'active' if current == :properties}" %>
37
+
19
38
  <% end if can?(:admin, Spree::ProductProperty) && !@product.deleted? %>
20
- <%= content_tag :li, class: ('active' if current == :stock) do %>
21
- <%= link_to_with_icon 'home', Spree.t(:stock), stock_admin_product_url(@product) %>
39
+
40
+ <%= content_tag :li do %>
41
+ <%= link_to_with_icon 'home',
42
+ Spree.t(:stock),
43
+ stock_admin_product_url(@product),
44
+ class: "nav-link #{'active' if current == :stock}" %>
45
+
22
46
  <% end if can?(:admin, Spree::StockItem) && !@product.deleted? %>
23
47
  </ul>
24
48
  <% end %>
@@ -23,7 +23,7 @@
23
23
  <td><%= truncate(refund.reason.name, length: 100) %></td>
24
24
  <% if show_actions %>
25
25
  <td class="actions actions-1">
26
- <%= link_to_with_icon('edit', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, class: "btn btn-default btn-sm") if can?(:edit, refund) %>
26
+ <%= link_to_with_icon('edit', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:edit, refund) %>
27
27
  </td>
28
28
  <% end %>
29
29
  </tr>
@@ -1,20 +1,22 @@
1
1
  <% if content_for?(:table_filter) %>
2
2
  <div class="filter-wrap row">
3
- <div class="col-xs-12">
3
+ <div class="col-12">
4
4
  <div class="input-group index-filter-button">
5
5
  <span class="input-group-btn">
6
- <button class="btn btn-default js-show-index-filters" type="button">
6
+ <button class="btn js-show-index-filters" type="button">
7
7
  <span class="icon icon-chevron-right"></span>
8
8
  <%= Spree.t(:filter) %>
9
9
  </button>
10
10
  </span>
11
- <%= form_tag request.fullpath, id: "quick-search" do %>
11
+ <%= form_tag request.fullpath, id: "quick-search", class: 'flex-grow-1' do %>
12
12
  <%= text_field_tag :quick_search, nil, class: "form-control js-quick-search", placeholder: Spree.t(:quick_search) %>
13
13
  <% end %>
14
14
  </div>
15
15
  <% unless defined?(simple) %>
16
- <div id="table-filter" data-hook class="well filter-well">
17
- <%= yield :table_filter %>
16
+ <div id="table-filter" data-hook class="card bg-light filter-well">
17
+ <div class="card-body">
18
+ <%= yield :table_filter %>
19
+ </div>
18
20
  </div>
19
21
  <% end %>
20
22
  </div>