spree_backend 4.7.1 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +36 -129
- data/.github/CONTRIBUTING.md +1 -1
- data/.ruby-version +1 -0
- data/Gemfile +4 -3
- data/README.md +5 -38
- data/SECURITY.md +1 -1
- data/app/assets/config/spree_backend_manifest.js +4 -1
- data/app/assets/images/favicon.png +0 -0
- data/app/assets/images/favicon_dark_bg.png +0 -0
- data/app/assets/images/logo_dark.png +0 -0
- data/app/assets/images/logo_light.png +0 -0
- data/app/assets/images/spark_solutions_logo.png +0 -0
- data/app/assets/images/vendo_logo.png +0 -0
- data/app/assets/javascripts/spree/backend/global/_index.js +1 -0
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +2 -2
- data/app/assets/javascripts/spree/backend/global/tooltips.es6 +21 -0
- data/app/assets/javascripts/spree/backend.js +3 -0
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +0 -4
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +4 -7
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +0 -1
- data/app/assets/stylesheets/spree/backend/global/_variables.scss +16 -2
- data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +0 -2
- data/app/helpers/spree/admin/base_helper.rb +8 -0
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/helpers/spree/admin/stores_helper.rb +3 -3
- data/app/javascript/spree/backend/application.js +5 -0
- data/app/javascript/spree/{dashboard → backend}/controllers/clipboard_controller.js +0 -1
- data/app/javascript/spree/backend/controllers/index.js +11 -0
- data/app/javascript/spree/{dashboard → backend}/controllers/sortable_tree_controller.js +1 -1
- data/app/javascript/spree/backend/helpers/index.js +1 -0
- data/app/javascript/spree/{dashboard/utilities → backend/helpers}/request_utility.js +1 -1
- data/app/models/spree/admin/actions/action.rb +1 -1
- data/app/models/spree/admin/updater.rb +35 -0
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
- data/app/views/spree/admin/cms_pages/_form.html.erb +3 -3
- data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +1 -1
- data/app/views/spree/admin/cms_pages/index.html.erb +1 -1
- data/app/views/spree/admin/countries/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/dashboard/_getting_started.html.erb +18 -18
- data/app/views/spree/admin/data_feeds/index.html.erb +1 -1
- data/app/views/spree/admin/images/index.html.erb +1 -1
- data/app/views/spree/admin/menus/edit.html.erb +1 -1
- data/app/views/spree/admin/menus/index.html.erb +1 -1
- data/app/views/spree/admin/oauth_applications/index.html.erb +3 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/spree/admin/option_types/edit.html.erb +1 -1
- data/app/views/spree/admin/option_types/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_line_items.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment.html.erb +14 -12
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/_form.html.erb +15 -2
- data/app/views/spree/admin/payment_methods/index.html.erb +2 -2
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +3 -3
- data/app/views/spree/admin/products/_autocomplete.js.erb +1 -1
- data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/index.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +1 -1
- data/app/views/spree/admin/properties/index.html.erb +1 -1
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/prototypes/index.html.erb +1 -1
- data/app/views/spree/admin/reimbursement_types/index.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/roles/index.html.erb +1 -1
- data/app/views/spree/admin/shared/_account_nav.html.erb +31 -17
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +7 -1
- data/app/views/spree/admin/shared/_header.html.erb +27 -19
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -11
- data/app/views/spree/admin/shared/_product_tabs.html.erb +1 -11
- data/app/views/spree/admin/shared/_store_switcher.html.erb +5 -5
- data/app/views/spree/admin/shared/_tabs.html.erb +11 -0
- data/app/views/spree/admin/shared/_version.html.erb +20 -7
- data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/show.html.erb +1 -1
- data/app/views/spree/admin/store_credit_categories/index.html.erb +1 -1
- data/app/views/spree/admin/stores/edit.html.erb +1 -1
- data/app/views/spree/admin/stores/index.html.erb +1 -1
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/_list.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/users/_tabs.html.erb +1 -11
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_split.js.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +12 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/app/views/spree/layouts/admin.html.erb +1 -1
- data/config/importmap.rb +9 -0
- data/config/locales/en.yml +4 -1
- data/lib/generators/spree/backend/install/install_generator.rb +0 -2
- data/lib/spree/backend/configuration.rb +0 -2
- data/lib/spree/backend/engine.rb +13 -0
- data/lib/spree/backend/runtime_configuration.rb +8 -0
- data/lib/spree/backend/version.rb +1 -1
- data/lib/spree/backend.rb +4 -2
- data/lib/spree_backend.rb +2 -2
- data/license.md +8 -3
- data/spree_backend.gemspec +6 -4
- metadata +70 -28
- data/app/assets/images/admin/logo.png +0 -0
- data/app/javascript/spree/dashboard/index.js +0 -54
- data/app/javascript/spree/dashboard/utilities/bootstrap.js +0 -17
- data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +0 -6
- data/package.json +0 -46
- data/rollup.config.js +0 -43
- data/yarn.lock +0 -1012
- /data/app/javascript/spree/{dashboard → backend}/controllers/password_toggle_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/product_edit_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/spree_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/upload_button_controller.js +0 -0
- /data/app/javascript/spree/{dashboard → backend}/controllers/webhooks_subscriber_events_controller.js +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<% content_for :page_actions do %>
|
4
4
|
<% if @order.shipments.any?(&:shipped?) && can?(:create, Spree::ReturnAuthorization) %>
|
5
|
-
<%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), class: "btn-
|
5
|
+
<%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), class: "btn-primary", icon: 'add.svg' %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
8
8
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_role), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_role), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_role_link' %>
|
7
7
|
<% end if can? :create, Spree::Role %>
|
8
8
|
|
9
9
|
<% if @roles.any? %>
|
@@ -7,53 +7,67 @@
|
|
7
7
|
|
8
8
|
<div class="dropdown-menu dropdown-menu-right overflow-hidden mt-2 p-0 mr-2">
|
9
9
|
<div class="dropdown-item px-0 text-center bg-light">
|
10
|
-
<span class="d-block
|
10
|
+
<span class="d-block"><%= try_spree_current_user.try(:email) %></span>
|
11
11
|
</div>
|
12
12
|
<div class="dropdown-divider m-0"></div>
|
13
13
|
|
14
14
|
<% if spree.respond_to? :root_path %>
|
15
|
-
<%= link_to spree.root_path, target: :blank, class: 'd-block
|
16
|
-
<%= svg_icon name: "store.svg", width: '
|
15
|
+
<%= link_to spree.root_path, target: :blank, class: 'd-block my-1 dropdown-item', data: { turbo: false } do %>
|
16
|
+
<%= svg_icon name: "store.svg", width: '14', height: '14' %>
|
17
17
|
|
18
18
|
<%= Spree.t(:back_to_store) %>
|
19
19
|
<% end %>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<% if can?(:manage, try_spree_current_user) %>
|
23
|
-
<%= link_to spree.edit_admin_user_path(try_spree_current_user), class: 'd-block
|
24
|
-
<%= svg_icon name: "user.svg", width: '
|
22
|
+
<% if can?(:manage, try_spree_current_user) && try_spree_current_user.persisted? %>
|
23
|
+
<%= link_to spree.edit_admin_user_path(try_spree_current_user), class: 'd-block my-1 dropdown-item' do %>
|
24
|
+
<%= svg_icon name: "user.svg", width: '14', height: '14' %>
|
25
25
|
|
26
26
|
<%= Spree.t(:account) %>
|
27
27
|
<% end %>
|
28
28
|
<% end %>
|
29
29
|
|
30
30
|
<% if admin_logout_link %>
|
31
|
-
<%= link_to admin_logout_link, class: 'd-block
|
32
|
-
<%= svg_icon name: "exit.svg", width: '
|
31
|
+
<%= link_to admin_logout_link, class: 'd-block my-1 dropdown-item' do %>
|
32
|
+
<%= svg_icon name: "exit.svg", width: '14', height: '14' %>
|
33
33
|
|
34
34
|
<%= Spree.t(:logout) %>
|
35
35
|
<% end %>
|
36
36
|
<% end %>
|
37
37
|
|
38
|
-
<div class="dropdown-divider
|
38
|
+
<div class="dropdown-divider"></div>
|
39
|
+
|
40
|
+
<%= link_to 'http://docs.spreecommerce.org', target: :blank, class: 'd-block my-1 dropdown-item' do %>
|
41
|
+
<%= svg_icon name: "book.svg", width: '14', height: '14' %>
|
42
|
+
|
43
|
+
<%= Spree.t(:documentation) %>
|
44
|
+
<% end %>
|
39
45
|
|
40
|
-
<%= link_to 'http://spreecommerce.org/contact', target: :blank, class: 'd-block
|
41
|
-
<%= svg_icon name: "
|
46
|
+
<%= link_to 'http://spreecommerce.org/contact', target: :blank, class: 'd-block my-1 dropdown-item' do %>
|
47
|
+
<%= svg_icon name: "chat-dots.svg", width: '14', height: '14' %>
|
42
48
|
|
43
|
-
<%= Spree.t(:
|
49
|
+
<%= Spree.t(:enterprise_support) %>
|
44
50
|
<% end %>
|
45
51
|
|
46
|
-
<%= link_to 'http://slack.spreecommerce.org', target: :blank, class: 'd-block
|
47
|
-
<%= svg_icon name: "slack.svg", width: '
|
52
|
+
<%= link_to 'http://slack.spreecommerce.org', target: :blank, class: 'd-block my-1 dropdown-item' do %>
|
53
|
+
<%= svg_icon name: "slack.svg", width: '14', height: '14' %>
|
48
54
|
|
49
55
|
<%= Spree.t(:join_slack) %>
|
50
56
|
<% end %>
|
51
57
|
|
52
|
-
<%= link_to 'https://
|
53
|
-
<%= svg_icon name: "extensions.svg", width: '
|
58
|
+
<%= link_to 'https://docs.spreecommerce.org/developer/extending-spree/3rd-party-extensions', target: :blank, class: 'd-block my-1 dropdown-item' do %>
|
59
|
+
<%= svg_icon name: "extensions.svg", width: '14', height: '14' %>
|
54
60
|
|
55
|
-
<%= Spree.t(:
|
61
|
+
<%= Spree.t(:extensions) %>
|
56
62
|
<% end %>
|
63
|
+
|
64
|
+
<div class="dropdown-divider"></div>
|
65
|
+
|
66
|
+
<div class="dropdown-header">
|
67
|
+
Developed by
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<%= link_to image_tag('vendo_logo.png', height: 24), 'https://getvendo.com?utm_source=spree-admin', target: :blank, class: 'dropdown-item mb-2 with-tip', title: 'Vendo - The fastest way to build your own e-commerce business', data: { toggle: 'tooltip', placement: 'left' } %>
|
57
71
|
</div>
|
58
72
|
</div>
|
59
73
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="form-actions" data-hook="buttons">
|
2
|
-
<%= button Spree.t('actions.update'), 'save.svg', 'submit', {class: 'btn-
|
2
|
+
<%= button Spree.t('actions.update'), 'save.svg', 'submit', {class: 'btn-primary', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
|
3
3
|
<span class="or"><%= Spree.t(:or) %></span>
|
4
4
|
<%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'cancel.svg' %>
|
5
5
|
</div>
|
@@ -13,6 +13,12 @@
|
|
13
13
|
<% end %>
|
14
14
|
</title>
|
15
15
|
|
16
|
+
<%= favicon_link_tag asset_path('favicon.png') %>
|
17
|
+
|
18
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
19
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
20
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
21
|
+
|
16
22
|
<%= stylesheet_link_tag 'spree/backend/all', media: :all %>
|
17
23
|
|
18
24
|
<script>
|
@@ -22,7 +28,7 @@
|
|
22
28
|
</script>
|
23
29
|
|
24
30
|
<%= render 'spree/admin/shared/paths' %>
|
25
|
-
<%=
|
31
|
+
<%= javascript_importmap_tags 'application-spree-backend' %>
|
26
32
|
<%= javascript_include_tag 'spree/backend/all', data: { turbo_track: "reload" } %>
|
27
33
|
<%= render "spree/admin/shared/translations" %>
|
28
34
|
|
@@ -1,22 +1,30 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<% if try_spree_current_user %>
|
2
|
+
<header class="header logged-in" id="header-logged-in" data-turbo-permanent>
|
3
|
+
<nav class="navbar fixed-top navbar-dark flex-nowrap bg-primary p-0">
|
4
|
+
<div class="col p-0 d-lg-none">
|
5
|
+
<button
|
6
|
+
id="sidebar-open"
|
7
|
+
class="navbar-toggler h-100 text-light px-3"
|
8
|
+
type="button"
|
9
|
+
aria-expanded="false"
|
10
|
+
aria-label="Toggle navigation">
|
11
|
+
<%= svg_icon name: "menu.svg", width: '20', height: '20' %>
|
12
|
+
</button>
|
13
|
+
</div>
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
<div id="storeSwitcherDropdown" class="col-auto text-center text-lg-left px-0 px-lg-2 align-items-center dropdown">
|
16
|
+
<%= render partial: 'spree/admin/shared/store_switcher' %>
|
17
|
+
</div>
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
<div class="col text-right p-0">
|
20
|
+
<%= render partial: 'spree/admin/shared/account_nav' %>
|
21
|
+
</div>
|
22
|
+
</nav>
|
23
|
+
</header>
|
24
|
+
<% else %>
|
25
|
+
<header class="header">
|
26
|
+
<div class="text-center">
|
27
|
+
<%= image_tag 'logo_light.png', height: 48 %>
|
20
28
|
</div>
|
21
|
-
</
|
22
|
-
|
29
|
+
</header>
|
30
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="form-actions" data-hook="buttons">
|
2
|
-
<%= button Spree.t('actions.create'), 'save.svg', 'submit', {class: 'btn-
|
2
|
+
<%= button Spree.t('actions.create'), 'save.svg', 'submit', {class: 'btn-primary', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
|
3
3
|
<span class="or"><%= Spree.t(:or) %></span>
|
4
4
|
<%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'cancel.svg', data: { turbo: false } %>
|
5
5
|
</div>
|
@@ -4,15 +4,5 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% content_for :page_tabs do %>
|
7
|
-
|
8
|
-
<% next unless tab.available?(current_ability, @order) %>
|
9
|
-
<%= content_tag :li, class: 'nav-item', data: { hook: tab.data_hook } do %>
|
10
|
-
<%= link_to_with_icon(
|
11
|
-
tab.icon_key,
|
12
|
-
Spree.t(tab.label_translation_key),
|
13
|
-
tab.url(@order),
|
14
|
-
class: tab.active?(current) ? 'active nav-link' : 'nav-link'
|
15
|
-
) %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
7
|
+
<%= render partial: 'spree/admin/shared/tabs', locals: { tabs: order_tabs, object: @order, current: current } %>
|
18
8
|
<% end %>
|
@@ -4,15 +4,5 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% content_for :page_tabs do %>
|
7
|
-
|
8
|
-
<% next unless tab.available?(current_ability, @product) %>
|
9
|
-
<li class="nav-item">
|
10
|
-
<%= link_to_with_icon(
|
11
|
-
tab.icon_key,
|
12
|
-
Spree.t(tab.label_translation_key),
|
13
|
-
tab.url(@product),
|
14
|
-
class: tab.active?(current) ? 'active nav-link' : 'nav-link'
|
15
|
-
) %>
|
16
|
-
</li>
|
17
|
-
<% end %>
|
7
|
+
<%= render partial: 'spree/admin/shared/tabs', locals: { tabs: product_tabs, object: @product, current: current } %>
|
18
8
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% if can?(:admin, current_store) %>
|
2
2
|
<span class="d-none d-lg-inline text-light pl-1 pr-2">
|
3
|
-
<%=
|
3
|
+
<%= image_tag('favicon_dark_bg.png', alt: 'Spree Commerce', height: 28) %>
|
4
4
|
</span>
|
5
5
|
|
6
6
|
<a class="px-0 py-1 btn text-light" id="storeSelectorDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
7
|
-
<span class="d-sm-none"><%= svg_icon name: "store.svg", width: '
|
7
|
+
<span class="d-sm-none"><%= svg_icon name: "store.svg", width: '14', height: '14' %></span>
|
8
8
|
<span class="d-none d-sm-inline"><%= current_store.name %></span> (<%= current_store.code %>) <%= svg_icon name: "chevron-down.svg", width: '12', height: '12', classes: 'ml-1 mb-0' %>
|
9
9
|
</a>
|
10
10
|
|
@@ -14,9 +14,9 @@
|
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<% if can?(:create, Spree::Store) %>
|
17
|
-
<div class="dropdown-divider
|
18
|
-
<%= link_to spree.new_admin_store_path, class: '
|
19
|
-
<%= svg_icon name: "plus-circle", width: '
|
17
|
+
<div class="dropdown-divider"></div>
|
18
|
+
<%= link_to spree.new_admin_store_path, class: 'dropdown-item', id: 'addNewStoreLink' do %>
|
19
|
+
<%= svg_icon name: "plus-circle", width: '14', height: '14' %> <%= Spree.t(:add_new_store) %>
|
20
20
|
<% end %>
|
21
21
|
<% end %>
|
22
22
|
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% tabs.items.each do |tab| %>
|
2
|
+
<% next unless tab.available?(current_ability, object) %>
|
3
|
+
<%= content_tag :li, class: 'nav-item', data: { hook: tab.data_hook } do %>
|
4
|
+
<%= link_to_with_icon(
|
5
|
+
tab.icon_key,
|
6
|
+
Spree.t(tab.label_translation_key),
|
7
|
+
tab.url(object),
|
8
|
+
class: tab.active?(current) ? 'active nav-link' : 'nav-link'
|
9
|
+
) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
@@ -1,9 +1,22 @@
|
|
1
|
-
<% if
|
2
|
-
<
|
3
|
-
class="spree-version
|
1
|
+
<% if spree_admin_show_version? %>
|
2
|
+
<div
|
3
|
+
class="spree-version px-3 py-2"
|
4
4
|
aria-label="Spree Commerce version">
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
<div class="d-flex align-items-center justify-content-between">
|
6
|
+
<span class="text-muted small">
|
7
|
+
<%= link_to Spree.version, "https://github.com/spree/spree/releases/tag/v#{Spree.version}", target: '_blank' %>
|
8
|
+
</span>
|
9
|
+
<% if spree_update_available? %>
|
10
|
+
<span class="small text-info">
|
11
|
+
<%= Spree.t(:update_available) %>!
|
12
|
+
</span>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<% if spree_update_available? %>
|
17
|
+
<a href="https://docs.spreecommerce.org/developer/upgrades" target="_blank" class="mt-2 btn btn-sm btn-primary with-tip btn-block" title="Update your Spree instance to the latest version">
|
18
|
+
<%= Spree.t(:update_spree) %>
|
19
|
+
</a>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
9
22
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to new_button_text, new_object_url, { icon: 'add.svg', id: 'admin_new_named_type', class: "btn-
|
6
|
+
<%= button_link_to new_button_text, new_object_url, { icon: 'add.svg', id: 'admin_new_named_type', class: "btn-primary" } %>
|
7
7
|
<% end if can? :create, resource %>
|
8
8
|
|
9
9
|
<% if @collection.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_shipping_category), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_shipping_category), new_object_url, class: "btn-primary", icon: 'add.svg' %>
|
7
7
|
<% end if can? :create, Spree::ShippingCategory %>
|
8
8
|
|
9
9
|
<% if @shipping_categories.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_shipping_method), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_shipping_method), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_shipping_method_link' %>
|
7
7
|
<% end if can? :create, Spree::ShippingMethod %>
|
8
8
|
|
9
9
|
<% if @shipping_methods.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_state), new_admin_country_state_url(@country), { class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_state), new_admin_country_state_url(@country), { class: "btn-primary", icon: 'add.svg', id: 'new_state_link' } %>
|
7
7
|
<% end if can? :create, Spree::State %>
|
8
8
|
|
9
9
|
<div data-hook="country" class="form-group">
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_stock_location), new_object_url, { class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_stock_location), new_object_url, { class: "btn-primary", icon: 'add.svg', id: 'admin_new_stock_location' } %>
|
7
7
|
<% end if can? :create, Spree::StockLocation %>
|
8
8
|
|
9
9
|
<% if @stock_locations.any? %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% content_for :page_actions do %>
|
7
|
-
<%= button_link_to Spree.t(:new_stock_movement), new_admin_stock_location_stock_movement_path(@stock_location), icon: 'add.svg', class: 'btn-
|
7
|
+
<%= button_link_to Spree.t(:new_stock_movement), new_admin_stock_location_stock_movement_path(@stock_location), icon: 'add.svg', class: 'btn-primary', id: 'admin_new_stock_movement_link' %>
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% if @stock_movements.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { icon: 'add.svg', class: 'btn-
|
6
|
+
<%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { icon: 'add.svg', class: 'btn-primary' } %>
|
7
7
|
<% end if can? :create, Spree::StockTransfer %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% content_for :page_actions do %>
|
7
|
-
<%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { icon: 'add', class: 'btn-
|
7
|
+
<%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { icon: 'add', class: 'btn-primary' } %>
|
8
8
|
<% end if can? :create, Spree::StockTransfer %>
|
9
9
|
|
10
10
|
<fieldset>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_store_credit_category), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_store_credit_category), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_store_credit_category_link' %>
|
7
7
|
<% end if can? :create, Spree::StoreCreditCategory %>
|
8
8
|
|
9
9
|
<% if @store_credit_categories.any? %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<fieldset>
|
10
10
|
<%= render partial: 'form', locals: { f: f } %>
|
11
11
|
<div class="form-actions" data-hook="buttons">
|
12
|
-
<%= button Spree.t('actions.update'), 'save.svg', 'submit', {class: 'btn-
|
12
|
+
<%= button Spree.t('actions.update'), 'save.svg', 'submit', {class: 'btn-primary', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
|
13
13
|
|
14
14
|
<%= link_to_with_icon 'delete.svg', Spree.t(:delete), spree.admin_store_url(@store), { class: 'btn btn-danger float-right', data: { confirm: Spree.t(:are_you_sure), method: :delete } } if can?(:delete, @store) && @store.can_be_deleted? %>
|
15
15
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:add_store), spree.new_admin_store_path(@user), class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:add_store), spree.new_admin_store_path(@user), class: "btn-primary", icon: 'add.svg' if can?(:create, Spree::Store) %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% if @stores.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_tax_category), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_tax_category), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_tax_categories_link' %>
|
7
7
|
<% end if can? :create, Spree::TaxCategory %>
|
8
8
|
|
9
9
|
<% if @tax_categories.any? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_tax_rate), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_tax_rate), new_object_url, class: "btn-primary", icon: 'add.svg' %>
|
7
7
|
<% end if can? :create, Spree::TaxRate %>
|
8
8
|
|
9
9
|
<% if @tax_rates.any? %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% @taxonomies.each do |taxonomy| %>
|
12
12
|
<tr id="<%= spree_dom_id taxonomy %>" data-hook="taxonomies_row">
|
13
13
|
<td class="move-handle">
|
14
|
-
<%= svg_icon name: "grip-vertical.svg", width: '
|
14
|
+
<%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
|
15
15
|
</td>
|
16
16
|
<td><%= taxonomy.name %></td>
|
17
17
|
<td class="actions">
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= button_link_to Spree.t('admin.taxonomies.edit_root_taxonomy', name: @taxonomy.root.name ), spree.edit_admin_taxonomy_taxon_path(@taxonomy, @taxonomy.root.id), icon: 'edit.svg', class: 'no-wrap btn-light align-self-center' %>
|
14
14
|
</div>
|
15
15
|
<div class="col d-flex my-1 justify-content-end">
|
16
|
-
<%= button_link_to Spree.t('admin.taxonomies.add_new_taxon'), spree.new_admin_taxonomy_taxon_path(@taxonomy.id), icon: 'add.svg', class: 'no-wrap btn btn-
|
16
|
+
<%= button_link_to Spree.t('admin.taxonomies.add_new_taxon'), spree.new_admin_taxonomy_taxon_path(@taxonomy.id), icon: 'add.svg', class: 'no-wrap btn btn-primary align-self-center' %>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
19
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_taxonomy), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_taxonomy), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_taxonomy_link' %>
|
7
7
|
<% end if can?(:create, Spree::Taxonomy) %>
|
8
8
|
|
9
9
|
<% if @taxonomies.any? %>
|
@@ -4,15 +4,5 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% content_for :page_tabs do %>
|
7
|
-
|
8
|
-
<% next unless tab.available?(current_ability, @user) %>
|
9
|
-
<li class="nav-item">
|
10
|
-
<%= link_to_with_icon(
|
11
|
-
tab.icon_key,
|
12
|
-
Spree.t(tab.label_translation_key),
|
13
|
-
tab.url(@user),
|
14
|
-
class: tab.active?(current) ? 'active nav-link' : 'nav-link'
|
15
|
-
) %>
|
16
|
-
</li>
|
17
|
-
<% end %>
|
7
|
+
<%= render partial: 'spree/admin/shared/tabs', locals: { tabs: user_tabs, object: @user, current: current } %>
|
18
8
|
<% end %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</td>
|
24
24
|
<td class="actions">
|
25
25
|
<span class="d-flex justify-content-center">
|
26
|
-
<button class="btn btn-sm btn-
|
26
|
+
<button class="btn btn-sm btn-primary add_variant with-tip icon-add icon-link" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
27
27
|
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
28
28
|
</button>
|
29
29
|
</span>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
</td>
|
40
40
|
<td class="actions">
|
41
41
|
<span class="d-flex justify-content-center">
|
42
|
-
<button class="btn btn-sm btn-
|
42
|
+
<button class="btn btn-sm btn-primary add_variant with-tip icon-add icon-link" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
43
43
|
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
44
44
|
</button>
|
45
45
|
</span>
|
@@ -57,7 +57,7 @@
|
|
57
57
|
</td>
|
58
58
|
<td class="actions">
|
59
59
|
<span class="d-flex justify-content-center">
|
60
|
-
<button class="btn btn-sm btn-
|
60
|
+
<button class="btn btn-sm btn-primary add_variant with-tip icon-add icon-link" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
61
61
|
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
62
62
|
</button>
|
63
63
|
</span>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</td>
|
20
20
|
<td class="actions">
|
21
21
|
<span class="d-flex justify-content-center">
|
22
|
-
<button class="btn btn-sm btn-
|
22
|
+
<button class="btn btn-sm btn-primary add_variant with-tip" data-stock-location-id="{{this.stock_location.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
23
23
|
<%= svg_icon name: "add", width: '16', height: '16' %>
|
24
24
|
</button>
|
25
25
|
</span>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</td>
|
36
36
|
<td class="actions">
|
37
37
|
<span class="d-flex justify-content-center">
|
38
|
-
<button class="btn btn-sm btn-
|
38
|
+
<button class="btn btn-sm btn-primary add_variant with-tip icon-link" data-stock-location-id="{{this.stock_location.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
39
39
|
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
40
40
|
</button>
|
41
41
|
</span>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<a href='#' class='cancel-split with-tip btn btn-sm btn-light' title='Cancel'>
|
27
27
|
<%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
|
28
28
|
</a>
|
29
|
-
<a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-
|
29
|
+
<a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-primary' title='Save'>
|
30
30
|
<%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
|
31
31
|
</a>
|
32
32
|
</span>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<tr id="<%= spree_dom_id variant %>" <%= 'style="color:red;"' if variant.deleted? %> data-hook="variants_row">
|
21
21
|
<td class="move-handle">
|
22
22
|
<% if can? :edit, variant %>
|
23
|
-
<%= svg_icon name: "grip-vertical.svg", width: '
|
23
|
+
<%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
|
24
24
|
<% end %>
|
25
25
|
</td>
|
26
26
|
<td><%= variant.sku %></td>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t('admin.webhooks_subscribers.new_webhooks_subscriber'), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t('admin.webhooks_subscribers.new_webhooks_subscriber'), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_webhooks_subscriber_link' %>
|
7
7
|
<% end if can?(:create, Spree::Webhooks::Subscriber) %>
|
8
8
|
|
9
9
|
<% if @webhooks_subscribers.any? %>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
<% if defined?(Spree::Vendor) && can?(:manage, Spree::Vendor) && !current_spree_vendor %>
|
16
16
|
<th><%= Spree.t(:vendor) %></th>
|
17
17
|
<% end %>
|
18
|
+
<th><%= Spree.t('admin.webhooks_subscribers.secret_key') %></th>
|
18
19
|
<th><%= Spree.t('admin.active') %></th>
|
19
20
|
<th><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></th>
|
20
21
|
<th><%= Spree.t('admin.webhooks_subscribers.time_of_last_event') %></th>
|
@@ -31,6 +32,16 @@
|
|
31
32
|
<%= link_to webhooks_subscriber.vendor.name, spree.admin_vendor_path(webhooks_subscriber.vendor) if webhooks_subscriber.vendor.present? %>
|
32
33
|
</td>
|
33
34
|
<% end %>
|
35
|
+
<td>
|
36
|
+
<div class="input-group" data-controller="password-toggle">
|
37
|
+
<%= password_field_tag :password, webhooks_subscriber.secret_key, class: 'form-control unhide text-muted border-0 shadow-none bg-transparent', data: { password_toggle_target: 'unhide' }, readonly: true %>
|
38
|
+
<div class="input-group-append">
|
39
|
+
<%= button_tag class: 'btn btn-link rounded', data: { action: 'click->password-toggle#password' } do %>
|
40
|
+
<%= svg_icon name: "view.svg", width: '14', height: '14' %>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
</td>
|
34
45
|
<td><%= active_badge(webhooks_subscriber.active) %></td>
|
35
46
|
<td><%= webhooks_subscriber.subscriptions&.sort&.join(', ') %></td>
|
36
47
|
<td><%= webhooks_subscriber.events.order(:created_at).last&.created_at %></td>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_zone), new_object_url, class: "btn-
|
6
|
+
<%= button_link_to Spree.t(:new_zone), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_zone_link' %>
|
7
7
|
<% end if can? :create, Spree::Zone %>
|
8
8
|
|
9
9
|
<% if @zones.any? %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<%# Sidebar %>
|
24
24
|
<%#-------------------------------------------------%>
|
25
25
|
<aside
|
26
|
-
class="col-12 col-lg-3 col-xl-2 sidebar position-fixed d-flex justify-content-between flex-column px-0"
|
26
|
+
class="col-12 col-lg-3 col-xl-2 sidebar position-fixed d-flex justify-content-between flex-column px-0 bg-light"
|
27
27
|
id="main-sidebar"
|
28
28
|
data-hook="admin_tabs">
|
29
29
|
<%= render partial: 'spree/admin/shared/main_menu' %>
|