spree_admin 5.2.0.rc3 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/spree/admin/application.scss +1 -1
- data/app/assets/stylesheets/spree/admin/components/_dropdowns.scss +2 -0
- data/app/assets/stylesheets/spree/admin/components/_main.scss +2 -233
- data/app/assets/stylesheets/spree/admin/components/_sidebar.scss +693 -0
- data/app/assets/stylesheets/spree/admin/global/_variables.scss +1 -0
- data/app/assets/stylesheets/spree/admin/shared/_base.scss +7 -1
- data/app/assets/stylesheets/spree/admin/views/_dashboard.scss +14 -0
- data/app/controllers/spree/admin/integrations_controller.rb +1 -1
- data/app/controllers/spree/admin/metafields_controller.rb +1 -1
- data/app/controllers/spree/admin/page_blocks_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/translations_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +1 -1
- data/app/helpers/spree/admin/drawer_helper.rb +6 -6
- data/app/helpers/spree/admin/dropdown_helper.rb +10 -2
- data/app/helpers/spree/admin/modal_helper.rb +2 -0
- data/app/helpers/spree/admin/navigation_helper.rb +46 -3
- data/app/helpers/spree/admin/orders_filters_helper.rb +1 -0
- data/app/helpers/spree/admin/promotion_actions_helper.rb +1 -1
- data/app/helpers/spree/admin/promotion_rules_helper.rb +1 -1
- data/app/helpers/spree/admin/translations_helper.rb +1 -1
- data/app/javascript/spree/admin/application.js +2 -1
- data/app/javascript/spree/admin/controllers/dropdown_controller.js +85 -14
- data/app/javascript/spree/admin/controllers/sidebar_controller.js +231 -0
- data/app/javascript/spree/admin/controllers/tooltip_controller.js +84 -31
- data/app/models/spree/admin/form_builder.rb +74 -16
- data/app/models/spree/admin/navigation/builder.rb +82 -0
- data/app/models/spree/admin/navigation/item.rb +177 -0
- data/app/models/spree/admin/navigation.rb +193 -0
- data/app/views/layouts/spree/admin.html.erb +1 -1
- data/app/views/spree/admin/assets/edit.html.erb +1 -1
- data/app/views/spree/admin/custom_domains/_form.html.erb +2 -14
- data/app/views/spree/admin/gift_cards/_filters.html.erb +26 -18
- data/app/views/spree/admin/gift_cards/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_customer.html.erb +2 -2
- data/app/views/spree/admin/orders/_filters.html.erb +34 -25
- data/app/views/spree/admin/orders/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/page_blocks/forms/_image.html.erb +2 -5
- data/app/views/spree/admin/page_links/_form.html.erb +4 -13
- data/app/views/spree/admin/page_sections/forms/_header.html.erb +0 -2
- data/app/views/spree/admin/payments/_payment.html.erb +7 -0
- data/app/views/spree/admin/posts/_form.html.erb +1 -4
- data/app/views/spree/admin/posts/filters.html.erb +18 -8
- data/app/views/spree/admin/products/_bulk_operations.html.erb +1 -1
- data/app/views/spree/admin/products/_filters.html.erb +17 -6
- data/app/views/spree/admin/products/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/profile/edit.html.erb +9 -61
- data/app/views/spree/admin/promotions/_filters.html.erb +23 -13
- data/app/views/spree/admin/promotions/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/promotions/form/_settings.html.erb +2 -13
- data/app/views/spree/admin/refunds/_form.html.erb +1 -9
- data/app/views/spree/admin/return_authorizations/filters.html.erb +1 -1
- data/app/views/spree/admin/shared/_audit_nav.html.erb +2 -0
- data/app/views/spree/admin/shared/_calendar_range_picker.html.erb +2 -2
- data/app/views/spree/admin/shared/_content_header.html.erb +1 -1
- data/app/views/spree/admin/shared/_developers_nav.html.erb +2 -4
- data/app/views/spree/admin/shared/_header.html.erb +5 -7
- data/app/views/spree/admin/shared/_navigation.html.erb +5 -0
- data/app/views/spree/admin/shared/_navigation_item.html.erb +64 -0
- data/app/views/spree/admin/shared/_new_item_dropdown.html.erb +1 -1
- data/app/views/spree/admin/shared/_page_section_image.html.erb +2 -5
- data/app/views/spree/admin/shared/_page_section_logo.html.erb +1 -1
- data/app/views/spree/admin/shared/_returns_and_refunds_nav.html.erb +2 -3
- data/app/views/spree/admin/shared/_shipping_nav.html.erb +3 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +33 -7
- data/app/views/spree/admin/shared/_stock_nav.html.erb +6 -3
- data/app/views/spree/admin/shared/_tax_nav.html.erb +1 -2
- data/app/views/spree/admin/shared/_team_nav.html.erb +2 -3
- data/app/views/spree/admin/shared/_user_dropdown.html.erb +26 -17
- data/app/views/spree/admin/shared/sidebar/_customers_nav.html.erb +7 -0
- data/app/views/spree/admin/shared/sidebar/_orders_nav.html.erb +22 -2
- data/app/views/spree/admin/shared/sidebar/_products_nav.html.erb +21 -0
- data/app/views/spree/admin/shared/sidebar/_promotions_nav.html.erb +8 -0
- data/app/views/spree/admin/shared/sidebar/_returns_nav.html.erb +12 -0
- data/app/views/spree/admin/shared/sidebar/_store_dropdown.html.erb +3 -1
- data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +15 -1
- data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +25 -3
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +1 -1
- data/app/views/spree/admin/stock_items/_filters.html.erb +18 -8
- data/app/views/spree/admin/stock_locations/_table_row.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_filters.html.erb +19 -9
- data/app/views/spree/admin/storefront/edit.html.erb +2 -14
- data/app/views/spree/admin/stores/form/_basic.html.erb +2 -8
- data/app/views/spree/admin/stores/form/_emails.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +1 -10
- data/app/views/spree/admin/taxons/_form.html.erb +2 -9
- data/app/views/spree/admin/themes/_theme.html.erb +1 -1
- data/app/views/spree/admin/translations/translation_rows/_permalink_field_row.html.erb +1 -12
- data/app/views/spree/admin/users/_filters.html.erb +23 -13
- data/config/initializers/spree_admin_navigation.rb +510 -0
- data/config/locales/en.yml +4 -0
- data/lib/generators/spree/admin/scaffold/templates/controller.rb.tt +3 -1
- data/lib/generators/spree/admin/scaffold/templates/views/_table_row.html.erb.tt +8 -6
- data/lib/spree/admin/engine.rb +64 -2
- data/lib/spree/admin/runtime_configuration.rb +1 -0
- data/lib/spree/admin.rb +20 -0
- metadata +17 -15
- data/app/assets/stylesheets/spree/admin/components/_offcanvas.scss +0 -26
- data/app/javascript/spree/admin/helpers/canvas.js +0 -29
- data/app/views/spree/admin/shared/_offcanvas_nav.html.erb +0 -12
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
<% if try_spree_current_user.present? %>
|
|
2
|
-
|
|
3
|
-
<%=
|
|
4
|
-
<%=
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="d-flex align-items-center p-2 bg-light rounded-lg">
|
|
8
|
-
<%= render_avatar(try_spree_current_user, width: 34, height: 34) %>
|
|
9
|
-
<span class="d-none d-lg-inline ml-lg-2">
|
|
2
|
+
<div class="user-dropdown" id="user-menu">
|
|
3
|
+
<%= dropdown do %>
|
|
4
|
+
<%= dropdown_toggle class: 'user-dropdown-button dropdown-toggle' do %>
|
|
5
|
+
<%= render_avatar(try_spree_current_user, width: 32, height: 32) %>
|
|
6
|
+
<span class="user-name d-none d-lg-block">
|
|
10
7
|
<% if try_spree_current_user.name.present? %>
|
|
11
|
-
<%= try_spree_current_user.name&.full
|
|
12
|
-
<span class="small text-muted"><%= try_spree_current_user.email %></span>
|
|
8
|
+
<%= try_spree_current_user.name&.full %>
|
|
13
9
|
<% else %>
|
|
14
|
-
<%= try_spree_current_user.email
|
|
10
|
+
<%= try_spree_current_user.email %>
|
|
15
11
|
<% end %>
|
|
16
12
|
</span>
|
|
17
|
-
|
|
13
|
+
<% end %>
|
|
14
|
+
<%= dropdown_menu class: 'ml-2', style: 'min-width: 250px;' do %>
|
|
15
|
+
<div class="d-flex align-items-center p-2 bg-light rounded-lg">
|
|
16
|
+
<%= render_avatar(try_spree_current_user, width: 34, height: 34) %>
|
|
17
|
+
<span class="d-flex flex-column ml-2">
|
|
18
|
+
<% if try_spree_current_user.name.present? %>
|
|
19
|
+
<%= try_spree_current_user.name&.full %>
|
|
20
|
+
<small class="text-muted"><%= try_spree_current_user.email %></small>
|
|
21
|
+
<% else %>
|
|
22
|
+
<%= try_spree_current_user.email %>
|
|
23
|
+
<% end %>
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
18
26
|
|
|
19
27
|
<%= render_admin_partials(:user_dropdown_partials) %>
|
|
20
28
|
|
|
@@ -36,10 +44,11 @@
|
|
|
36
44
|
|
|
37
45
|
<div class="dropdown-divider"></div>
|
|
38
46
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
<%= button_to spree_admin_logout_path, class: 'dropdown-item mb-0 btn-danger', method: :delete do %>
|
|
48
|
+
<%= icon('logout', class: "icon icon-logout") %>
|
|
49
|
+
<%= Spree.t(:logout) %>
|
|
50
|
+
<% end if defined?(spree_admin_logout_path) %>
|
|
51
|
+
<% end %>
|
|
43
52
|
<% end %>
|
|
44
|
-
|
|
53
|
+
</div>
|
|
45
54
|
<% end %>
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
<% customers_active = %w[users newsletter_subscribers].include?(controller_name) %>
|
|
3
3
|
<%= nav_item(Spree.t(:customers), spree.admin_users_path, icon: 'users', active: customers_active) %>
|
|
4
4
|
|
|
5
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
5
6
|
<ul class="nav-submenu <% unless customers_active %>d-none<% end %>">
|
|
6
7
|
<%= nav_item(Spree.t(:newsletter_subscribers), spree.admin_newsletter_subscribers_path) %>
|
|
7
8
|
</ul>
|
|
9
|
+
|
|
10
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
11
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
12
|
+
<%= nav_item(Spree.t(:customers), spree.admin_users_path) %>
|
|
13
|
+
<%= nav_item(Spree.t(:newsletter_subscribers), spree.admin_newsletter_subscribers_path) %>
|
|
14
|
+
</ul>
|
|
8
15
|
<% end %>
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
<% if ready_to_ship_orders_count&.positive? %>
|
|
5
5
|
<% orders_label += content_tag(:span, ready_to_ship_orders_count, class: 'badge ml-auto') %>
|
|
6
6
|
<% end %>
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
<%= nav_item(orders_label.html_safe, spree.admin_orders_path, icon: 'inbox', active: orders_active) %>
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
10
11
|
<% if orders_active && (ready_to_ship_orders_count&.positive? || can?(:manage, :checkouts)) %>
|
|
11
12
|
<ul class="nav-submenu">
|
|
12
13
|
<% if ready_to_ship_orders_count&.positive? %>
|
|
@@ -22,4 +23,23 @@
|
|
|
22
23
|
<%= render_admin_partials(:store_orders_nav_partials) %>
|
|
23
24
|
</ul>
|
|
24
25
|
<% end %>
|
|
26
|
+
|
|
27
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
28
|
+
<% if ready_to_ship_orders_count&.positive? || can?(:manage, :checkouts) %>
|
|
29
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
30
|
+
<%= nav_item(Spree.t(:orders), spree.admin_orders_path) %>
|
|
31
|
+
|
|
32
|
+
<% if ready_to_ship_orders_count&.positive? %>
|
|
33
|
+
<% fulfill_label = Spree.t('admin.orders.orders_to_fulfill') %>
|
|
34
|
+
<% fulfill_label += content_tag(:span, ready_to_ship_orders_count, class: 'badge ml-auto') %>
|
|
35
|
+
<%= nav_item(fulfill_label.html_safe, spree.admin_orders_path(q: {shipment_state_not_in: [:shipped, :canceled]})) %>
|
|
36
|
+
<% end %>
|
|
37
|
+
|
|
38
|
+
<% if can?(:manage, :checkouts) %>
|
|
39
|
+
<%= nav_item(Spree.t(:draft_orders), spree.admin_checkouts_path) %>
|
|
40
|
+
<% end %>
|
|
41
|
+
|
|
42
|
+
<%= render_admin_partials(:store_orders_nav_partials) %>
|
|
43
|
+
</ul>
|
|
44
|
+
<% end %>
|
|
25
45
|
<% end %>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<% if can?(:manage, Spree::Product) %>
|
|
3
3
|
<%= nav_item(Spree.t(:products), spree.admin_products_path, icon: 'package', active: products_active) %>
|
|
4
4
|
|
|
5
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
5
6
|
<ul class="nav-submenu <% unless products_active %>d-none<% end %>">
|
|
6
7
|
<% if can?(:manage, Spree::StockItem) || can?(:manage, Spree::StockTransfer) %>
|
|
7
8
|
<%= nav_item(Spree.t(:stock), spree.admin_stock_items_path, active: %w[stock_items stock_transfers].include?(controller_name)) %>
|
|
@@ -18,4 +19,24 @@
|
|
|
18
19
|
|
|
19
20
|
<%= render_admin_partials(:store_products_nav_partials) %>
|
|
20
21
|
</ul>
|
|
22
|
+
|
|
23
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
24
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
25
|
+
<%= nav_item(Spree.t(:products), spree.admin_products_path) %>
|
|
26
|
+
|
|
27
|
+
<% if can?(:manage, Spree::StockItem) || can?(:manage, Spree::StockTransfer) %>
|
|
28
|
+
<%= nav_item(Spree.t(:stock), spree.admin_stock_items_path) %>
|
|
29
|
+
<% end %>
|
|
30
|
+
<% if can?(:manage, Spree::Taxonomy) && can?(:manage, Spree::Taxon) %>
|
|
31
|
+
<%= nav_item(Spree.t(:taxonomies), spree.admin_taxonomies_path) %>
|
|
32
|
+
<% end %>
|
|
33
|
+
<% if can?(:manage, Spree::OptionType) %>
|
|
34
|
+
<%= nav_item(Spree.t(:options), spree.admin_option_types_path) %>
|
|
35
|
+
<% end %>
|
|
36
|
+
<% if can?(:manage, Spree::Property) && Spree::Config[:product_properties_enabled] %>
|
|
37
|
+
<%= nav_item(Spree.t(:properties), spree.admin_properties_path) %>
|
|
38
|
+
<% end %>
|
|
39
|
+
|
|
40
|
+
<%= render_admin_partials(:store_products_nav_partials) %>
|
|
41
|
+
</ul>
|
|
21
42
|
<% end %>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<% if can?(:manage, Spree::Promotion) %>
|
|
2
2
|
<% discounts_active = %w[promotions gift_cards gift_card_batches coupon_codes].include?(controller_name) && @user.nil? %>
|
|
3
3
|
<%= nav_item(Spree.t(:promotions), spree.admin_promotions_path, icon: 'discount', active: discounts_active) %>
|
|
4
|
+
|
|
5
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
4
6
|
<ul class="nav-submenu <% unless discounts_active %>d-none<% end %>">
|
|
5
7
|
<%= nav_item(Spree.t(:gift_cards), spree.admin_gift_cards_path, active: %w[gift_cards gift_card_batches].include?(controller_name)) %>
|
|
6
8
|
</ul>
|
|
9
|
+
|
|
10
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
11
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
12
|
+
<%= nav_item(Spree.t(:promotions), spree.admin_promotions_path) %>
|
|
13
|
+
<%= nav_item(Spree.t(:gift_cards), spree.admin_gift_cards_path) %>
|
|
14
|
+
</ul>
|
|
7
15
|
<% end %>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<% if can?(:manage, Spree::CustomerReturn) || can?(:manage, Spree::ReturnAuthorization) %>
|
|
4
4
|
<%= nav_item(Spree.t(:returns), spree.admin_customer_returns_path, icon: 'receipt-refund', active: returns_active) %>
|
|
5
5
|
|
|
6
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
6
7
|
<% if returns_active %>
|
|
7
8
|
<ul class="nav-submenu">
|
|
8
9
|
<% if can?(:manage, Spree::ReturnAuthorization) %>
|
|
@@ -11,4 +12,15 @@
|
|
|
11
12
|
<%= render_admin_partials(:returns_nav_partials) %>
|
|
12
13
|
</ul>
|
|
13
14
|
<% end %>
|
|
15
|
+
|
|
16
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
17
|
+
<% if can?(:manage, Spree::ReturnAuthorization) %>
|
|
18
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
19
|
+
<%= nav_item(Spree.t(:returns), spree.admin_customer_returns_path) %>
|
|
20
|
+
|
|
21
|
+
<%= nav_item(Spree.t(:return_authorizations), spree.admin_return_authorizations_path) %>
|
|
22
|
+
|
|
23
|
+
<%= render_admin_partials(:returns_nav_partials) %>
|
|
24
|
+
</ul>
|
|
25
|
+
<% end %>
|
|
14
26
|
<% end %>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<%= dropdown do %>
|
|
3
3
|
<%= dropdown_toggle class: 'store-dropdown-button dropdown-toggle' do %>
|
|
4
4
|
<%= store_admin_icon(current_store, height: 32, width: 32) %>
|
|
5
|
-
|
|
5
|
+
<span class="store-name d-none d-lg-block">
|
|
6
|
+
<%= truncate(current_store.name, length: 10) %>
|
|
7
|
+
</span>
|
|
6
8
|
<% end %>
|
|
7
9
|
<%= dropdown_menu class: 'ml-2' do %>
|
|
8
10
|
<%= link_to current_store.formatted_url_or_custom_domain, class: 'dropdown-item', target: '_blank' do %>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<% if
|
|
1
|
+
<% if Spree::Admin::RuntimeConfig.legacy_sidebar_navigation %>
|
|
2
|
+
<%# Legacy navigation system %>
|
|
3
|
+
<% if settings_area? %>
|
|
2
4
|
<ul class="nav flex-column">
|
|
3
5
|
<% if can?(:manage, current_store) %>
|
|
4
6
|
<%= nav_item(Spree.t(:store_details), spree.edit_admin_store_path(section: 'general-settings'), icon: 'building-store', active: params[:section] == 'general-settings') %>
|
|
@@ -114,4 +116,16 @@
|
|
|
114
116
|
<% end %>
|
|
115
117
|
</ul>
|
|
116
118
|
</div>
|
|
119
|
+
<% end %>
|
|
120
|
+
<% else %>
|
|
121
|
+
<%# New navigation system %>
|
|
122
|
+
<% if settings_area? %>
|
|
123
|
+
<%= render_navigation(:settings) %>
|
|
124
|
+
<% else %>
|
|
125
|
+
<%= render_navigation(:sidebar) %>
|
|
126
|
+
|
|
127
|
+
<div class="mt-auto d-flex flex-column">
|
|
128
|
+
<%= render 'spree/admin/shared/sidebar/enterprise_edition_notice' %>
|
|
129
|
+
</div>
|
|
130
|
+
<% end %>
|
|
117
131
|
<% end %>
|
|
@@ -2,19 +2,41 @@
|
|
|
2
2
|
<% storefront_active = %w[themes posts post_categories pages storefront].include?(controller_name) %>
|
|
3
3
|
<%= nav_item(Spree.t('admin.storefront'), spree.admin_themes_path, icon: 'building-store', active: storefront_active) %>
|
|
4
4
|
|
|
5
|
+
<%# Submenu for expanded sidebar (only shown when active) %>
|
|
5
6
|
<ul class="nav-submenu <% unless storefront_active %>d-none<% end %>">
|
|
6
7
|
<% if can?(:manage, Spree::Theme) %>
|
|
7
8
|
<%= nav_item(Spree.t(:themes), spree.admin_themes_path) %>
|
|
8
9
|
<% end %>
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
<% if can?(:manage, Spree::Page) %>
|
|
11
12
|
<%= nav_item(Spree.t(:pages), spree.admin_pages_path) %>
|
|
12
13
|
<% end %>
|
|
13
|
-
|
|
14
|
+
|
|
14
15
|
<% if can?(:manage, Spree::Post) %>
|
|
15
16
|
<%= nav_item(Spree.t(:posts), spree.admin_posts_path, active: %w[posts post_categories].include?(controller_name)) %>
|
|
16
17
|
<% end %>
|
|
17
|
-
|
|
18
|
+
|
|
19
|
+
<% if can?(:manage, current_store) %>
|
|
20
|
+
<%= nav_item(Spree.t(:settings), spree.edit_admin_storefront_path) %>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
<%= render_admin_partials(:storefront_nav_partials) %>
|
|
24
|
+
</ul>
|
|
25
|
+
|
|
26
|
+
<%# Submenu dropdown for collapsed sidebar (always rendered, shown on hover) %>
|
|
27
|
+
<ul class="nav-submenu-dropdown d-none dropdown-container">
|
|
28
|
+
<% if can?(:manage, Spree::Theme) %>
|
|
29
|
+
<%= nav_item(Spree.t(:themes), spree.admin_themes_path) %>
|
|
30
|
+
<% end %>
|
|
31
|
+
|
|
32
|
+
<% if can?(:manage, Spree::Page) %>
|
|
33
|
+
<%= nav_item(Spree.t(:pages), spree.admin_pages_path) %>
|
|
34
|
+
<% end %>
|
|
35
|
+
|
|
36
|
+
<% if can?(:manage, Spree::Post) %>
|
|
37
|
+
<%= nav_item(Spree.t(:posts), spree.admin_posts_path) %>
|
|
38
|
+
<% end %>
|
|
39
|
+
|
|
18
40
|
<% if can?(:manage, current_store) %>
|
|
19
41
|
<%= nav_item(Spree.t(:settings), spree.edit_admin_storefront_path) %>
|
|
20
42
|
<% end %>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<%= dropdown_toggle class: 'btn-sm px-1 h-100' do %>
|
|
34
34
|
<%= icon('dots-vertical', class: 'mr-0') %>
|
|
35
35
|
<% end %>
|
|
36
|
-
<%= dropdown_menu
|
|
36
|
+
<%= dropdown_menu do %>
|
|
37
37
|
<% if can?(:create, Spree::Taxon) %>
|
|
38
38
|
<%= link_to_with_icon 'plus', Spree.t(:new_nested_taxon), spree.new_admin_taxonomy_taxon_path(taxonomy, taxon: { parent_id: taxon.id }), class: 'dropdown-item' %>
|
|
39
39
|
<div class="dropdown-divider"></div>
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: { controller: "filters
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<%= search_form_for [:admin, @search], class: "filter-wrap", data: { controller: "filters dialog" } do |f| %>
|
|
2
|
+
<div class="d-flex flex-column flex-lg-row gap-2">
|
|
3
|
+
<%= render 'spree/admin/shared/filters_search_bar', param: :variant_product_name_cont, label: Spree.t(:product_name) %>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<%= button_tag type: 'button', class: 'btn btn-light d-flex align-items-center', data: { action: 'dialog#open' } do %>
|
|
6
|
+
<%= icon "adjustments", class: "mr-1" %>
|
|
7
|
+
<%= Spree.t("admin.filters") %>
|
|
8
|
+
<% end %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<dialog class="drawer" data-dialog-target="dialog" id="stock-items-filters-drawer">
|
|
12
|
+
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
13
|
+
<div class="drawer-body">
|
|
8
14
|
<div class="form-group">
|
|
9
15
|
<%= f.label :variant_sku_cont, Spree.t(:sku) %>
|
|
10
16
|
<%= f.text_field :variant_sku_cont, size: 15, class: "form-control", data: {filters_target: :input} %>
|
|
@@ -17,8 +23,12 @@
|
|
|
17
23
|
data: { controller: 'autocomplete-select' } %>
|
|
18
24
|
</div>
|
|
19
25
|
<%= render_admin_partials(:stock_items_filters_partials, f: f) %>
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
</div>
|
|
27
|
+
<div class="drawer-footer">
|
|
28
|
+
<%= drawer_discard_button('dialog') %>
|
|
29
|
+
<%= render 'spree/admin/shared/filter_submit' %>
|
|
30
|
+
</div>
|
|
31
|
+
</dialog>
|
|
22
32
|
|
|
23
33
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
24
34
|
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<%= dropdown_toggle class: 'btn-sm h-100' do %>
|
|
21
21
|
<%= icon('dots-vertical', class: 'mr-0') %>
|
|
22
22
|
<% end %>
|
|
23
|
-
<%= dropdown_menu
|
|
23
|
+
<%= dropdown_menu do %>
|
|
24
24
|
<%= link_to_with_icon 'check',
|
|
25
25
|
Spree.t(:mark_as_default),
|
|
26
26
|
spree.mark_as_default_admin_stock_location_path(stock_location),
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters dialog"} do |f| %>
|
|
2
|
+
<div class="d-flex flex-column flex-lg-row gap-2">
|
|
3
|
+
<%= render 'spree/admin/shared/filters_search_bar', param: :number_cont, label: Spree.t(:number) %>
|
|
4
|
+
<%= button_tag type: 'button', class: 'btn btn-light d-flex align-items-center', data: { action: 'dialog#open' } do %>
|
|
5
|
+
<%= icon "adjustments", class: "mr-1" %>
|
|
6
|
+
<%= Spree.t("admin.filters") %>
|
|
7
|
+
<% end %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<dialog class="drawer" data-dialog-target="dialog" id="stock-transfers-filters-drawer">
|
|
11
|
+
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
12
|
+
<div class="drawer-body">
|
|
7
13
|
<div class="form-group">
|
|
8
14
|
<%= f.label :reference_cont, Spree.t(:reference) %>
|
|
9
15
|
<%= f.text_field :reference_cont, include_blank: true, size: 15, class: "form-control", data: { filters_target: :input } %>
|
|
@@ -29,10 +35,14 @@
|
|
|
29
35
|
} %>
|
|
30
36
|
</div>
|
|
31
37
|
<%= render_admin_partials(:stock_transfers_filters_partials, f: f) %>
|
|
32
|
-
<div class="form-actions">
|
|
33
|
-
<%= button Spree.t(:search), "search" %>
|
|
34
38
|
</div>
|
|
35
|
-
|
|
39
|
+
<div class="drawer-footer">
|
|
40
|
+
<%= drawer_discard_button('dialog') %>
|
|
41
|
+
<div class="form-actions">
|
|
42
|
+
<%= button Spree.t(:search), "search" %>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</dialog>
|
|
36
46
|
|
|
37
47
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
38
48
|
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
@@ -63,21 +63,9 @@
|
|
|
63
63
|
</h5>
|
|
64
64
|
</div>
|
|
65
65
|
<div class="card-body">
|
|
66
|
-
|
|
67
|
-
<%= f.label :favicon_image do %>
|
|
68
|
-
Favicon image
|
|
69
|
-
<%= help_bubble("A favicon is a small image that appears in the tab of your web browser when you visit a website. It is usually a tiny square or rectangle with a unique design or logo that represents the website") %>
|
|
70
|
-
<% end %>
|
|
71
|
-
<%= render 'active_storage/upload_form', form: f, field_name: :favicon_image, width: 120, height: 120, crop: true %>
|
|
72
|
-
</div>
|
|
66
|
+
<%= f.spree_file_field :favicon_image, width: 120, height: 120, crop: true, label: 'Favicon image', help_bubble: "A favicon is a small image that appears in the tab of your web browser when you visit a website. It is usually a tiny square or rectangle with a unique design or logo that represents the website" %>
|
|
73
67
|
|
|
74
|
-
|
|
75
|
-
<%= f.label :social_image do %>
|
|
76
|
-
Preview image
|
|
77
|
-
<%= help_bubble("This image will be used when your store is shared on social media or in search engines.") %>
|
|
78
|
-
<% end %>
|
|
79
|
-
<%= render 'active_storage/upload_form', form: f, field_name: :social_image, width: 1200, height: 630, crop: true %>
|
|
80
|
-
</div>
|
|
68
|
+
<%= f.spree_file_field :social_image, width: 1200, height: 630, crop: true, label: 'Preview image', help_bubble: "This image will be used when your store is shared on social media or in search engines." %>
|
|
81
69
|
</div>
|
|
82
70
|
</div>
|
|
83
71
|
|
|
@@ -12,14 +12,8 @@
|
|
|
12
12
|
<%= Spree.t(:store_name_help) %>
|
|
13
13
|
</p>
|
|
14
14
|
<%= f.spree_text_field :name, required: true, autofocus: f.object.new_record? %>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<%= f.label :logo do %>
|
|
18
|
-
<%= Spree.t(:logo) %>
|
|
19
|
-
<%= help_bubble("Used in the admin dashboard") %>
|
|
20
|
-
<% end %>
|
|
21
|
-
<%= render 'active_storage/upload_form', form: f, field_name: :logo, width: 240, height: 240, crop: true %>
|
|
22
|
-
</div>
|
|
15
|
+
|
|
16
|
+
<%= f.spree_file_field :logo, width: 240, height: 240, crop: true, help_bubble: "Used in the admin dashboard" %>
|
|
23
17
|
</div>
|
|
24
18
|
</div>
|
|
25
19
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
<div class="card-body">
|
|
35
35
|
<p class="text-muted">This logo is included in all email notifications such as order confirmation</p>
|
|
36
|
-
<%=
|
|
36
|
+
<%= f.spree_file_field :mailer_logo, width: 204, height: 104 %>
|
|
37
37
|
<p class="form-text mb-0 mt-2">
|
|
38
38
|
We recommend images with a transparent background.
|
|
39
39
|
<br />
|
|
@@ -8,16 +8,7 @@
|
|
|
8
8
|
<div class="card-body">
|
|
9
9
|
<%= f.spree_text_field :name, required: true %>
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
<%= f.label :amount_percentage, Spree.t(:rate) %>
|
|
13
|
-
<div class="input-group">
|
|
14
|
-
<%= f.number_field :amount_percentage, class: 'form-control', min: 0, step: 0.1, required: true %>
|
|
15
|
-
<div class="input-group-append">
|
|
16
|
-
<span class="input-group-text">%</span>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
<%= f.error_message_on :amount %>
|
|
20
|
-
</div>
|
|
11
|
+
<%= f.spree_number_field :amount_percentage, label: Spree.t(:rate), append: '%', min: 0, step: 0.1, required: true %>
|
|
21
12
|
|
|
22
13
|
<%= f.spree_collection_select :zone_id, @available_zones, :id, :name, label: Spree.t(:zone) %>
|
|
23
14
|
<%= f.spree_collection_select :tax_category_id, @available_categories, :id, :name, label: Spree.t(:tax_category) %>
|
|
@@ -81,17 +81,10 @@
|
|
|
81
81
|
<h5 class="card-title"><%= Spree.t(:images) %></h5>
|
|
82
82
|
</div>
|
|
83
83
|
<div class="card-body">
|
|
84
|
-
<%= f.
|
|
85
|
-
<%= render 'active_storage/upload_form', form: f, field_name: :image, width: 1920, height: 1080 %>
|
|
86
|
-
<%= f.error_message_on :image %>
|
|
84
|
+
<%= f.spree_file_field :image, width: 1920, height: 1080 %>
|
|
87
85
|
</div>
|
|
88
86
|
<div class="card-body">
|
|
89
|
-
<%= f.
|
|
90
|
-
<p class="text-muted form-text">
|
|
91
|
-
Used for the featured image on the homepage.
|
|
92
|
-
</p>
|
|
93
|
-
<%= render 'active_storage/upload_form', form: f, field_name: :square_image, width: 400, height: 400, crop: true %>
|
|
94
|
-
<%= f.error_message_on :square_image %>
|
|
87
|
+
<%= f.spree_file_field :square_image, width: 400, height: 400, crop: true, help: "Used for the featured image on the homepage." %>
|
|
95
88
|
</div>
|
|
96
89
|
</div>
|
|
97
90
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div class="d-flex justify-content-end w-100">
|
|
40
40
|
<%= link_to Spree.t('actions.publish'), publish_admin_theme_path(theme), class: 'btn btn-sm btn-light mr-2', data: { turbo_method: :put } unless theme.default? %>
|
|
41
41
|
<%= dropdown do %>
|
|
42
|
-
<%= dropdown_toggle class: 'btn-light btn-sm' do %>
|
|
42
|
+
<%= dropdown_toggle class: 'btn-light btn-sm h-100' do %>
|
|
43
43
|
<%= icon('dots-vertical', class: 'mr-0') %>
|
|
44
44
|
<% end %>
|
|
45
45
|
<%= dropdown_menu do %>
|
|
@@ -10,15 +10,4 @@
|
|
|
10
10
|
translated_value = f.object.send("#{field}_#{locale}")&.delete_prefix(base_permalink_translated)
|
|
11
11
|
%>
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
<%= f.label field, Spree.t(field) %>
|
|
15
|
-
<div class="input-group">
|
|
16
|
-
<% if base_permalink_translated.present? %>
|
|
17
|
-
<div class="input-group-prepend">
|
|
18
|
-
<span class="input-group-text"><%= base_permalink_translated %></span>
|
|
19
|
-
</div>
|
|
20
|
-
<% end %>
|
|
21
|
-
|
|
22
|
-
<%= f.text_field "#{field}_#{locale}", value: translated_value, class: 'form-control' %>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
13
|
+
<%= f.spree_text_field "#{field}_#{locale}", label: Spree.t(field), value: translated_value, prepend: base_permalink_translated.presence %>
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], url: spree.admin_users_url, class: "filter-wrap", data: {controller: "filters
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<%= search_form_for [:admin, @search], url: spree.admin_users_url, class: "filter-wrap", data: {controller: "filters dialog"} do |f| %>
|
|
2
|
+
<div class="d-flex flex-column flex-lg-row gap-2">
|
|
3
|
+
<%= render 'spree/admin/shared/filters_search_bar', param: :multi_search, placeholder: Spree.t('admin.users.filters.search_placeholder') %>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<%= render "spree/admin/shared/calendar_range_picker",
|
|
6
|
+
date_from_input_name: "q[created_at_gt]",
|
|
7
|
+
date_to_input_name: "q[created_at_lt]",
|
|
8
|
+
date_from_value: params.dig(:q, :created_at_gt),
|
|
9
|
+
date_to_value: params.dig(:q, :created_at_lt) %>
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<%= button_tag type: 'button', class: 'btn btn-light d-flex align-items-center', data: { action: 'dialog#open' } do %>
|
|
12
|
+
<%= icon "adjustments", class: "mr-1" %>
|
|
13
|
+
<%= Spree.t("admin.filters") %>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<dialog class="drawer" data-dialog-target="dialog" id="user-filters-drawer">
|
|
18
|
+
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
19
|
+
<div class="drawer-body">
|
|
14
20
|
<div class="form-group">
|
|
15
21
|
<%= f.label :bill_address_firstname_i_cont_any, Spree.t(:first_name) %>
|
|
16
22
|
<%= f.text_field :bill_address_firstname_i_cont_any, class: "form-control", data: { filters_target: :input } %>
|
|
@@ -62,8 +68,12 @@
|
|
|
62
68
|
} %>
|
|
63
69
|
</div>
|
|
64
70
|
<%= render_admin_partials(:users_filters_partials, f: f) %>
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
</div>
|
|
72
|
+
<div class="drawer-footer">
|
|
73
|
+
<%= drawer_discard_button('dialog') %>
|
|
74
|
+
<%= render 'spree/admin/shared/filter_submit' %>
|
|
75
|
+
</div>
|
|
76
|
+
</dialog>
|
|
67
77
|
|
|
68
78
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
69
79
|
|