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,10 +1,7 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_billing_address_path(@order), data: {controller: 'auto-submit', form_target: 'form', turbo_frame: :_top}, method: :put do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:billing_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>"></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:billing_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3" data-controller="order-billing-address">
|
9
6
|
<div>
|
10
7
|
<% if @order.shipping_address.present? %>
|
@@ -33,8 +30,8 @@
|
|
33
30
|
</div>
|
34
31
|
<%= render 'form', address: @address, f: f %>
|
35
32
|
</div>
|
36
|
-
<div class="modal-footer
|
37
|
-
|
33
|
+
<div class="modal-footer">
|
34
|
+
<%= modal_discard_button %>
|
38
35
|
<%= turbo_save_button_tag Spree.t('actions.update') %>
|
39
36
|
</div>
|
40
37
|
</div>
|
@@ -1,10 +1,7 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_billing_address_path(@order), data: {controller: 'auto-submit', form_target: 'form', turbo_frame: :_top}, method: :post do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:billing_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" ></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:billing_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3" data-controller="order-billing-address">
|
9
6
|
<div>
|
10
7
|
<% if @order.shipping_address.present? %>
|
@@ -26,8 +23,8 @@
|
|
26
23
|
</div>
|
27
24
|
<%= render 'form', address: @address, f: f %>
|
28
25
|
</div>
|
29
|
-
<div class="modal-footer
|
30
|
-
|
26
|
+
<div class="modal-footer">
|
27
|
+
<%= modal_discard_button %>
|
31
28
|
<%= turbo_save_button_tag Spree.t('actions.save') %>
|
32
29
|
</div>
|
33
30
|
</div>
|
@@ -1,10 +1,7 @@
|
|
1
1
|
<%= turbo_stream.update :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_billing_address_path(@order), data: {controller: 'auto-submit', form_target: 'form', turbo_frame: :_top}, method: :put do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:update_billing_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>"></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:update_billing_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3" data-controller="order-billing-address">
|
9
6
|
<div>
|
10
7
|
<% if @order.shipping_address.present? %>
|
@@ -26,8 +23,8 @@
|
|
26
23
|
</div>
|
27
24
|
<%= render 'form', address: @address, f: f %>
|
28
25
|
</div>
|
29
|
-
<div class="modal-footer
|
30
|
-
|
26
|
+
<div class="modal-footer">
|
27
|
+
<%= modal_discard_button %>
|
31
28
|
<%= turbo_save_button_tag Spree.t('actions.update') %>
|
32
29
|
</div>
|
33
30
|
</div>
|
@@ -1,18 +1,15 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for @order, url: spree.admin_order_contact_information_path(@order), method: :put, data: { turbo_frame: :_top } do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:update_contact_information) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:update_contact_information)) %>
|
8
5
|
<div class="modal-body">
|
9
6
|
<div class="form-group">
|
10
7
|
<%= f.label :email, Spree.t(:email) %>
|
11
8
|
<%= f.email_field :email, class: 'form-control', required: true %>
|
12
9
|
</div>
|
13
10
|
</div>
|
14
|
-
<div class="modal-footer
|
15
|
-
|
11
|
+
<div class="modal-footer">
|
12
|
+
<%= modal_discard_button %>
|
16
13
|
<%= turbo_save_button_tag Spree.t('actions.update') %>
|
17
14
|
</div>
|
18
15
|
</div>
|
@@ -110,16 +110,7 @@
|
|
110
110
|
reimbursements: @customer_return.reimbursements,
|
111
111
|
} %>
|
112
112
|
<% else %>
|
113
|
-
|
114
|
-
class="
|
115
|
-
text-muted p-5 d-flex align-items-center w-100 justify-content-center
|
116
|
-
"
|
117
|
-
>
|
118
|
-
<%= Spree.t(
|
119
|
-
:no_resource_found,
|
120
|
-
resource: plural_resource_name(Spree::Reimbursement),
|
121
|
-
) %>
|
122
|
-
</div>
|
113
|
+
<%= render 'spree/admin/shared/no_resource_found', new_object_url: nil %>
|
123
114
|
<% end %>
|
124
115
|
</div>
|
125
116
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<%= link_to_with_icon 'plus', Spree.t(:new_order), spree.admin_orders_path, class: "btn btn-primary", data: { turbo_method: :post } if can?(:create, Spree::Order) %>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<div class="card-lg
|
13
|
+
<div class="card-lg">
|
14
14
|
<% if params[:frame_name].present? %>
|
15
15
|
<%= turbo_frame_tag params[:frame_name], autoscroll: true, data: { autoscroll_block: :nearest, autoscroll_behavior: :smooth } do %>
|
16
16
|
<%= render 'spree/admin/orders/filters', frame_name: params[:frame_name] %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% allow_return_item_changes = !@return_authorization.customer_returned_items? %>
|
2
2
|
|
3
3
|
<div data-controller="return-items">
|
4
|
-
<div class="table-responsive card-lg
|
4
|
+
<div class="table-responsive card-lg mb-4">
|
5
5
|
<table class="table table-condensed return-items-table">
|
6
6
|
<thead class="text-muted">
|
7
7
|
<tr>
|
@@ -24,51 +24,53 @@ locals: {
|
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
|
27
|
-
<div class="
|
28
|
-
<
|
29
|
-
<
|
30
|
-
<
|
31
|
-
<th><%= Spree.t(:product) %></th>
|
32
|
-
<th><%= Spree.t(:status) %></th>
|
33
|
-
<th><%= Spree.t(:purchased_quantity) %></th>
|
34
|
-
<th><%= Spree.t(:return_quantity) %></th>
|
35
|
-
<th><%= Spree.t(:total) %></th>
|
36
|
-
<th><%= Spree.t(:refund_amount) %></th>
|
37
|
-
<th><%= Spree.t(:reimbursement_type) %></th>
|
38
|
-
<th><%= Spree.t(:exchange_for) %></th>
|
39
|
-
</tr>
|
40
|
-
</thead>
|
41
|
-
<tbody>
|
42
|
-
<% @return_authorization.return_items.each do |return_item| %>
|
27
|
+
<div class="card-lg mb-4">
|
28
|
+
<div class="table-responsive">
|
29
|
+
<table class="table table-condensed return-items-table">
|
30
|
+
<thead class="text-muted">
|
43
31
|
<tr>
|
44
|
-
<
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
<
|
52
|
-
<td class="purchased-quantity">
|
53
|
-
<%= return_item.line_item.quantity %>
|
54
|
-
</td>
|
55
|
-
<td><%= return_item.return_quantity %></td>
|
56
|
-
<td><%= return_item.pre_tax_amount %></td>
|
57
|
-
<td><%= return_item.display_total %></td>
|
58
|
-
<td><%= if return_item.preferred_reimbursement_type.present?
|
59
|
-
return_item.preferred_reimbursement_type.name.humanize
|
60
|
-
else
|
61
|
-
"-"
|
62
|
-
end %></td>
|
63
|
-
<td><%= if return_item.exchange_processed?
|
64
|
-
return_item.exchange_variant.exchange_name
|
65
|
-
else
|
66
|
-
"-"
|
67
|
-
end %></td>
|
32
|
+
<th><%= Spree.t(:product) %></th>
|
33
|
+
<th><%= Spree.t(:status) %></th>
|
34
|
+
<th><%= Spree.t(:purchased_quantity) %></th>
|
35
|
+
<th><%= Spree.t(:return_quantity) %></th>
|
36
|
+
<th><%= Spree.t(:total) %></th>
|
37
|
+
<th><%= Spree.t(:refund_amount) %></th>
|
38
|
+
<th><%= Spree.t(:reimbursement_type) %></th>
|
39
|
+
<th><%= Spree.t(:exchange_for) %></th>
|
68
40
|
</tr>
|
69
|
-
|
70
|
-
|
71
|
-
|
41
|
+
</thead>
|
42
|
+
<tbody>
|
43
|
+
<% @return_authorization.return_items.each do |return_item| %>
|
44
|
+
<tr>
|
45
|
+
<td>
|
46
|
+
<div class="variant-name">
|
47
|
+
<%= link_to return_item.inventory_unit.variant.name,
|
48
|
+
spree.edit_admin_product_path(return_item.inventory_unit.variant.product) %>
|
49
|
+
</div>
|
50
|
+
<div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
|
51
|
+
</td>
|
52
|
+
<td><%= return_item.inventory_unit.state.humanize %></td>
|
53
|
+
<td class="purchased-quantity">
|
54
|
+
<%= return_item.line_item.quantity %>
|
55
|
+
</td>
|
56
|
+
<td><%= return_item.return_quantity %></td>
|
57
|
+
<td><%= return_item.pre_tax_amount %></td>
|
58
|
+
<td><%= return_item.display_total %></td>
|
59
|
+
<td><%= if return_item.preferred_reimbursement_type.present?
|
60
|
+
return_item.preferred_reimbursement_type.name.humanize
|
61
|
+
else
|
62
|
+
"-"
|
63
|
+
end %></td>
|
64
|
+
<td><%= if return_item.exchange_processed?
|
65
|
+
return_item.exchange_variant.exchange_name
|
66
|
+
else
|
67
|
+
"-"
|
68
|
+
end %></td>
|
69
|
+
</tr>
|
70
|
+
<% end %>
|
71
|
+
</tbody>
|
72
|
+
</table>
|
73
|
+
</div>
|
72
74
|
</div>
|
73
75
|
|
74
76
|
<% if @return_authorization.reason.present? %>
|
@@ -1,15 +1,12 @@
|
|
1
1
|
<%= turbo_stream.update :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_shipping_address_path(@order), data: {turbo_frame: :_top}, method: :post do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:new_shipping_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" ></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:new_shipping_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3">
|
9
6
|
<%= render 'form', address: @address, f: f%>
|
10
7
|
</div>
|
11
|
-
<div class="modal-footer
|
12
|
-
|
8
|
+
<div class="modal-footer">
|
9
|
+
<%= modal_discard_button %>
|
13
10
|
<%= turbo_save_button_tag Spree.t('actions.save') %>
|
14
11
|
</div>
|
15
12
|
</div>
|
@@ -1,15 +1,12 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_shipping_address_path(@order), data: {controller: 'auto-submit', form_target: 'form', turbo_frame: :_top}, method: :put do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:update_shipping_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" ></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:update_shipping_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3">
|
9
6
|
<%= render 'form', address: @address, f: f %>
|
10
7
|
</div>
|
11
|
-
<div class="modal-footer
|
12
|
-
|
8
|
+
<div class="modal-footer">
|
9
|
+
<%= modal_discard_button %>
|
13
10
|
<%= turbo_save_button_tag Spree.t('actions.update') %>
|
14
11
|
</div>
|
15
12
|
</div>
|
@@ -1,15 +1,12 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_shipping_address_path(@order), data: {turbo_frame: :_top}, method: :post do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:new_shipping_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" ></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:new_shipping_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3">
|
9
6
|
<%= render 'form', address: @address, f: f%>
|
10
7
|
</div>
|
11
|
-
<div class="modal-footer
|
12
|
-
|
8
|
+
<div class="modal-footer">
|
9
|
+
<%= modal_discard_button %>
|
13
10
|
<%= turbo_save_button_tag Spree.t('actions.save') %>
|
14
11
|
</div>
|
15
12
|
</div>
|
@@ -1,15 +1,12 @@
|
|
1
1
|
<%= turbo_stream.update :dialog_modal do %>
|
2
2
|
<%= form_for @address, url: spree.admin_order_shipping_address_path(@order), data: {controller: 'auto-submit', form_target: 'form', turbo_frame: :_top}, method: :put do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:update_shipping_address) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" ></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:update_shipping_address)) %>
|
8
5
|
<div class="modal-body d-flex flex-col gap-3">
|
9
6
|
<%= render 'form', address: @address, f: f %>
|
10
7
|
</div>
|
11
|
-
<div class="modal-footer
|
12
|
-
|
8
|
+
<div class="modal-footer">
|
9
|
+
<%= modal_discard_button %>
|
13
10
|
<%= turbo_save_button_tag Spree.t('actions.update') %>
|
14
11
|
</div>
|
15
12
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= search_form_for [:admin, @search], url: spree.admin_pages_path , class: "filter-wrap
|
1
|
+
<%= search_form_for [:admin, @search], url: spree.admin_pages_path , class: "filter-wrap", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
|
2
2
|
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
3
3
|
|
4
4
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
@@ -1,15 +1,12 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_with model: @page, url: spree.admin_page_path(@page), data: { controller: 'slug-form seo-form' }, scope: :page do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel"><%= Spree.t(:page_settings) %></h5>
|
6
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>"></button>
|
7
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:page_settings)) %>
|
8
5
|
<div class="modal-body">
|
9
6
|
<%= render 'spree/admin/shared/error_messages', target: @page %>
|
10
7
|
<%= render 'form', f: f, vertical: true %>
|
11
8
|
</div>
|
12
|
-
<div class="modal-footer
|
9
|
+
<div class="modal-footer">
|
13
10
|
<%= turbo_save_button_tag Spree.t('actions.save'), data: {turbo_frame: :_top} %>
|
14
11
|
<%= link_to Spree.t('actions.destroy'), spree.admin_page_path(@page.id), data: { turbo_method: :delete, turbo_frame: '_top', turbo_confirm: Spree.t(:are_you_sure )}, class: 'btn btn-danger' %>
|
15
12
|
</div>
|
@@ -5,9 +5,9 @@
|
|
5
5
|
<%= link_to_with_icon 'plus', Spree.t(:add_new_page), spree.new_admin_page_path, class: "btn btn-primary" if can?(:create, Spree::Page.new) %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<div class="card-lg
|
8
|
+
<div class="card-lg">
|
9
9
|
<%= render "spree/admin/pages/filters" %>
|
10
|
-
<% if @
|
10
|
+
<% if @collection.any? %>
|
11
11
|
<div class="table-responsive">
|
12
12
|
<table class="table">
|
13
13
|
<thead class="text-muted">
|
@@ -17,10 +17,10 @@
|
|
17
17
|
</tr>
|
18
18
|
</thead>
|
19
19
|
<tbody>
|
20
|
-
<%= render collection: @
|
20
|
+
<%= render collection: @collection, partial: "spree/admin/pages/page", cached: spree_base_cache_scope %>
|
21
21
|
</tbody>
|
22
22
|
</table>
|
23
|
-
<%= render
|
23
|
+
<%= render "spree/admin/shared/index_table_options", collection: @collection %>
|
24
24
|
</div>
|
25
25
|
<% else %>
|
26
26
|
<%= render 'spree/admin/shared/no_resource_found' %>
|
@@ -2,15 +2,16 @@
|
|
2
2
|
<%= Spree.t(:payment_methods) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
-
<div class="
|
6
|
-
<
|
7
|
-
<
|
5
|
+
<div class="card-lg">
|
6
|
+
<div class="table-responsive">
|
7
|
+
<table class="table">
|
8
|
+
<thead class="text-muted">
|
8
9
|
<tr>
|
9
10
|
<th></th>
|
10
11
|
<th><%= Spree.t(:payment_method) %></th>
|
11
12
|
<th><%= Spree.t(:visibility) %></th>
|
12
13
|
<th class="text-center"><%= Spree.t(:active) %></th>
|
13
|
-
<th
|
14
|
+
<th></th>
|
14
15
|
</tr>
|
15
16
|
</thead>
|
16
17
|
<tbody data-controller="sortable" data-sortable-handle-value=".move-handle" data-sortable-resource-name-value="payment_method" data-sortable-response-kind-value="turbo-stream">
|
@@ -21,13 +22,14 @@
|
|
21
22
|
|
22
23
|
<% if available_payment_methods.present? && can?(:create, Spree::PaymentMethod) %>
|
23
24
|
<h5 class="pb-2 pt-3">Available Payment Methods</h5>
|
24
|
-
<div class="
|
25
|
-
<
|
26
|
-
<
|
25
|
+
<div class="card-lg">
|
26
|
+
<div class="table-responsive">
|
27
|
+
<table class="table">
|
28
|
+
<thead class="text-muted">
|
27
29
|
<tr>
|
28
30
|
<th><%= Spree.t(:name) %></th>
|
29
31
|
<th><%= Spree.t(:description) %></th>
|
30
|
-
<th
|
32
|
+
<th></th>
|
31
33
|
</tr>
|
32
34
|
</thead>
|
33
35
|
<tbody>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
<%= render 'spree/admin/shared/posts_tabs' %>
|
6
6
|
|
7
|
-
<% if @
|
8
|
-
<div class="card-lg
|
7
|
+
<% if @collection.any? %>
|
8
|
+
<div class="card-lg">
|
9
9
|
<div class="table-responsive rounded-lg">
|
10
10
|
<table class="table">
|
11
11
|
<thead class="text-muted">
|
@@ -15,13 +15,11 @@
|
|
15
15
|
</tr>
|
16
16
|
</thead>
|
17
17
|
<tbody>
|
18
|
-
<%= render partial: 'spree/admin/post_categories/post_category',
|
18
|
+
<%= render collection: @collection, partial: 'spree/admin/post_categories/post_category', cached: spree_base_cache_scope %>
|
19
19
|
</tbody>
|
20
20
|
</table>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
<% else %>
|
24
|
-
|
25
|
-
<%= Spree.t(:no_resource_found, resource: Spree.t(:post_categories)) %>
|
26
|
-
</div>
|
24
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
27
25
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap
|
1
|
+
<%= search_form_for [:admin, @search], 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: :search_by_title, label: Spree.t(:title) %>
|
4
4
|
|
@@ -26,12 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
</div>
|
29
|
-
|
30
|
-
<%= turbo_save_button_tag Spree.t(:filter_results) do %>
|
31
|
-
<%= icon("search") %>
|
32
|
-
<%= Spree.t(:filter_results) %>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
29
|
+
<%= render 'spree/admin/shared/filter_submit' %>
|
35
30
|
</div>
|
36
31
|
|
37
32
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
@@ -3,17 +3,7 @@
|
|
3
3
|
<%= link_to spree.edit_admin_post_path(post), class: 'text-decoration-none d-flex align-items-center font-weight-bold text-dark gap-3', data: { row_link_target: :link, 'turbo-frame': '_top' } do %>
|
4
4
|
<% if post.image.attached? && post.image.variable? %>
|
5
5
|
<div class="admin-product-image-container">
|
6
|
-
<%=
|
7
|
-
main_app.cdn_image_url(
|
8
|
-
post.image.variant(
|
9
|
-
spree_image_variant_options(resize_to_fill: [200, 130])
|
10
|
-
)
|
11
|
-
),
|
12
|
-
class: 'img-fluid',
|
13
|
-
loading: :lazy,
|
14
|
-
width: 100,
|
15
|
-
height: 65
|
16
|
-
) %>
|
6
|
+
<%= spree_image_tag(post.image, width: 100, height: 65, class: 'img-fluid', loading: :lazy) %>
|
17
7
|
</div>
|
18
8
|
<% else %>
|
19
9
|
<%= render 'spree/admin/shared/no_image', width: 100, height: 65 %>
|
@@ -6,10 +6,9 @@
|
|
6
6
|
|
7
7
|
<%= render 'spree/admin/shared/posts_tabs' %>
|
8
8
|
|
9
|
-
<div class="card-lg
|
9
|
+
<div class="card-lg">
|
10
10
|
<%= render "spree/admin/posts/filters" %>
|
11
|
-
|
12
|
-
<% if @posts.any? %>
|
11
|
+
<% if @collection.any? %>
|
13
12
|
<div class="table-responsive rounded-lg">
|
14
13
|
<table class="table">
|
15
14
|
<thead class="text-muted">
|
@@ -22,15 +21,12 @@
|
|
22
21
|
</tr>
|
23
22
|
</thead>
|
24
23
|
<tbody>
|
25
|
-
<%= render partial: "spree/admin/posts/post",
|
24
|
+
<%= render collection: @collection, partial: "spree/admin/posts/post", cached: spree_base_cache_scope %>
|
26
25
|
</tbody>
|
27
26
|
</table>
|
28
27
|
</div>
|
29
|
-
|
30
|
-
<%= render partial: "spree/admin/shared/index_table_options", locals: { collection: @posts } %>
|
28
|
+
<%= render "spree/admin/shared/index_table_options", collection: @collection %>
|
31
29
|
<% else %>
|
32
|
-
|
33
|
-
<%= Spree.t(:no_resource_found, resource: Spree.t(:posts)) %>
|
34
|
-
</div>
|
30
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
35
31
|
<% end %>
|
36
32
|
</div>
|