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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/app/assets/javascripts/spree/backend.js +2 -1
- data/app/assets/javascripts/spree/backend/admin.js +75 -66
- data/app/assets/javascripts/spree/backend/calculator.js +3 -3
- data/app/assets/javascripts/spree/backend/gateway.js +1 -1
- data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -24
- data/app/assets/javascripts/spree/backend/promotions.js +4 -4
- data/app/assets/javascripts/spree/backend/shipments.js +32 -33
- data/app/assets/javascripts/spree/backend/taxonomy.js +75 -72
- data/app/assets/stylesheets/spree/backend/components/_badges.scss +46 -0
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +7 -23
- data/app/assets/stylesheets/spree/backend/components/_filters.scss +16 -6
- data/app/assets/stylesheets/spree/backend/components/_main.scss +4 -6
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +21 -0
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +2 -10
- data/app/assets/stylesheets/spree/backend/components/_page_header.scss +0 -23
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +25 -69
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +53 -12
- data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +2 -2
- data/app/assets/stylesheets/spree/backend/global/_variables.scss +10 -13
- data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +33 -20
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +23 -18
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +0 -8
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +5 -38
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -6
- data/app/controllers/spree/admin/customer_returns_controller.rb +2 -2
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +2 -2
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +2 -2
- data/app/controllers/spree/admin/reimbursement_types_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +1 -1
- data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
- data/app/controllers/spree/admin/stores_controller.rb +5 -0
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +2 -2
- data/app/helpers/spree/admin/base_helper.rb +9 -4
- data/app/helpers/spree/admin/customer_returns_helper.rb +1 -1
- data/app/helpers/spree/admin/navigation_helper.rb +41 -25
- data/app/helpers/spree/admin/orders_helper.rb +2 -2
- data/app/views/kaminari/{_first_page.html.erb → twitter-bootstrap-4/_first_page.html.erb} +5 -3
- data/app/views/kaminari/{_gap.html.erb → twitter-bootstrap-4/_gap.html.erb} +5 -1
- data/app/views/kaminari/{_last_page.html.erb → twitter-bootstrap-4/_last_page.html.erb} +5 -3
- data/app/views/kaminari/{_next_page.html.erb → twitter-bootstrap-4/_next_page.html.erb} +5 -7
- data/app/views/kaminari/{_page.html.erb → twitter-bootstrap-4/_page.html.erb} +8 -2
- data/app/views/kaminari/{_paginator.html.erb → twitter-bootstrap-4/_paginator.html.erb} +3 -1
- data/app/views/kaminari/{_prev_page.html.erb → twitter-bootstrap-4/_prev_page.html.erb} +5 -7
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +14 -4
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +6 -6
- data/app/views/spree/admin/adjustments/index.html.erb +7 -5
- data/app/views/spree/admin/countries/_form.html.erb +13 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +2 -2
- data/app/views/spree/admin/general_settings/edit.html.erb +14 -14
- data/app/views/spree/admin/images/_form.html.erb +2 -2
- data/app/views/spree/admin/images/edit.html.erb +6 -6
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/edit.html.erb +5 -5
- data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -5
- data/app/views/spree/admin/orders/_add_product.html.erb +5 -5
- data/app/views/spree/admin/orders/_adjustments.html.erb +4 -3
- data/app/views/spree/admin/orders/_line_items.html.erb +4 -4
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +3 -3
- data/app/views/spree/admin/orders/_shipment.html.erb +5 -5
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +17 -17
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +4 -4
- data/app/views/spree/admin/orders/index.html.erb +56 -33
- data/app/views/spree/admin/payment_methods/_form.html.erb +4 -4
- data/app/views/spree/admin/payments/_list.html.erb +3 -3
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +10 -2
- data/app/views/spree/admin/products/_add_stock_form.html.erb +6 -6
- data/app/views/spree/admin/products/_form.html.erb +26 -31
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +5 -5
- data/app/views/spree/admin/products/new.html.erb +5 -5
- data/app/views/spree/admin/products/stock.html.erb +3 -3
- data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
- data/app/views/spree/admin/promotions/_form.html.erb +7 -7
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +4 -4
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +12 -5
- data/app/views/spree/admin/promotions/_rules.html.erb +5 -5
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +5 -5
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +5 -5
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +3 -3
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +10 -6
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +10 -6
- data/app/views/spree/admin/promotions/edit.html.erb +5 -5
- data/app/views/spree/admin/promotions/index.html.erb +3 -3
- data/app/views/spree/admin/promotions/rules/_country.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +4 -4
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +8 -8
- data/app/views/spree/admin/promotions/rules/_product.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_user.html.erb +2 -2
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +10 -2
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +6 -6
- data/app/views/spree/admin/reports/sales_total.html.erb +4 -2
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/return_index/customer_returns.html.erb +3 -3
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +15 -9
- data/app/views/spree/admin/shared/_account_nav.html.erb +60 -48
- data/app/views/spree/admin/shared/_address_form.html.erb +11 -4
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +4 -4
- data/app/views/spree/admin/shared/_content_header.html.erb +4 -4
- data/app/views/spree/admin/shared/_header.html.erb +18 -21
- data/app/views/spree/admin/shared/_index_table_options.html.erb +4 -5
- data/app/views/spree/admin/shared/_main_menu.html.erb +37 -35
- data/app/views/spree/admin/shared/_order_summary.html.erb +6 -7
- data/app/views/spree/admin/shared/_order_tabs.html.erb +47 -20
- data/app/views/spree/admin/shared/_product_tabs.html.erb +35 -11
- data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
- data/app/views/spree/admin/shared/_table_filter.html.erb +7 -5
- data/app/views/spree/admin/shared/_version.html.erb +4 -2
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -1
- data/app/views/spree/admin/shared/sub_menu/_product.html.erb +1 -1
- data/app/views/spree/admin/shared/sub_menu/_promotion.html.erb +1 -1
- data/app/views/spree/admin/shared/sub_menu/_returns.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +21 -21
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +6 -6
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +34 -32
- data/app/views/spree/admin/stock_transfers/new.html.erb +13 -11
- data/app/views/spree/admin/stores/_form.html.erb +5 -6
- data/app/views/spree/admin/stores/index.html.erb +3 -1
- data/app/views/spree/admin/tax_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +11 -9
- data/app/views/spree/admin/taxons/_form.html.erb +4 -4
- data/app/views/spree/admin/users/_addresses_form.html.erb +10 -10
- data/app/views/spree/admin/users/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +3 -3
- data/app/views/spree/admin/users/_sidebar.html.erb +26 -11
- data/app/views/spree/admin/users/addresses.html.erb +4 -2
- data/app/views/spree/admin/users/edit.html.erb +8 -8
- data/app/views/spree/admin/users/index.html.erb +3 -3
- data/app/views/spree/admin/users/items.html.erb +2 -2
- data/app/views/spree/admin/users/orders.html.erb +2 -2
- data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +2 -2
- data/app/views/spree/admin/variants/_split.js.erb +3 -3
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/app/views/spree/admin/variants/new.html.erb +8 -6
- data/app/views/spree/admin/zones/_country_members.html.erb +4 -4
- data/app/views/spree/admin/zones/_form.html.erb +9 -9
- data/app/views/spree/admin/zones/_state_members.html.erb +4 -4
- data/app/views/spree/admin/zones/index.html.erb +2 -2
- data/app/views/spree/layouts/admin.html.erb +9 -6
- data/lib/spree/backend.rb +3 -2
- data/lib/spree_backend.rb +2 -1
- data/spree_backend.gemspec +3 -2
- metadata +39 -27
- data/app/assets/stylesheets/spree/backend/components/_labels.scss +0 -55
- data/app/assets/stylesheets/spree/backend/components/_panels.scss +0 -3
- data/app/assets/stylesheets/spree/backend/components/_wells.scss +0 -3
- 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
|
61
|
-
|
62
|
-
|
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="
|
1
|
+
<div id="calculator_fields" data-hook class="card mb-3">
|
2
2
|
|
3
|
-
<div class="
|
4
|
-
<h1 class="
|
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="
|
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
|
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-
|
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
|
4
|
-
<div class="
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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-
|
9
|
-
<%= paginate collection %>
|
8
|
+
<div class="col-6">
|
9
|
+
<%= paginate collection, theme: 'twitter-bootstrap-4' %>
|
10
10
|
</div>
|
11
|
-
<div class="col-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
39
|
-
|
40
|
-
|
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="
|
2
|
-
<div class="
|
3
|
-
<h3 class="
|
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
|
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
|
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
|
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
|
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
|
10
|
-
<%= link_to_with_icon 'edit',
|
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?(:
|
15
|
-
<li
|
16
|
-
<%= link_to_with_icon 'home',
|
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
|
22
|
-
<%= link_to_with_icon 'user',
|
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
|
28
|
-
<%= link_to_with_icon 'road',
|
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
|
34
|
-
<%= link_to_with_icon 'wrench',
|
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
|
40
|
-
<%= link_to_with_icon 'credit-card',
|
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
|
47
|
-
<%= link_to_with_icon 'transfer',
|
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
|
55
|
-
<%= link_to_with_icon 'transfer',
|
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
|
62
|
-
<%= link_to_with_icon 'refresh',
|
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
|
8
|
-
<%= content_tag :li
|
9
|
-
<%= link_to_with_icon 'edit',
|
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
|
-
|
12
|
-
|
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
|
-
|
15
|
-
|
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
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
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-
|
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-
|
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
|
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="
|
17
|
-
|
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>
|