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,35 +1,22 @@
|
|
1
1
|
<div id="bulk-panel" class="d-none" data-bulk-operation-target="panel">
|
2
|
-
<div
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
</a>
|
19
|
-
<% end %>
|
20
|
-
<a
|
21
|
-
href="<%= spree.bulk_modal_admin_products_path(kind: :set_status, status: :draft) %>"
|
22
|
-
data-turbo-frame="bulk_modal"
|
23
|
-
class="btn btn-light mr-2"
|
24
|
-
data-action="click->bulk-operation#setBulkAction"
|
25
|
-
data-url="<%= spree.bulk_status_update_admin_products_path(status: :draft) %>"
|
26
|
-
>
|
27
|
-
<%= icon("circle-dotted") %>
|
28
|
-
<%= Spree.t("admin.bulk_ops.products.title.set_status", status: :draft) %>
|
29
|
-
</a>
|
30
|
-
</div>
|
2
|
+
<div class="bulk-panel-container">
|
3
|
+
<% if can?(:activate, Spree::Product) %>
|
4
|
+
<%= bulk_action_link(
|
5
|
+
Spree.t("admin.bulk_ops.products.title.set_status", status: :active),
|
6
|
+
spree.bulk_modal_admin_products_path(kind: :set_status, status: :active),
|
7
|
+
icon: "circle-check",
|
8
|
+
url: spree.bulk_status_update_admin_products_path(status: :active)
|
9
|
+
) %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= bulk_action_link(
|
13
|
+
Spree.t("admin.bulk_ops.products.title.set_status", status: :draft),
|
14
|
+
spree.bulk_modal_admin_products_path(kind: :set_status, status: :draft),
|
15
|
+
icon: "circle-dotted",
|
16
|
+
url: spree.bulk_status_update_admin_products_path(status: :draft)
|
17
|
+
) %>
|
31
18
|
|
32
|
-
<div class="dropdown dropup
|
19
|
+
<div class="dropdown dropup" role="group">
|
33
20
|
<button
|
34
21
|
type="button"
|
35
22
|
data-display="static"
|
@@ -43,80 +30,58 @@
|
|
43
30
|
<div
|
44
31
|
class="dropdown-menu dropdown-menu-left"
|
45
32
|
aria-labelledby="btnGroupDrop1"
|
46
|
-
data-toggle="modal"
|
47
|
-
data-target="#bulk-modal"
|
48
33
|
>
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
<%= Spree.t("admin.bulk_ops.products.title.set_status", status: :archived) %>
|
58
|
-
</a>
|
34
|
+
<%= bulk_action_link(
|
35
|
+
Spree.t("admin.bulk_ops.products.title.set_status", status: :archived),
|
36
|
+
spree.bulk_modal_admin_products_path(kind: :set_status, status: :archived),
|
37
|
+
icon: "archive",
|
38
|
+
url: spree.bulk_status_update_admin_products_path(status: :archived),
|
39
|
+
class: "dropdown-item"
|
40
|
+
) %>
|
41
|
+
|
59
42
|
<% if can?(:manage, Spree::Classification) %>
|
60
43
|
<div class="dropdown-divider"></div>
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
>
|
78
|
-
<%= icon("category-minus") %>
|
79
|
-
<%= Spree.t("admin.bulk_ops.products.title.remove_from_taxons") %>
|
80
|
-
</a>
|
44
|
+
|
45
|
+
<%= bulk_action_link(
|
46
|
+
Spree.t("admin.bulk_ops.products.title.add_to_taxons"),
|
47
|
+
spree.bulk_modal_admin_products_path(kind: :add_to_taxons),
|
48
|
+
icon: "category-plus",
|
49
|
+
url: spree.bulk_add_to_taxons_admin_products_path,
|
50
|
+
class: "dropdown-item"
|
51
|
+
) %>
|
52
|
+
|
53
|
+
<%= bulk_action_link(
|
54
|
+
Spree.t("admin.bulk_ops.products.title.remove_from_taxons"),
|
55
|
+
spree.bulk_modal_admin_products_path(kind: :remove_from_taxons),
|
56
|
+
icon: "category-minus",
|
57
|
+
url: spree.bulk_remove_from_taxons_admin_products_path,
|
58
|
+
class: "dropdown-item"
|
59
|
+
) %>
|
81
60
|
<% end %>
|
82
61
|
|
83
62
|
<% if can?(:manage_tags, Spree::Product) %>
|
84
63
|
<div class="dropdown-divider"></div>
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
>
|
102
|
-
<%= icon("tag-minus") %>
|
103
|
-
<%= Spree.t("admin.bulk_ops.products.title.remove_tags") %>
|
104
|
-
</a>
|
64
|
+
|
65
|
+
<%= bulk_action_link(
|
66
|
+
Spree.t("admin.bulk_ops.products.title.add_tags"),
|
67
|
+
spree.bulk_modal_admin_products_path(kind: :add_tags),
|
68
|
+
icon: "tag-plus",
|
69
|
+
url: spree.bulk_add_tags_admin_products_path,
|
70
|
+
class: "dropdown-item"
|
71
|
+
) %>
|
72
|
+
|
73
|
+
<%= bulk_action_link(
|
74
|
+
Spree.t("admin.bulk_ops.products.title.remove_tags"),
|
75
|
+
spree.bulk_modal_admin_products_path(kind: :remove_tags),
|
76
|
+
icon: "tag-minus",
|
77
|
+
url: spree.bulk_remove_tags_admin_products_path,
|
78
|
+
class: "dropdown-item"
|
79
|
+
) %>
|
105
80
|
<% end %>
|
106
81
|
</div>
|
107
82
|
</div>
|
108
83
|
|
109
|
-
|
110
|
-
|
111
|
-
<%= Spree.t("admin.products.selected") %>
|
112
|
-
</span>
|
113
|
-
|
114
|
-
<button
|
115
|
-
type="button"
|
116
|
-
class="btn-close ml-2"
|
117
|
-
data-dismiss="modal"
|
118
|
-
aria-label="<%= Spree.t(:close) %>"
|
119
|
-
data-action="bulk-operation#cancel"
|
120
|
-
/>
|
84
|
+
<%= bulk_operations_counter %>
|
85
|
+
<%= bulk_operations_close_button %>
|
121
86
|
</div>
|
122
87
|
</div>
|
@@ -1,4 +1,14 @@
|
|
1
|
-
|
1
|
+
<% frame_name ||= nil %>
|
2
|
+
|
3
|
+
<%= search_form_for product_list_filters_search_form_path,
|
4
|
+
class: "filter-wrap",
|
5
|
+
data: {
|
6
|
+
controller: "filters reveal",
|
7
|
+
reveal_hidden_class: "d-none",
|
8
|
+
filters_url_value: request.url
|
9
|
+
} do |f| %>
|
10
|
+
<%= hidden_field_tag :frame_name, frame_name if frame_name.present? %>
|
11
|
+
|
2
12
|
<div class="d-flex flex-column flex-lg-row gap-2">
|
3
13
|
<%= render 'spree/admin/shared/filters_search_bar', param: :multi_search %>
|
4
14
|
|
@@ -46,12 +56,7 @@
|
|
46
56
|
<%= render_admin_partials(:products_filters_partials, f: f) %>
|
47
57
|
</div>
|
48
58
|
|
49
|
-
|
50
|
-
<%= turbo_save_button_tag Spree.t(:filter_results) do %>
|
51
|
-
<%= icon("search") %>
|
52
|
-
<%= Spree.t(:filter_results) %>
|
53
|
-
<% end %>
|
54
|
-
</div>
|
59
|
+
<%= render 'spree/admin/shared/filter_submit' %>
|
55
60
|
</div>
|
56
61
|
|
57
62
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
@@ -9,15 +9,7 @@
|
|
9
9
|
<thead class="text-muted">
|
10
10
|
<tr>
|
11
11
|
<th scope="col" class="pr-0 w-5">
|
12
|
-
|
13
|
-
<input
|
14
|
-
type="checkbox"
|
15
|
-
class="custom-control-input"
|
16
|
-
id="checkAllMasterCheckbox"
|
17
|
-
data-bulk-operation-target="checkboxAll"
|
18
|
-
>
|
19
|
-
<label class="custom-control-label" for="checkAllMasterCheckbox"><span></span></label>
|
20
|
-
</div>
|
12
|
+
<%= bulk_operations_select_all_checkbox %>
|
21
13
|
</th>
|
22
14
|
<th scope="col">
|
23
15
|
<%= sort_link @search,
|
@@ -46,5 +38,5 @@
|
|
46
38
|
</div>
|
47
39
|
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
|
48
40
|
<% else %>
|
49
|
-
<%= render
|
41
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
50
42
|
<% end %>
|
@@ -1,9 +1,6 @@
|
|
1
1
|
<tr id="<%= dom_id product %>" data-controller="row-link">
|
2
2
|
<td class="pr-0 w-5">
|
3
|
-
|
4
|
-
<%= check_box_tag "ids[]", product.id, false, class: "custom-control-input", id: "ids_#{product.id}", data: { bulk_operation_target: "checkbox" } %>
|
5
|
-
<label class="custom-control-label" for="ids_<%= product.id %>"><span></span></label>
|
6
|
-
</div>
|
3
|
+
<%= bulk_operations_checkbox(product) %>
|
7
4
|
</td>
|
8
5
|
<td scope="row" class="w-40 py-0 text-wrap" data-action="click->row-link#openLink">
|
9
6
|
<%= link_to spree.edit_admin_product_path(product), class: 'd-flex align-items-center w-100 text-decoration-none h-100 py-2', data: { row_link_target: :link, 'turbo-frame': '_top' } do %>
|
@@ -1,11 +1,6 @@
|
|
1
1
|
<%= turbo_frame_tag :bulk_modal do %>
|
2
2
|
<div class="modal-content">
|
3
|
-
|
4
|
-
<h5 class="modal-title" id="exampleModalLabel">
|
5
|
-
<%= @title %>
|
6
|
-
</h5>
|
7
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
8
|
-
</div>
|
3
|
+
<%= modal_header(@title) %>
|
9
4
|
<div class="modal-body">
|
10
5
|
<p><%= @body %></p>
|
11
6
|
|
@@ -15,8 +10,8 @@
|
|
15
10
|
<%= tom_select_tag 'tags', multiple: true, class: 'w-100', options: tags_json_array, required: true, value_field: :name, create: params[:kind] == 'add_tags' %>
|
16
11
|
<% end %>
|
17
12
|
</div>
|
18
|
-
<div class="modal-footer
|
19
|
-
|
13
|
+
<div class="modal-footer">
|
14
|
+
<%= modal_discard_button %>
|
20
15
|
<%= turbo_save_button_tag %>
|
21
16
|
</div>
|
22
17
|
</div>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= render 'index_header' %>
|
2
2
|
|
3
|
-
<div class="card-lg
|
3
|
+
<div class="card-lg">
|
4
4
|
<% if params[:frame_name].present? %>
|
5
5
|
<%= turbo_frame_tag params[:frame_name], autoscroll: true, data: { autoscroll_block: :start, autoscroll_behavior: :smooth } do %>
|
6
|
-
<%= render 'filters' %>
|
6
|
+
<%= render 'filters', frame_name: params[:frame_name] %>
|
7
7
|
<%= render 'list' %>
|
8
8
|
<% end %>
|
9
9
|
<% else %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<p class="
|
16
|
-
Learn more about
|
17
|
-
<%= external_link_to 'managing products', 'https://spreecommerce.org/docs/user/manage-products'
|
15
|
+
<p class="documentation-link-container">
|
16
|
+
Learn more about
|
17
|
+
<%= external_link_to 'managing products', 'https://spreecommerce.org/docs/user/manage-products' %>
|
18
18
|
</p>
|
@@ -1,16 +1,11 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_with model: @promotion_action, url: spree.admin_promotion_actions_path(@promotion), method: :post, scope: :promotion_action do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= @promotion_action.human_name %>
|
10
|
-
<% end %>
|
11
|
-
</h5>
|
12
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
13
|
-
</div>
|
4
|
+
<% if @promotion_action.type.nil? %>
|
5
|
+
<%= modal_header(Spree.t(:add_action_of_type)) %>
|
6
|
+
<% else %>
|
7
|
+
<%= modal_header(@promotion_action.human_name) %>
|
8
|
+
<% end %>
|
14
9
|
<div class="modal-body">
|
15
10
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion_action } %>
|
16
11
|
<% if @promotion_action.type.nil? %>
|
@@ -38,8 +33,8 @@
|
|
38
33
|
<% end %>
|
39
34
|
</div>
|
40
35
|
<% if @promotion_action.type.present? %>
|
41
|
-
<div class="modal-footer
|
42
|
-
|
36
|
+
<div class="modal-footer">
|
37
|
+
<%= modal_discard_button %>
|
43
38
|
<%= turbo_save_button_tag Spree.t('actions.create'), data: { turbo_frame: '_top' } %>
|
44
39
|
</div>
|
45
40
|
<% end %>
|
@@ -1,16 +1,11 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_with model: @promotion_rule, url: spree.admin_promotion_rules_path(@promotion), method: :post, scope: :promotion_rule do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= @promotion_rule.human_name %>
|
10
|
-
<% end %>
|
11
|
-
</h5>
|
12
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
13
|
-
</div>
|
4
|
+
<% if @promotion_rule.type.nil? %>
|
5
|
+
<%= modal_header(Spree.t(:add_rule_of_type)) %>
|
6
|
+
<% else %>
|
7
|
+
<%= modal_header(@promotion_rule.human_name) %>
|
8
|
+
<% end %>
|
14
9
|
<div class="modal-body">
|
15
10
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion_rule } %>
|
16
11
|
<% if @promotion_rule.type.nil? %>
|
@@ -38,8 +33,8 @@
|
|
38
33
|
<% end %>
|
39
34
|
</div>
|
40
35
|
<% if @promotion_rule.type.present? %>
|
41
|
-
<div class="modal-footer
|
42
|
-
|
36
|
+
<div class="modal-footer">
|
37
|
+
<%= modal_discard_button %>
|
43
38
|
<%= turbo_save_button_tag Spree.t('actions.create'), data: { turbo_frame: '_top' } %>
|
44
39
|
</div>
|
45
40
|
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
|
2
|
+
<div class="d-flex flex-column flex-lg-row gap-2">
|
3
|
+
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
4
|
+
|
5
|
+
<div class="d-flex align-items-center justify-content-between">
|
6
|
+
<%= render "spree/admin/promotions/table_filter_dropdown" %>
|
7
|
+
|
8
|
+
<%= render 'spree/admin/shared/filters_button' %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div data-reveal-target="item" class="d-none" id="table-filter">
|
12
|
+
<div class="row">
|
13
|
+
<div class="col-12 col-lg-6">
|
14
|
+
<div class="form-group">
|
15
|
+
<%= label_tag :q_code_or_coupon_codes_code_eq, Spree.t(:code) %>
|
16
|
+
<%= f.search_field :code_or_coupon_codes_code_eq, class: "form-control", data: { filters_target: :input } %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<%= render 'spree/admin/shared/filter_submit' %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<%= render "spree/admin/shared/filter_badge_template" %>
|
25
|
+
|
26
|
+
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
27
|
+
<% end %>
|
@@ -3,41 +3,13 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%=
|
6
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_promotion), new_object_url, class: "btn btn-primary" %>
|
7
7
|
<% end if can?(:create, Spree::Promotion) %>
|
8
8
|
|
9
|
-
<div class="card-lg
|
10
|
-
<%=
|
11
|
-
<div class="d-flex flex-column flex-lg-row gap-2">
|
12
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
9
|
+
<div class="card-lg">
|
10
|
+
<%= render 'filters' %>
|
13
11
|
|
14
|
-
|
15
|
-
<%= render "spree/admin/promotions/table_filter_dropdown" %>
|
16
|
-
|
17
|
-
<%= render 'spree/admin/shared/filters_button' %>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<div data-reveal-target="item" class="d-none" id="table-filter">
|
21
|
-
<div class="row">
|
22
|
-
<div class="col-12 col-lg-6">
|
23
|
-
<div class="form-group">
|
24
|
-
<%= label_tag :q_code_or_coupon_codes_code_eq, Spree.t(:code) %>
|
25
|
-
<%= f.search_field :code_or_coupon_codes_code_eq, class: "form-control", data: { filters_target: :input } %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<div class="form-actions">
|
31
|
-
<%= button Spree.t(:filter_results), "search" %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
36
|
-
|
37
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<% if @promotions.any? %>
|
12
|
+
<% if @collection.any? %>
|
41
13
|
<div class="table-responsive">
|
42
14
|
<table class="table">
|
43
15
|
<thead class="text-muted">
|
@@ -47,15 +19,15 @@
|
|
47
19
|
<th><%= Spree.t(:kind) %></th>
|
48
20
|
<th><%= Spree.t(:usage_limit) %></th>
|
49
21
|
<th><%= Spree.t(:status) %></th>
|
50
|
-
<th
|
22
|
+
<th></th>
|
51
23
|
</tr>
|
52
24
|
</thead>
|
53
25
|
<tbody>
|
54
|
-
<%= render collection: @
|
26
|
+
<%= render collection: @collection, partial: "spree/admin/promotions/promotion", cached: spree_base_cache_scope %>
|
55
27
|
</tbody>
|
56
28
|
</table>
|
57
29
|
</div>
|
58
|
-
<%= render "spree/admin/shared/index_table_options", collection: @
|
30
|
+
<%= render "spree/admin/shared/index_table_options", collection: @collection %>
|
59
31
|
<% else %>
|
60
32
|
<%= render "spree/admin/shared/no_resource_found" %>
|
61
33
|
<% end %>
|
@@ -9,22 +9,19 @@
|
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<% content_for :page_actions do %>
|
12
|
-
<%=
|
12
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_property), new_object_url, class: "btn btn-primary" %>
|
13
13
|
<% end if can?(:create, Spree::Property) %>
|
14
14
|
|
15
|
-
<div class="card-lg
|
16
|
-
|
17
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap border-bottom", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
|
15
|
+
<div class="card-lg">
|
16
|
+
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
|
18
17
|
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
19
|
-
|
20
18
|
<%= render "spree/admin/shared/filter_badge_template" %>
|
21
|
-
|
22
19
|
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
23
20
|
<% end %>
|
24
21
|
|
25
22
|
<% if @properties.present? %>
|
26
23
|
<div class="table-responsive">
|
27
|
-
<table class="table"
|
24
|
+
<table class="table">
|
28
25
|
<thead class="text-muted">
|
29
26
|
<tr>
|
30
27
|
<th class="no-border handel-head"></th>
|
@@ -33,7 +30,7 @@
|
|
33
30
|
<th><%= Spree.t(:kind) %></th>
|
34
31
|
<th><%= Spree.t(:products) %></th>
|
35
32
|
<th><%= Spree.t(:visibility) %></th>
|
36
|
-
<th
|
33
|
+
<th></th>
|
37
34
|
</tr>
|
38
35
|
</thead>
|
39
36
|
<tbody
|
@@ -45,9 +42,13 @@
|
|
45
42
|
<%= render partial: "spree/admin/properties/property", collection: @collection, cached: spree_base_cache_scope %>
|
46
43
|
</tbody>
|
47
44
|
</table>
|
48
|
-
<%= render "spree/admin/shared/index_table_options", collection: @collection
|
45
|
+
<%= render "spree/admin/shared/index_table_options", collection: @collection %>
|
49
46
|
</div>
|
50
47
|
<% else %>
|
51
48
|
<%= render "spree/admin/shared/no_resource_found" %>
|
52
49
|
<% end %>
|
53
50
|
</div>
|
51
|
+
|
52
|
+
<p class="documentation-link-container">
|
53
|
+
<%= external_link_to "Learn more about properties", "https://spreecommerce.org/docs/user/manage-products/product-properties" %>
|
54
|
+
</p>
|
@@ -1,40 +1,42 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
|
-
<%=
|
2
|
+
<%= link_to_with_icon 'plus', Spree.t(:new_refund_reason), new_object_url, class: "btn btn-primary" %>
|
3
3
|
<% end if can? :create, Spree::RefundReason %>
|
4
4
|
|
5
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
|
-
|
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><%= Spree.t(:mutable) %></th>
|
16
|
+
<th></th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<% @collection.each do |refund_reason| %>
|
21
|
+
<tr id="<%= spree_dom_id refund_reason %>" data-controller="row-link" class="cursor-pointer">
|
22
|
+
<td class="w-40 align-center" data-action="click->row-link#openLink">
|
23
|
+
<%= refund_reason.name %>
|
24
|
+
</td>
|
25
|
+
<td class="w-20 align-center" data-action="click->row-link#openLink">
|
26
|
+
<%= active_badge(refund_reason.active, label: Spree.t(refund_reason.active? ? :active : :inactive)) %>
|
27
|
+
</td>
|
28
|
+
<td class="w-10 align-center" data-action="click->row-link#openLink">
|
29
|
+
<%= active_badge(refund_reason.mutable) %>
|
30
|
+
</td>
|
31
|
+
<td class="actions w-10" data-action="click->row-link#openLink">
|
32
|
+
<%= link_to_edit(refund_reason, no_text: true, data: { row_link_target: :link }) if can? :edit, refund_reason %>
|
33
|
+
</td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
36
|
+
</tbody>
|
37
|
+
</table>
|
38
|
+
</div>
|
39
|
+
<% else %>
|
40
|
+
<%= render 'spree/admin/shared/no_resource_found' %>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
@@ -1,18 +1,13 @@
|
|
1
1
|
<%= turbo_frame_tag :dialog_modal do %>
|
2
2
|
<%= form_for [:admin, @refund.payment.order, @refund.payment, @refund], data: { turbo_frame: '_top' } do |f| %>
|
3
3
|
<div class="modal-content">
|
4
|
-
|
5
|
-
<h5 class="modal-title" id="exampleModalLabel">
|
6
|
-
<%= Spree.t(:edit_refund) %>
|
7
|
-
</h5>
|
8
|
-
<button type="button" class="btn-close" data-dismiss="modal" aria-label="<%= Spree.t(:close) %>" />
|
9
|
-
</div>
|
4
|
+
<%= modal_header(Spree.t(:edit_refund)) %>
|
10
5
|
<div class="modal-body">
|
11
6
|
<%= render 'spree/admin/shared/error_messages', target: @refund %>
|
12
7
|
<%= render 'spree/admin/refunds/form', f: f %>
|
13
8
|
</div>
|
14
|
-
<div class="modal-footer
|
15
|
-
|
9
|
+
<div class="modal-footer">
|
10
|
+
<%= modal_discard_button %>
|
16
11
|
<%= turbo_save_button_tag %>
|
17
12
|
</div>
|
18
13
|
</div>
|