spree_admin 5.0.0.rc1 → 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 +22 -5
- data/app/assets/stylesheets/spree/admin/components/_modals.scss +1 -1
- data/app/assets/stylesheets/spree/admin/global/_variables.scss +8 -2
- data/app/assets/stylesheets/spree/admin/shared/_base.scss +12 -1
- data/app/controllers/spree/admin/dashboard_controller.rb +4 -1
- 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 +69 -63
- 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 +89 -11
- data/app/helpers/spree/admin/orders_helper.rb +0 -19
- data/app/helpers/spree/admin/stores_helper.rb +8 -36
- data/app/helpers/spree/admin/webhooks_subscribers_helper.rb +1 -1
- data/app/javascript/spree/admin/controllers/variants_form_controller.js +10 -3
- data/app/views/active_storage/_upload_form.html.erb +4 -8
- data/app/views/layouts/spree/admin.html.erb +4 -0
- 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/_sidebar.html.erb +2 -0
- data/app/views/spree/admin/dashboard/_top_products.html.erb +34 -24
- data/app/views/spree/admin/dashboard/analytics.html.erb +3 -1
- data/app/views/spree/admin/dashboard/show.html.erb +4 -8
- 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/_customer_summary.html.erb +0 -2
- data/app/views/spree/admin/orders/_filters.html.erb +3 -8
- data/app/views/spree/admin/orders/_header.html.erb +2 -0
- data/app/views/spree/admin/orders/_list.html.erb +2 -4
- data/app/views/spree/admin/orders/_summary.html.erb +1 -1
- 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/edit.html.erb +3 -5
- 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 +13 -8
- data/app/views/spree/admin/products/_form.html.erb +3 -3
- 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/edit.html.erb +3 -0
- data/app/views/spree/admin/products/form/_variants.html.erb +1 -0
- 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/_developers_nav.html.erb +2 -2
- data/app/views/spree/admin/shared/_filter_submit.html.erb +6 -0
- data/app/views/spree/admin/shared/_head.html.erb +3 -1
- 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/_posts_tabs.html.erb +2 -2
- 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/_returns_and_refunds_nav.html.erb +3 -3
- data/app/views/spree/admin/shared/_shipping_nav.html.erb +2 -2
- data/app/views/spree/admin/shared/_stock_nav.html.erb +2 -2
- data/app/views/spree/admin/shared/_tax_nav.html.erb +2 -2
- data/app/views/spree/admin/shared/_user.html.erb +2 -2
- data/app/views/spree/admin/shared/_user_dropdown.html.erb +2 -2
- data/app/views/spree/admin/shared/sidebar/_orders_nav.html.erb +19 -29
- data/app/views/spree/admin/shared/sidebar/_products_nav.html.erb +6 -25
- data/app/views/spree/admin/shared/sidebar/_returns_nav.html.erb +8 -15
- data/app/views/spree/admin/shared/sidebar/_store_dropdown.html.erb +36 -7
- data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +28 -52
- data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +19 -26
- 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/_basic.html.erb +2 -2
- 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/_variant.html.erb +8 -2
- data/app/views/spree/admin/variants/form/_media_asset.html.erb +1 -7
- data/app/views/spree/admin/variants/form/_pricing.html.erb +5 -4
- 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 -46
- data/lib/spree/admin/engine.rb +50 -0
- metadata +13 -14
- data/app/views/spree/admin/orders/_extra_filters.html.erb +0 -0
- data/app/views/spree/admin/products/_empty_list.html.erb +0 -1
- data/app/views/spree/admin/products/form/_extra_filters.html.erb +0 -0
- data/app/views/spree/admin/products/form/_extra_form.html.erb +0 -0
- data/app/views/spree/admin/products/form/_extra_form_sidebar.erb +0 -0
- data/app/views/spree/admin/stores/form/_custom.html.erb +0 -0
@@ -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>
|
@@ -6,6 +6,9 @@
|
|
6
6
|
spree.admin_product_digital_assets_path(@product),
|
7
7
|
class: "dropdown-item",
|
8
8
|
) if can?(:manage, Spree::Digital) %>
|
9
|
+
|
10
|
+
<%= render_admin_partials(:product_dropdown_partials, product: @product) %>
|
11
|
+
|
9
12
|
<div class="dropdown-divider"></div>
|
10
13
|
|
11
14
|
<%= external_page_preview_link(@product) %>
|
@@ -9,6 +9,7 @@
|
|
9
9
|
data-controller="variants-form"
|
10
10
|
class="variants-form"
|
11
11
|
data-action="product-form:toggle-quantity-tracked@window->variants-form#toggleQuantityTracked"
|
12
|
+
data-variants-form-locale-value="<%= I18n.locale %>"
|
12
13
|
<% if @product.persisted? %> data-variants-form-product-id-value="<%= @product.slug %>" <% end %>
|
13
14
|
data-variants-form-current-currency-value="<%= current_currency %>"
|
14
15
|
data-variants-form-currencies-value="<%= supported_currencies.map(&:to_s).to_json %>"
|
@@ -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>
|
@@ -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 %>
|