spree_admin 5.0.0 → 5.0.1
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/components/_bulk_panel.scss +11 -1
- data/app/assets/stylesheets/spree/admin/components/_cards.scss +3 -4
- data/app/assets/stylesheets/spree/admin/components/_dropdowns.scss +1 -1
- data/app/assets/stylesheets/spree/admin/components/_main.scss +8 -1
- data/app/assets/stylesheets/spree/admin/components/_modals.scss +1 -1
- data/app/assets/stylesheets/spree/admin/global/_variables.scss +8 -2
- data/app/controllers/spree/admin/products_controller.rb +1 -8
- data/app/controllers/spree/admin/storefront_controller.rb +1 -1
- data/app/controllers/spree/admin/translations_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +49 -57
- data/app/helpers/spree/admin/bulk_operations_helper.rb +86 -0
- data/app/helpers/spree/admin/modal_helper.rb +29 -0
- data/app/helpers/spree/admin/navigation_helper.rb +76 -1
- data/app/helpers/spree/admin/orders_helper.rb +0 -19
- data/app/helpers/spree/admin/stores_helper.rb +5 -34
- data/app/javascript/spree/admin/controllers/variants_form_controller.js +6 -0
- data/app/views/active_storage/_upload_form.html.erb +4 -8
- data/app/views/spree/admin/assets/edit.html.erb +3 -8
- data/app/views/spree/admin/coupon_codes/index.html.erb +4 -6
- data/app/views/spree/admin/custom_domains/_custom_domains.html.erb +1 -1
- data/app/views/spree/admin/custom_domains/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +4 -17
- data/app/views/spree/admin/dashboard/_setup_progress.html.erb +4 -2
- data/app/views/spree/admin/dashboard/show.html.erb +1 -1
- data/app/views/spree/admin/digital_assets/_table.html.erb +1 -1
- data/app/views/spree/admin/digital_assets/edit.html.erb +3 -11
- data/app/views/spree/admin/digital_assets/new.html.erb +3 -11
- data/app/views/spree/admin/exports/index.html.erb +22 -24
- data/app/views/spree/admin/exports/new.html.erb +3 -9
- data/app/views/spree/admin/line_items/new.html.erb +2 -5
- data/app/views/spree/admin/oauth_applications/index.html.erb +57 -58
- data/app/views/spree/admin/option_types/_filter.html.erb +1 -1
- data/app/views/spree/admin/option_types/index.html.erb +7 -11
- data/app/views/spree/admin/orders/_filters.html.erb +2 -7
- data/app/views/spree/admin/orders/_list.html.erb +2 -4
- data/app/views/spree/admin/orders/billing_address/create.turbo_stream.erb +3 -6
- data/app/views/spree/admin/orders/billing_address/edit.html.erb +3 -6
- data/app/views/spree/admin/orders/billing_address/new.html.erb +3 -6
- data/app/views/spree/admin/orders/billing_address/update.turbo_stream.erb +3 -6
- data/app/views/spree/admin/orders/contact_information/edit.html.erb +3 -6
- data/app/views/spree/admin/orders/customer_returns/edit.html.erb +1 -10
- data/app/views/spree/admin/orders/index.html.erb +1 -1
- data/app/views/spree/admin/orders/return_authorizations/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/return_authorizations/show.html.erb +45 -43
- data/app/views/spree/admin/orders/shipping_address/create.turbo_stream.erb +3 -6
- data/app/views/spree/admin/orders/shipping_address/edit.html.erb +3 -6
- data/app/views/spree/admin/orders/shipping_address/new.html.erb +3 -6
- data/app/views/spree/admin/orders/shipping_address/update.turbo_stream.erb +3 -6
- data/app/views/spree/admin/pages/_filters.html.erb +1 -1
- data/app/views/spree/admin/pages/edit.html.erb +2 -5
- data/app/views/spree/admin/pages/index.html.erb +4 -4
- data/app/views/spree/admin/payment_methods/index.html.erb +10 -8
- data/app/views/spree/admin/post_categories/index.html.erb +4 -6
- data/app/views/spree/admin/posts/_filters.html.erb +2 -7
- data/app/views/spree/admin/posts/_post.html.erb +1 -11
- data/app/views/spree/admin/posts/index.html.erb +5 -9
- data/app/views/spree/admin/products/_bulk_operations.html.erb +59 -94
- data/app/views/spree/admin/products/_filters.html.erb +12 -7
- data/app/views/spree/admin/products/_list.html.erb +2 -10
- data/app/views/spree/admin/products/_product.html.erb +1 -4
- data/app/views/spree/admin/products/bulk_modal.html.erb +3 -8
- data/app/views/spree/admin/products/index.html.erb +5 -5
- data/app/views/spree/admin/promotion_actions/new.html.erb +7 -12
- data/app/views/spree/admin/promotion_rules/new.html.erb +7 -12
- data/app/views/spree/admin/promotions/_filters.html.erb +27 -0
- data/app/views/spree/admin/promotions/index.html.erb +7 -35
- data/app/views/spree/admin/properties/index.html.erb +10 -9
- data/app/views/spree/admin/refund_reasons/index.html.erb +37 -35
- data/app/views/spree/admin/refunds/edit.html.erb +3 -8
- data/app/views/spree/admin/reimbursement_types/index.html.erb +42 -40
- data/app/views/spree/admin/reports/_report.html.erb +1 -1
- data/app/views/spree/admin/return_authorization_reasons/index.html.erb +41 -41
- data/app/views/spree/admin/return_authorizations/_filters.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_list.html.erb +1 -10
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/roles/_form.html.erb +1 -1
- data/app/views/spree/admin/roles/index.html.erb +26 -24
- data/app/views/spree/admin/shared/_bulk_modal.html.erb +6 -7
- data/app/views/spree/admin/shared/_filter_submit.html.erb +6 -0
- data/app/views/spree/admin/shared/_modal.html.erb +2 -8
- data/app/views/spree/admin/shared/_multi_product_picker.html.erb +2 -4
- data/app/views/spree/admin/shared/_no_resource_found.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_image.html.erb +1 -10
- data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
- data/app/views/spree/admin/shared/sidebar/_orders_nav.html.erb +1 -1
- data/app/views/spree/admin/shared/sidebar/_store_dropdown.html.erb +36 -7
- data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +4 -0
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +3 -23
- data/app/views/spree/admin/shipping_categories/index.html.erb +28 -26
- data/app/views/spree/admin/shipping_methods/_actions.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +23 -21
- data/app/views/spree/admin/stock_items/_filters.html.erb +2 -7
- data/app/views/spree/admin/stock_items/index.html.erb +5 -8
- data/app/views/spree/admin/stock_locations/_stock_location.html.erb +16 -13
- data/app/views/spree/admin/stock_locations/index.html.erb +24 -21
- data/app/views/spree/admin/stock_transfers/_filters.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_new_variant_modal.html.erb +3 -5
- data/app/views/spree/admin/stock_transfers/index.html.erb +6 -6
- data/app/views/spree/admin/store_credit_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/store_credit_categories/edit.html.erb +6 -4
- data/app/views/spree/admin/store_credit_categories/index.html.erb +28 -24
- data/app/views/spree/admin/store_credits/index.html.erb +2 -2
- data/app/views/spree/admin/storefront/edit.html.erb +7 -9
- data/app/views/spree/admin/stores/form/_policies.html.erb +1 -1
- data/app/views/spree/admin/stores/new.html.erb +8 -6
- data/app/views/spree/admin/tax_categories/index.html.erb +24 -22
- data/app/views/spree/admin/tax_rates/index.html.erb +26 -24
- data/app/views/spree/admin/taxonomies/index.html.erb +4 -4
- data/app/views/spree/admin/taxonomies/show.html.erb +2 -2
- data/app/views/spree/admin/themes/_theme_preview_image.html.erb +1 -10
- data/app/views/spree/admin/themes/index.html.erb +2 -2
- data/app/views/spree/admin/translations/_translations_unavailable.html.erb +6 -8
- data/app/views/spree/admin/users/_filters.html.erb +2 -7
- data/app/views/spree/admin/users/_tabs.html.erb +4 -4
- data/app/views/spree/admin/users/_user.html.erb +1 -4
- data/app/views/spree/admin/users/bulk_modal.html.erb +3 -8
- data/app/views/spree/admin/users/index.html.erb +25 -58
- data/app/views/spree/admin/variants/form/_media_asset.html.erb +1 -7
- data/app/views/spree/admin/variants/form/_pricing.html.erb +1 -1
- data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +1 -1
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +25 -22
- data/app/views/spree/admin/webhooks_subscribers/show.html.erb +3 -3
- data/app/views/spree/admin/zones/index.html.erb +34 -32
- data/config/locales/en.yml +1 -3
- metadata +12 -9
- data/app/views/spree/admin/products/_empty_list.html.erb +0 -1
@@ -1,44 +1,46 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
|
-
<%=
|
2
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_reimbursement_type), new_object_url, class: "btn btn-primary" %>
|
3
3
|
<% end if can?(:create, Spree::ReimbursementType) %>
|
4
4
|
|
5
|
-
<%= render
|
5
|
+
<%= render 'spree/admin/shared/returns_and_refunds_nav' %>
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
7
|
+
<div class="card-lg">
|
8
|
+
<% if @collection.any? %>
|
9
|
+
<div class="table-responsive">
|
10
|
+
<table class="table">
|
11
|
+
<thead class="text-muted">
|
12
|
+
<tr>
|
13
|
+
<th><%= Spree.t(:name) %></th>
|
14
|
+
<th><%= Spree.t(:type) %></th>
|
15
|
+
<th><%= Spree.t(:status) %></th>
|
16
|
+
<th><%= Spree.t(:mutable) %></th>
|
17
|
+
<th></th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<% @collection.each do |reimbursement_type| %>
|
22
|
+
<tr id="<%= spree_dom_id reimbursement_type %>" data-controller="row-link">
|
23
|
+
<td class="w-40 align-center cursor-pointer" data-action="click->row-link#openLink">
|
24
|
+
<%= reimbursement_type.name.humanize %>
|
25
|
+
</td>
|
26
|
+
<td class="w-30 cursor-pointer" data-action="click->row-link#openLink">
|
27
|
+
<code><%= reimbursement_type.type.demodulize %></code>
|
28
|
+
</td>
|
29
|
+
<td class="w-10 align-center cursor-pointer" data-action="click->row-link#openLink">
|
30
|
+
<%= active_badge(reimbursement_type.active, label: Spree.t(reimbursement_type.active? ? :active : :inactive)) %>
|
31
|
+
</td>
|
32
|
+
<td class="w-10 align-center cursor-pointer" data-action="click->row-link#openLink">
|
33
|
+
<%= active_badge(reimbursement_type.mutable) %>
|
34
|
+
</td>
|
35
|
+
<td class="actions w-10">
|
36
|
+
<%= link_to_edit reimbursement_type, no_text: true, data: { row_link_target: :link } if can?(:edit, reimbursement_type) %>
|
37
|
+
</td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
</div>
|
43
|
+
<% else %>
|
44
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
45
|
+
<% end %>
|
46
|
+
</div>
|
@@ -1,45 +1,45 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
|
-
<%=
|
3
|
-
|
4
|
-
{ icon: "plus", id: "admin_new_named_type", class: "btn-primary" } %>
|
5
|
-
<% end if can? :create, Spree::RefundReason %>
|
2
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_rma_reason), new_object_url, class: "btn btn-primary" %>
|
3
|
+
<% end if can? :create, Spree::ReturnAuthorizationReason %>
|
6
4
|
|
7
|
-
|
5
|
+
<%= render"spree/admin/shared/returns_and_refunds_nav" %>
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
<div class="card-lg">
|
8
|
+
<% if @collection.any? %>
|
9
|
+
<div class="table-responsive">
|
10
|
+
<table class="table">
|
11
|
+
<thead class="text-muted">
|
12
|
+
<tr>
|
13
|
+
<th><%= Spree.t(:name) %></th>
|
14
|
+
<th><%= Spree.t(:status) %></th>
|
15
|
+
<th></th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody id="<%= plural_resource_name(Spree::ReturnAuthorizationReason).to_s.parameterize.underscore %>">
|
19
|
+
<% @collection.each do |return_authorization_reason| %>
|
20
|
+
<tr id="<%= spree_dom_id return_authorization_reason %>" data-controller="row-link">
|
21
|
+
<td class="w-40 align-center cursor-pointer" data-action="click->row-link#openLink">
|
22
|
+
<%= return_authorization_reason.name %>
|
23
|
+
</td>
|
24
|
+
<td class="w-20 align-center cursor-pointer" data-action="click->row-link#openLink">
|
25
|
+
<%= active_badge(
|
26
|
+
return_authorization_reason.active,
|
27
|
+
label: Spree.t(return_authorization_reason.active? ? :active : :inactive),
|
28
|
+
) %>
|
29
|
+
</td>
|
30
|
+
<td class="actions w-10">
|
31
|
+
<% if return_authorization_reason.mutable? %>
|
32
|
+
<%= if can? :edit, return_authorization_reason
|
33
|
+
link_to_edit(return_authorization_reason, no_text: true, data: { row_link_target: :link })
|
34
|
+
end %>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
17
37
|
</tr>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<%= active_badge(
|
27
|
-
return_authorization_reason.active,
|
28
|
-
label: Spree.t(return_authorization_reason.active? ? :active : :inactive),
|
29
|
-
) %>
|
30
|
-
</td>
|
31
|
-
<td class="actions w-10">
|
32
|
-
<% if return_authorization_reason.mutable? %>
|
33
|
-
<%= if can? :edit, return_authorization_reason
|
34
|
-
link_to_edit(return_authorization_reason, no_text: true, data: { row_link_target: :link })
|
35
|
-
end %>
|
36
|
-
<% end %>
|
37
|
-
</td>
|
38
|
-
</tr>
|
39
|
-
<% end %>
|
40
|
-
</tbody>
|
41
|
-
</table>
|
42
|
-
</div>
|
43
|
-
<% else %>
|
44
|
-
<%= render "spree/admin/shared/no_resource_found" %>
|
45
|
-
<% end %>
|
38
|
+
<% end %>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
41
|
+
</div>
|
42
|
+
<% else %>
|
43
|
+
<%= render "spree/admin/shared/no_resource_found" %>
|
44
|
+
<% end %>
|
45
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= search_form_for [:admin, @search], url: spree.admin_return_authorizations_path, class: "filter-wrap
|
1
|
+
<%= search_form_for [:admin, @search], url: spree.admin_return_authorizations_path, class: "filter-wrap", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
|
2
2
|
<div class="d-flex flex-column flex-lg-row gap-2">
|
3
3
|
<%= render "spree/admin/shared/filters_search_bar", param: :number_cont %>
|
4
4
|
|
@@ -17,14 +17,5 @@
|
|
17
17
|
</table>
|
18
18
|
</div>
|
19
19
|
<% else %>
|
20
|
-
|
21
|
-
class="
|
22
|
-
text-muted p-5 d-flex align-items-center w-100 justify-content-center
|
23
|
-
"
|
24
|
-
>
|
25
|
-
<%= Spree.t(
|
26
|
-
:no_resource_found,
|
27
|
-
resource: plural_resource_name(Spree::ReturnAuthorization),
|
28
|
-
) %>.
|
29
|
-
</div>
|
20
|
+
<%= render 'spree/admin/shared/no_resource_found', new_object_url: nil %>
|
30
21
|
<% end %>
|
@@ -3,30 +3,32 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%=
|
6
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_role), new_object_url, class: "btn btn-primary" %>
|
7
7
|
<% end if can? :create, Spree::Role %>
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
<
|
13
|
-
<
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
</thead>
|
18
|
-
<tbody>
|
19
|
-
<% @roles.each do |role| %>
|
20
|
-
<tr id="<%= spree_dom_id role %>">
|
21
|
-
<td><%= role.name %></td>
|
22
|
-
<td class="actions">
|
23
|
-
<%= link_to_edit(role, no_text: true) if can? :edit, role %>
|
24
|
-
</td>
|
9
|
+
<div class="card-lg">
|
10
|
+
<% if @collection.any? %>
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table">
|
13
|
+
<thead class="text-muted">
|
14
|
+
<tr>
|
15
|
+
<th><%= Spree.t(:role_id) %></th>
|
16
|
+
<th></th>
|
25
17
|
</tr>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<% @collection.each do |role| %>
|
21
|
+
<tr id="<%= spree_dom_id role %>">
|
22
|
+
<td><%= role.name %></td>
|
23
|
+
<td class="actions">
|
24
|
+
<%= link_to_edit(role, no_text: true) if can? :edit, role %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
30
|
+
</div>
|
31
|
+
<% else %>
|
32
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
@@ -2,18 +2,17 @@
|
|
2
2
|
<div class="modal-dialog modal-dialog-centered">
|
3
3
|
<%= turbo_frame_tag :bulk_modal do %>
|
4
4
|
<div class="modal-content">
|
5
|
-
|
6
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:loading) %>...</h5>
|
7
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
8
|
-
</div>
|
5
|
+
<%= modal_header(Spree.t(:loading)) %>
|
9
6
|
<div class="modal-body text-center">
|
10
7
|
<div class="spinner-border text-muted" role="status">
|
11
8
|
<span class="sr-only"><%= Spree.t(:loading) %>...</span>
|
12
9
|
</div>
|
13
10
|
</div>
|
14
|
-
<div class="modal-footer
|
15
|
-
|
16
|
-
<button type="button" class="btn btn-primary" disabled="disabled"
|
11
|
+
<div class="modal-footer">
|
12
|
+
<%= modal_discard_button %>
|
13
|
+
<button type="button" class="btn btn-primary" disabled="disabled">
|
14
|
+
<%= Spree.t('actions.save') %>
|
15
|
+
</button>
|
17
16
|
</div>
|
18
17
|
</div>
|
19
18
|
<% end %>
|
@@ -2,10 +2,7 @@
|
|
2
2
|
<div class="modal-dialog modal-dialog-centered">
|
3
3
|
<%= turbo_frame_tag :dialog_modal do %>
|
4
4
|
<div class="modal-content">
|
5
|
-
|
6
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:loading) %>...</h5>
|
7
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
8
|
-
</div>
|
5
|
+
<%= modal_header(Spree.t(:loading)) %>
|
9
6
|
<div class="modal-body text-center">
|
10
7
|
<div class="spinner-border text-light mx-auto my-5" role="status">
|
11
8
|
<span class="sr-only"><%= Spree.t(:loading) %>...</span>
|
@@ -20,10 +17,7 @@
|
|
20
17
|
<div class="modal-dialog modal-dialog-centered modal-lg">
|
21
18
|
<%= turbo_frame_tag :dialog_modal_lg do %>
|
22
19
|
<div class="modal-content">
|
23
|
-
|
24
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:loading) %>...</h5>
|
25
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
26
|
-
</div>
|
20
|
+
<%= modal_header(Spree.t(:loading)) %>
|
27
21
|
<div class="modal-body text-center" style="min-height: 200px">
|
28
22
|
<div class="spinner-border text-light" role="status">
|
29
23
|
<span class="sr-only"><%= Spree.t(:loading) %>...</span>
|
@@ -1,9 +1,6 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<div class="modal-content" data-controller="search-picker">
|
3
|
-
|
4
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:add_products) %></h5>
|
5
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
6
|
-
</div>
|
3
|
+
<%= modal_header(Spree.t(:add_products)) %>
|
7
4
|
<div class="modal-body border-bottom">
|
8
5
|
<%= form_with url: spree.search_admin_products_path, method: :post, data: { controller: 'auto-submit'} do |form| %>
|
9
6
|
<%= form.hidden_field :omit_ids, value: parent.product_ids.join(',') %>
|
@@ -19,6 +16,7 @@
|
|
19
16
|
</div>
|
20
17
|
</div>
|
21
18
|
<div class="modal-footer border-top">
|
19
|
+
<%= modal_discard_button %>
|
22
20
|
<%= turbo_save_button_tag Spree.t(:add_selected_products), class: 'btn btn-primary', disabled: true, data: { search_picker_target: :submit } %>
|
23
21
|
</div>
|
24
22
|
<% end %>
|
@@ -2,5 +2,5 @@
|
|
2
2
|
|
3
3
|
<div class="text-muted p-5 d-flex align-items-center w-100 justify-content-center">
|
4
4
|
<%= Spree.t(:no_resource_found, resource: resource_name) %>
|
5
|
-
<%= link_to_with_icon 'plus', Spree.t(:add_one), new_object_url, class: 'btn btn-light ml-3' if can?(:create, model_class) && defined?(new_object_url) %>
|
5
|
+
<%= link_to_with_icon 'plus', Spree.t(:add_one), new_object_url, class: 'btn btn-light ml-3', data: { 'turbo-frame': '_top' } if can?(:create, model_class) && defined?(new_object_url) && new_object_url.present? %>
|
6
6
|
</div>
|
@@ -5,16 +5,7 @@
|
|
5
5
|
<% if image.present? && image.attached? && image.variable? %>
|
6
6
|
<% alt ||= image.alt || object.name %>
|
7
7
|
<div class="admin-product-image-container">
|
8
|
-
<%=
|
9
|
-
main_app.cdn_image_url(
|
10
|
-
image.variant(
|
11
|
-
spree_image_variant_options(resize_to_fill: [width * 2, height * 2])
|
12
|
-
)
|
13
|
-
),
|
14
|
-
width: width,
|
15
|
-
height: height,
|
16
|
-
alt: alt
|
17
|
-
) %>
|
8
|
+
<%= spree_image_tag(image, width: width, height: height, alt: alt) %>
|
18
9
|
</div>
|
19
10
|
<% else %>
|
20
11
|
<%= render 'spree/admin/shared/no_image', width: width, height: height %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<% if can?(:manage, :checkouts) %>
|
19
|
-
<%= nav_item(Spree.t(:draft_orders), spree.admin_checkouts_path
|
19
|
+
<%= nav_item(Spree.t(:draft_orders), spree.admin_checkouts_path) %>
|
20
20
|
<% end %>
|
21
21
|
|
22
22
|
<%= render_admin_partials(:store_orders_nav_partials) %>
|
@@ -1,3 +1,36 @@
|
|
1
|
+
<% if available_stores.count > 1 %>
|
2
|
+
<div class="modal fade" id="switch-store-modal" tabindex="-1" role="dialog" aria-labelledby="switchStoreModalLabel" aria-hidden="true">
|
3
|
+
<div class="modal-dialog" role="document">
|
4
|
+
<div class="modal-content">
|
5
|
+
<%= modal_header(icon('switch-horizontal', class: 'mr-2') + Spree.t(:switch_store)) %>
|
6
|
+
<div class="modal-body">
|
7
|
+
<div class="list-group">
|
8
|
+
<% available_stores.each do |store| %>
|
9
|
+
<% if store.id != current_store.id %>
|
10
|
+
<%= link_to spree.admin_dashboard_url(host: store.url), class: 'list-group-item hover-light d-flex text-dark w-100 align-items-center text-primary' do %>
|
11
|
+
<%= store_admin_icon(current_store, height: 32, width: 32) %>
|
12
|
+
<span class="ml-3">
|
13
|
+
<%= store.name %>
|
14
|
+
</span>
|
15
|
+
<% end %>
|
16
|
+
<% else %>
|
17
|
+
<div class="list-group-item d-flex text-dark w-100 align-items-center cursor-disabled active">
|
18
|
+
<%= store_admin_icon(current_store, height: 32, width: 32) %>
|
19
|
+
<span class="ml-3">
|
20
|
+
<%= store.name %>
|
21
|
+
</span>
|
22
|
+
|
23
|
+
<%= icon('check', class: 'ml-auto') %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
|
1
34
|
<div class="border-bottom border-bottom-dashed pb-2 d-flex align-items-center justify-content-between pr-1" id="store-menu" data-turbo-permanent>
|
2
35
|
<div class="dropdown">
|
3
36
|
<button type="button" class="btn d-flex align-items-center justify-content-between text-left dropdown-toggle d-flex align-items-center gap-2"
|
@@ -18,15 +51,11 @@
|
|
18
51
|
<% end if current_store.default_theme && can?(:manage, Spree::Theme) %>
|
19
52
|
|
20
53
|
<% if available_stores.count > 1 %>
|
21
|
-
<div class="dropdown-
|
54
|
+
<div class="dropdown-divider"></div>
|
55
|
+
<%= link_to "#", class: 'dropdown-item mb-0', data: { toggle: 'modal', target: '#switch-store-modal' } do %>
|
56
|
+
<%= icon 'switch-horizontal' %>
|
22
57
|
<%= Spree.t(:switch_store) %>
|
23
|
-
</div>
|
24
|
-
<% available_stores.each do |store| %>
|
25
|
-
<% next if store.id == current_store.id %>
|
26
|
-
<%= link_to store.name, spree.admin_dashboard_url(host: store.url), class: 'dropdown-item' %>
|
27
58
|
<% end %>
|
28
|
-
|
29
|
-
<div class="dropdown-divider"></div>
|
30
59
|
<% end %>
|
31
60
|
</div>
|
32
61
|
</div>
|
@@ -77,6 +77,10 @@
|
|
77
77
|
<%= active_link_to spree.admin_getting_started_path, class: 'nav-link' do %>
|
78
78
|
<%= icon 'map' %>
|
79
79
|
<%= Spree.t('admin.getting_started') %>
|
80
|
+
|
81
|
+
<span class="badge ml-auto badge-info">
|
82
|
+
<%= current_store.setup_tasks_done %><span class="opacity-50">/<%= current_store.setup_tasks_total %></span>
|
83
|
+
</span>
|
80
84
|
<% end %>
|
81
85
|
</li>
|
82
86
|
<% end %>
|
@@ -10,29 +10,9 @@
|
|
10
10
|
<div class="flex-grow-1 cursor-pointer" data-action="click->row-link#openLink">
|
11
11
|
<div class="d-flex align-items-center overflow-hidden w-100 <% if taxon.square_image&.attached? || taxon.image&.attached? %>py-2<% else %>py-3<% end %>">
|
12
12
|
<% if taxon.square_image&.attached? && taxon.square_image.variable? %>
|
13
|
-
<%=
|
14
|
-
main_app.cdn_image_url(
|
15
|
-
taxon.square_image.variant(
|
16
|
-
spree_image_variant_options(resize_to_fill: [96, 96])
|
17
|
-
)
|
18
|
-
),
|
19
|
-
class: 'rounded mr-3',
|
20
|
-
width: 48,
|
21
|
-
height: 48,
|
22
|
-
loading: :lazy
|
23
|
-
) %>
|
13
|
+
<%= spree_image_tag(taxon.square_image, class: 'rounded mr-3', width: 48, height: 48, loading: :lazy) %>
|
24
14
|
<% elsif taxon.image&.attached? && taxon.image.variable? %>
|
25
|
-
<%=
|
26
|
-
main_app.cdn_image_url(
|
27
|
-
taxon.image.variant(
|
28
|
-
spree_image_variant_options(resize_to_fill: [96, 96])
|
29
|
-
)
|
30
|
-
),
|
31
|
-
class: 'rounded mr-3',
|
32
|
-
width: 48,
|
33
|
-
height: 48,
|
34
|
-
loading: :lazy
|
35
|
-
) %>
|
15
|
+
<%= spree_image_tag(taxon.image, class: 'rounded mr-3', width: 48, height: 48, loading: :lazy) %>
|
36
16
|
<% end %>
|
37
17
|
<div class="overflow-hidden">
|
38
18
|
<%= taxon.name %>
|
@@ -47,7 +27,7 @@
|
|
47
27
|
</div>
|
48
28
|
|
49
29
|
<div class="d-flex align-items-center px-3 ml-3">
|
50
|
-
<%= link_to_edit(taxon, url: spree.edit_admin_taxonomy_taxon_path(taxonomy, taxon.id), data: { row_link_target: :link }) %>
|
30
|
+
<%= link_to_edit(taxon, url: spree.edit_admin_taxonomy_taxon_path(taxonomy, taxon.id), data: { row_link_target: :link }) if can?(:edit, taxon) %>
|
51
31
|
|
52
32
|
<div class="dropdown ml-2 h-100">
|
53
33
|
<button class="btn btn-light btn-sm px-1 h-100" type="button" id="dropdownMenuButton-<%= taxon.id %>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
@@ -3,34 +3,36 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%=
|
6
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_shipping_category), new_object_url, class: "btn btn-primary" %>
|
7
7
|
<% end if can? :create, Spree::ShippingCategory %>
|
8
8
|
|
9
9
|
<%= render partial: 'spree/admin/shared/shipping_nav' %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
</thead>
|
20
|
-
<tbody>
|
21
|
-
<% @shipping_categories.each do |shipping_category| %>
|
22
|
-
<tr id="<%= spree_dom_id shipping_category %>" class="cursor-pointer" data-controller="row-link">
|
23
|
-
<td data-action="click->row-link#openLink"><%= shipping_category.name %></td>
|
24
|
-
<td class="actions">
|
25
|
-
<span class="d-flex justify-content-end">
|
26
|
-
<%= link_to_edit(shipping_category, data: { row_link_target: :link }) if can? :edit, shipping_category %>
|
27
|
-
</span>
|
28
|
-
</td>
|
11
|
+
<div class="card-lg">
|
12
|
+
<% if @collection.any? %>
|
13
|
+
<div class="table-responsive">
|
14
|
+
<table class="table">
|
15
|
+
<thead class="text-muted">
|
16
|
+
<tr>
|
17
|
+
<th><%= Spree.t(:name) %></th>
|
18
|
+
<th></th>
|
29
19
|
</tr>
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% @collection.each do |shipping_category| %>
|
23
|
+
<tr id="<%= spree_dom_id shipping_category %>" class="cursor-pointer" data-controller="row-link">
|
24
|
+
<td data-action="click->row-link#openLink"><%= shipping_category.name %></td>
|
25
|
+
<td class="actions">
|
26
|
+
<span class="d-flex justify-content-end">
|
27
|
+
<%= link_to_edit(shipping_category, data: { row_link_target: :link }) if can? :edit, shipping_category %>
|
28
|
+
</span>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<% end %>
|
32
|
+
</tbody>
|
33
|
+
</table>
|
34
|
+
</div>
|
35
|
+
<% else %>
|
36
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
2
|
<% if can?(:create, Spree::ShippingMethod) %>
|
3
|
-
<%=
|
3
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_shipping_method), new_object_url, class: "btn btn-primary" %>
|
4
4
|
<% end %>
|
5
5
|
<% end %>
|