spree_admin 5.4.0.beta3 → 5.4.0.beta4
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/controllers/spree/admin/coupon_codes_controller.rb +6 -0
- data/app/controllers/spree/admin/gift_cards_controller.rb +0 -15
- data/app/helpers/spree/admin/orders_helper.rb +0 -18
- data/app/helpers/spree/admin/products_helper.rb +0 -27
- data/app/helpers/spree/admin/promotions_helper.rb +0 -11
- data/app/helpers/spree/admin/table_helper.rb +5 -2
- data/app/models/spree/admin/table/column.rb +1 -0
- data/app/views/spree/admin/coupon_codes/index.html.erb +2 -1
- data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/reimbursement_types/index.html.erb +1 -1
- data/app/views/spree/admin/return_authorization_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/config/initializers/spree_admin_tables.rb +384 -0
- metadata +6 -79
- data/app/views/spree/admin/coupon_codes/_filters.html.erb +0 -41
- data/app/views/spree/admin/coupon_codes/_table_header.html.erb +0 -0
- data/app/views/spree/admin/coupon_codes/_table_row.html.erb +0 -8
- data/app/views/spree/admin/coupon_codes/index.csv.erb +0 -14
- data/app/views/spree/admin/customer_returns/_filters.html.erb +0 -11
- data/app/views/spree/admin/customer_returns/_table_header.html.erb +0 -8
- data/app/views/spree/admin/customer_returns/_table_row.html.erb +0 -31
- data/app/views/spree/admin/gift_cards/_filters.html.erb +0 -53
- data/app/views/spree/admin/gift_cards/_gift_card.html.erb +0 -28
- data/app/views/spree/admin/gift_cards/_list.html.erb +0 -24
- data/app/views/spree/admin/gift_cards/_table_filter_dropdown.html.erb +0 -25
- data/app/views/spree/admin/metafield_definitions/_filters.html.erb +0 -18
- data/app/views/spree/admin/metafield_definitions/_table_header.html.erb +0 -11
- data/app/views/spree/admin/metafield_definitions/_table_row.html.erb +0 -22
- data/app/views/spree/admin/newsletter_subscribers/_filters.html.erb +0 -41
- data/app/views/spree/admin/newsletter_subscribers/_table_header.html.erb +0 -8
- data/app/views/spree/admin/newsletter_subscribers/_table_row.html.erb +0 -36
- data/app/views/spree/admin/option_types/_filters.html.erb +0 -7
- data/app/views/spree/admin/option_types/_table_header.html.erb +0 -19
- data/app/views/spree/admin/option_types/_table_row.html.erb +0 -19
- data/app/views/spree/admin/orders/_filters.html.erb +0 -116
- data/app/views/spree/admin/orders/_list.html.erb +0 -28
- data/app/views/spree/admin/orders/_order.html.erb +0 -28
- data/app/views/spree/admin/orders/_table_filter_dropdown.html.erb +0 -34
- data/app/views/spree/admin/policies/_filters.html.erb +0 -8
- data/app/views/spree/admin/policies/_table_header.html.erb +0 -8
- data/app/views/spree/admin/policies/_table_row.html.erb +0 -20
- data/app/views/spree/admin/price_lists/_table_header.html.erb +0 -7
- data/app/views/spree/admin/products/_filters.html.erb +0 -66
- data/app/views/spree/admin/products/_list.html.erb +0 -47
- data/app/views/spree/admin/products/_product.html.erb +0 -29
- data/app/views/spree/admin/products/_product_status.html.erb +0 -3
- data/app/views/spree/admin/products/_table_filter_dropdown.html.erb +0 -42
- data/app/views/spree/admin/promotions/_filters.html.erb +0 -29
- data/app/views/spree/admin/promotions/_table_filter_dropdown.html.erb +0 -17
- data/app/views/spree/admin/promotions/_table_header.html.erb +0 -7
- data/app/views/spree/admin/promotions/_table_row.html.erb +0 -31
- data/app/views/spree/admin/refund_reasons/_table_header.html.erb +0 -6
- data/app/views/spree/admin/refund_reasons/_table_row.html.erb +0 -14
- data/app/views/spree/admin/reimbursement_types/_table_header.html.erb +0 -7
- data/app/views/spree/admin/reimbursement_types/_table_row.html.erb +0 -17
- data/app/views/spree/admin/return_authorization_reasons/_table_header.html.erb +0 -5
- data/app/views/spree/admin/return_authorization_reasons/_table_row.html.erb +0 -18
- data/app/views/spree/admin/return_authorizations/_list.html.erb +0 -21
- data/app/views/spree/admin/return_authorizations/_table_header.html.erb +0 -6
- data/app/views/spree/admin/return_authorizations/_table_row.html.erb +0 -40
- data/app/views/spree/admin/return_authorizations/filters.html.erb +0 -34
- data/app/views/spree/admin/shipping_categories/_table_header.html.erb +0 -4
- data/app/views/spree/admin/shipping_categories/_table_row.html.erb +0 -8
- data/app/views/spree/admin/shipping_methods/_table_header.html.erb +0 -8
- data/app/views/spree/admin/shipping_methods/_table_row.html.erb +0 -33
- data/app/views/spree/admin/stock_items/_filters.html.erb +0 -35
- data/app/views/spree/admin/stock_items/_table_header.html.erb +0 -9
- data/app/views/spree/admin/stock_items/_table_row.html.erb +0 -43
- data/app/views/spree/admin/stock_locations/_table_header.html.erb +0 -9
- data/app/views/spree/admin/stock_locations/_table_row.html.erb +0 -36
- data/app/views/spree/admin/stock_transfers/_filters.html.erb +0 -49
- data/app/views/spree/admin/stock_transfers/_table_header.html.erb +0 -9
- data/app/views/spree/admin/stock_transfers/_table_row.html.erb +0 -11
- data/app/views/spree/admin/tax_categories/_table_header.html.erb +0 -7
- data/app/views/spree/admin/tax_categories/_table_row.html.erb +0 -13
- data/app/views/spree/admin/tax_rates/_table_header.html.erb +0 -9
- data/app/views/spree/admin/tax_rates/_table_row.html.erb +0 -15
- data/app/views/spree/admin/taxonomies/_table_header.html.erb +0 -6
- data/app/views/spree/admin/taxonomies/_table_row.html.erb +0 -16
- data/app/views/spree/admin/taxonomies/filters.html.erb +0 -6
- data/app/views/spree/admin/users/_filters.html.erb +0 -81
- data/app/views/spree/admin/webhook_deliveries/_table_header.html.erb +0 -8
- data/app/views/spree/admin/webhook_deliveries/_table_row.html.erb +0 -22
- data/app/views/spree/admin/webhook_endpoints/_table_header.html.erb +0 -7
- data/app/views/spree/admin/webhook_endpoints/_table_row.html.erb +0 -24
- data/app/views/spree/admin/zones/_table_header.html.erb +0 -8
- data/app/views/spree/admin/zones/_table_row.html.erb +0 -8
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: { controller: "filters" } do |f| %>
|
|
2
|
-
<div class="flex flex-col lg:flex-row gap-2">
|
|
3
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :email_cont, label: Spree.t(:email) %>
|
|
4
|
-
|
|
5
|
-
<%= dropdown do %>
|
|
6
|
-
<%= dropdown_toggle class: 'btn-light dropdown-toggle' do %>
|
|
7
|
-
<span class="text-gray-600 font-normal mr-1">
|
|
8
|
-
<%= Spree.t(:show) %>
|
|
9
|
-
</span>
|
|
10
|
-
<%# Show current filter value %>
|
|
11
|
-
<% current_value =
|
|
12
|
-
if params.dig(:q, :verified).to_s == 'true'
|
|
13
|
-
Spree.t('admin.newsletter_subscribers.verified')
|
|
14
|
-
elsif params.dig(:q, :unverified).to_s == 'true'
|
|
15
|
-
Spree.t('admin.newsletter_subscribers.unverified')
|
|
16
|
-
else
|
|
17
|
-
Spree.t('admin.newsletter_subscribers.all')
|
|
18
|
-
end
|
|
19
|
-
%>
|
|
20
|
-
<%= current_value %>
|
|
21
|
-
<% end %>
|
|
22
|
-
<%= dropdown_menu do %>
|
|
23
|
-
<%= active_link_to Spree.t('admin.newsletter_subscribers.all'),
|
|
24
|
-
params.to_unsafe_h.deep_merge(q: { verified: nil, unverified: nil }),
|
|
25
|
-
class: 'dropdown-item',
|
|
26
|
-
active: params.dig(:q, :verified).blank? && params.dig(:q, :unverified).blank? %>
|
|
27
|
-
<%= active_link_to Spree.t('admin.newsletter_subscribers.verified'),
|
|
28
|
-
params.to_unsafe_h.deep_merge(q: { verified: true, unverified: nil }),
|
|
29
|
-
class: 'dropdown-item',
|
|
30
|
-
active: params.dig(:q, :verified).to_s == 'true' %>
|
|
31
|
-
<%= active_link_to Spree.t('admin.newsletter_subscribers.unverified'),
|
|
32
|
-
params.to_unsafe_h.deep_merge(q: { verified: nil, unverified: true }),
|
|
33
|
-
class: 'dropdown-item',
|
|
34
|
-
active: params.dig(:q, :unverified).to_s == 'true' %>
|
|
35
|
-
<% end %>
|
|
36
|
-
<% end %>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
40
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
41
|
-
<% end %>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<tr>
|
|
2
|
-
<th scope="col"><%= sort_link @search, :email, Spree.t(:email) %></th>
|
|
3
|
-
<th scope="col"><%= Spree.t(:customer) %></th>
|
|
4
|
-
<th scope="col"><%= Spree.t(:verified) %>?</th>
|
|
5
|
-
<th scope="col"><%= Spree.t(:verified_at) %></th>
|
|
6
|
-
<th scope="col"><%= sort_link @search, :created_at, Spree.t(:created_at) %></th>
|
|
7
|
-
<th scope="col"></th>
|
|
8
|
-
</tr>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<tr id="<%= spree_dom_id newsletter_subscriber %>">
|
|
2
|
-
<td class="w-30">
|
|
3
|
-
<%= newsletter_subscriber.email %>
|
|
4
|
-
<%= clipboard_component(newsletter_subscriber.email) %>
|
|
5
|
-
</td>
|
|
6
|
-
<td class="w-1/4">
|
|
7
|
-
<% if newsletter_subscriber.user.present? %>
|
|
8
|
-
<%= link_to newsletter_subscriber.user.full_name, spree.admin_user_path(newsletter_subscriber.user) %>
|
|
9
|
-
<% else %>
|
|
10
|
-
<span class="text-gray-600"><%= Spree.t(:not_available) %></span>
|
|
11
|
-
<% end %>
|
|
12
|
-
</td>
|
|
13
|
-
<td class="w-10">
|
|
14
|
-
<%= active_badge(newsletter_subscriber.verified?) %>
|
|
15
|
-
</td>
|
|
16
|
-
<td class="w-15">
|
|
17
|
-
<% if newsletter_subscriber.verified_at.present? %>
|
|
18
|
-
<%= spree_date(newsletter_subscriber.verified_at) %>
|
|
19
|
-
<% else %>
|
|
20
|
-
<span class="text-gray-600"><%= Spree.t(:not_available) %></span>
|
|
21
|
-
<% end %>
|
|
22
|
-
</td>
|
|
23
|
-
<td class="w-15">
|
|
24
|
-
<%= spree_date(newsletter_subscriber.created_at) %>
|
|
25
|
-
</td>
|
|
26
|
-
<td class="w-5">
|
|
27
|
-
<%= dropdown do %>
|
|
28
|
-
<%= dropdown_toggle class: 'btn-light btn-sm' do %>
|
|
29
|
-
<%= icon('dots-vertical', class: 'mr-0') %>
|
|
30
|
-
<% end %>
|
|
31
|
-
<%= dropdown_menu do %>
|
|
32
|
-
<%= link_to_delete(newsletter_subscriber, icon: 'trash', class: 'dropdown-item text-danger') %>
|
|
33
|
-
<% end %>
|
|
34
|
-
<% end %>
|
|
35
|
-
</td>
|
|
36
|
-
</tr>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters"} do |f| %>
|
|
2
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
|
3
|
-
|
|
4
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
5
|
-
|
|
6
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
7
|
-
<% end %>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<tr>
|
|
2
|
-
<th class="no-border handel-head"></th>
|
|
3
|
-
<th scope="col"><%= Spree.t(:internal_name) %></th>
|
|
4
|
-
<th scope="col">
|
|
5
|
-
<%= Spree.t(:presentation) %>
|
|
6
|
-
<%= help_bubble("How this option is presented to customers") %>
|
|
7
|
-
</th>
|
|
8
|
-
<th scope="col">
|
|
9
|
-
<%= Spree.t(:filterable) %>
|
|
10
|
-
<%= help_bubble("Whether this option can be used in product filters") %>
|
|
11
|
-
</th>
|
|
12
|
-
<th scope="col">
|
|
13
|
-
<%= Spree.t(:option_values) %>
|
|
14
|
-
</th>
|
|
15
|
-
<th scope="col">
|
|
16
|
-
<%= Spree.t(:products) %>
|
|
17
|
-
</th>
|
|
18
|
-
<th scope="col"></th>
|
|
19
|
-
</tr>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<tr id="<%= spree_dom_id option_type %>" data-controller="row-link" data-sortable-update-url="<%= spree.admin_option_type_path(option_type) %>">
|
|
2
|
-
<td class="move-handle text-center w-5">
|
|
3
|
-
<%= icon('grip-vertical', class: 'rounded-md hover:bg-gray-100 p-2') %>
|
|
4
|
-
</td>
|
|
5
|
-
<td class="w-20 cursor-pointer" data-action="click->row-link#openLink"><code><%= option_type.name %></code></td>
|
|
6
|
-
<td class="w-35 cursor-pointer font-bold" data-action="click->row-link#openLink"><%= option_type.presentation %></td>
|
|
7
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
8
|
-
<%= active_badge(option_type.filterable) %>
|
|
9
|
-
</td>
|
|
10
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
11
|
-
<%= option_type.option_values.count %>
|
|
12
|
-
</td>
|
|
13
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
14
|
-
<%= option_type.products.count %>
|
|
15
|
-
</td>
|
|
16
|
-
<td class="w-10 actions cursor-pointer">
|
|
17
|
-
<%= link_to_edit option_type, data: { row_link_target: :link, turbo_frame: '_top' } %>
|
|
18
|
-
</td>
|
|
19
|
-
</tr>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<% frame_name ||= nil %>
|
|
2
|
-
|
|
3
|
-
<% search_form_path = if @user.present?
|
|
4
|
-
spree.admin_user_orders_path(@user)
|
|
5
|
-
elsif @vendor.present? && spree.respond_to?(:admin_vendor_orders_path)
|
|
6
|
-
spree.admin_vendor_orders_path(@vendor)
|
|
7
|
-
elsif controller_name == 'checkouts'
|
|
8
|
-
spree.admin_checkouts_path
|
|
9
|
-
else
|
|
10
|
-
spree.admin_orders_path
|
|
11
|
-
end %>
|
|
12
|
-
|
|
13
|
-
<%= search_form_for [:admin, @vendor || @user, @search],
|
|
14
|
-
url: search_form_path,
|
|
15
|
-
class: "filter-wrap",
|
|
16
|
-
data: {
|
|
17
|
-
controller: "filters dialog",
|
|
18
|
-
filters_url_value: request.url
|
|
19
|
-
} do |f| %>
|
|
20
|
-
<%= hidden_field_tag :frame_name, frame_name if frame_name.present? %>
|
|
21
|
-
|
|
22
|
-
<div class="flex flex-col lg:flex-row gap-2">
|
|
23
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :multi_search %>
|
|
24
|
-
|
|
25
|
-
<% if controller_name == 'checkouts' %>
|
|
26
|
-
<%= render "spree/admin/shared/calendar_range_picker",
|
|
27
|
-
date_from_input_name: "q[created_at_gt]",
|
|
28
|
-
date_to_input_name: "q[created_at_lt]",
|
|
29
|
-
date_from_value: params.dig(:q, :created_at_gt),
|
|
30
|
-
date_to_value: params.dig(:q, :created_at_lt) %>
|
|
31
|
-
<% else %>
|
|
32
|
-
<%= render "spree/admin/shared/calendar_range_picker",
|
|
33
|
-
date_from_input_name: "q[completed_at_gt]",
|
|
34
|
-
date_to_input_name: "q[completed_at_lt]",
|
|
35
|
-
date_from_value: params.dig(:q, :completed_at_gt),
|
|
36
|
-
date_to_value: params.dig(:q, :completed_at_lt) %>
|
|
37
|
-
<% end %>
|
|
38
|
-
|
|
39
|
-
<%= render "spree/admin/orders/table_filter_dropdown" %>
|
|
40
|
-
<%= button_tag type: 'button', class: 'btn btn-light flex items-center', data: { action: 'dialog#open' } do %>
|
|
41
|
-
<%= icon "adjustments", class: "mr-1" %>
|
|
42
|
-
<%= Spree.t("admin.filters") %>
|
|
43
|
-
<% end %>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<%= drawer(id: 'order-filters-drawer', controller_name: 'dialog') do %>
|
|
47
|
-
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
48
|
-
<div class="drawer-body">
|
|
49
|
-
<%= f.hidden_field :payment_state_not_eq, value: params.dig(:q, :payment_state_not_eq) %>
|
|
50
|
-
<%= f.hidden_field :state_not_eq, value: params.dig(:q, :state_not_eq) %>
|
|
51
|
-
<%= f.hidden_field :user_id_eq, value: @user.try(:id) %>
|
|
52
|
-
<%= f.hidden_field :shipment_state_eq, value: params.dig(:q, :shipment_state_eq) %>
|
|
53
|
-
<% Array(params.dig(:q, :shipment_state_not_in)).each do |state| %>
|
|
54
|
-
<%= hidden_field_tag 'q[shipment_state_not_in][]', state %>
|
|
55
|
-
<% end %>
|
|
56
|
-
<%= f.hidden_field :state_eq, value: params.dig(:q, :state_eq) %>
|
|
57
|
-
<% Array(params.dig(:q, :state_in)).each do |state| %>
|
|
58
|
-
<%= hidden_field_tag 'q[state_in][]', state %>
|
|
59
|
-
<% end %>
|
|
60
|
-
<%= f.hidden_field :refunded, value: params.dig(:q, :refunded) %>
|
|
61
|
-
<%= f.hidden_field :partially_refunded, value: params.dig(:q, :partially_refunded) %>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<% unless @user %>
|
|
65
|
-
<div class="form-group">
|
|
66
|
-
<%= label_tag :q_bill_address_firstname_i_cont_any, Spree.t(:first_name) %>
|
|
67
|
-
<%= f.text_field :bill_address_firstname_i_cont_any, class: "form-input", data: { filters_target: :input } %>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="form-group">
|
|
70
|
-
<%= label_tag :q_bill_address_lastname_eq, Spree.t(:last_name) %>
|
|
71
|
-
<%= f.text_field :bill_address_lastname_eq, class: "form-input", data: { filters_target: :input } %>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="form-group">
|
|
74
|
-
<%= label_tag :q_email_eq, Spree.t(:email) %>
|
|
75
|
-
<%= f.email_field :email_eq, class: "form-input", data: { filters_target: :input } %>
|
|
76
|
-
</div>
|
|
77
|
-
<% end %>
|
|
78
|
-
<div class="form-group">
|
|
79
|
-
<%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
|
|
80
|
-
<%= f.text_field :line_items_variant_sku_eq, class: "form-input", data: { filters_target: :input } %>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div class="form-group">
|
|
84
|
-
<%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
|
|
85
|
-
<%= f.select :promotions_id_in,
|
|
86
|
-
Spree::Promotion.applied.pluck(:name, :id),
|
|
87
|
-
{ include_blank: true },
|
|
88
|
-
data: {
|
|
89
|
-
controller: "autocomplete-select",
|
|
90
|
-
filters_target: :input,
|
|
91
|
-
} %>
|
|
92
|
-
</div>
|
|
93
|
-
<div class="form-group">
|
|
94
|
-
<%= label_tag :q_payment_state_eq, Spree.t(:payment_state) %>
|
|
95
|
-
<% payment_state_options = Spree::Order::PAYMENT_STATES.map { |state| [Spree.t("payment_states.#{state}"), state] } %>
|
|
96
|
-
<% payment_state_options += [
|
|
97
|
-
[Spree.t('payment_states.refunded'), 'refunded'],
|
|
98
|
-
[Spree.t('payment_states.partially_refunded'), 'partially_refunded']
|
|
99
|
-
] %>
|
|
100
|
-
<%= f.select :payment_state_eq,
|
|
101
|
-
payment_state_options,
|
|
102
|
-
{ include_blank: true },
|
|
103
|
-
{ class: "form-select", data: { filters_target: :input } } %>
|
|
104
|
-
</div>
|
|
105
|
-
|
|
106
|
-
<%= render_admin_partials(:orders_filters_partials, f: f) %>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="drawer-footer">
|
|
109
|
-
<%= drawer_discard_button('dialog') %>
|
|
110
|
-
<%= render 'spree/admin/shared/filter_submit' %>
|
|
111
|
-
</div>
|
|
112
|
-
<% end %>
|
|
113
|
-
|
|
114
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
115
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
116
|
-
<% end %>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<% if @collection.any? %>
|
|
2
|
-
<div class="table-responsive">
|
|
3
|
-
<table class="table" id="listing_orders">
|
|
4
|
-
<thead>
|
|
5
|
-
<tr>
|
|
6
|
-
<th scope="col"><%= I18n.t(:number, scope: 'activerecord.attributes.spree/order') %></th>
|
|
7
|
-
<% if controller_name == 'orders' %>
|
|
8
|
-
<th scope="col"><%= sort_link @search, :completed_at, Spree.t(:date) %></th>
|
|
9
|
-
<% else %>
|
|
10
|
-
<th scope="col"><%= sort_link @search, :created_at, Spree.t(:date) %></th>
|
|
11
|
-
<% end %>
|
|
12
|
-
<th class="d-customer"><%= Spree.t(:customer) %></th>
|
|
13
|
-
<th scope="col"><%= Spree.t(:package_from) %></th>
|
|
14
|
-
<th scope="col"><%= I18n.t(:payment_state, scope: 'activerecord.attributes.spree/order') %></th>
|
|
15
|
-
<th scope="col"><%= I18n.t(:shipment_state, scope: 'activerecord.attributes.spree/order') %></th>
|
|
16
|
-
<th class="text-right"><%= sort_link @search, :item_count, I18n.t(:item_count, scope: 'activerecord.attributes.spree/order') %></th>
|
|
17
|
-
<th class="text-right"><%= sort_link @search, :total, I18n.t(:total, scope: 'activerecord.attributes.spree/order') %></th>
|
|
18
|
-
</tr>
|
|
19
|
-
</thead>
|
|
20
|
-
<tbody>
|
|
21
|
-
<%= render collection: @collection, partial: 'spree/admin/orders/order', cached: !(defined?(current_vendor) && current_vendor) ? spree_base_cache_scope : false %>
|
|
22
|
-
</tbody>
|
|
23
|
-
</table>
|
|
24
|
-
</div>
|
|
25
|
-
<% else %>
|
|
26
|
-
<%= render 'spree/admin/shared/no_resource_found', new_object_url: nil, model_class: Spree::Order %>
|
|
27
|
-
<% end %>
|
|
28
|
-
<%= render 'spree/admin/shared/index_table_options', collection: @collection %>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<tr id="<%= dom_id(order) %>" data-controller="row-link">
|
|
2
|
-
<td class="p-0 w-10">
|
|
3
|
-
<%= link_to order.number, spree.edit_admin_order_path(order), class: 'font-bolder block p-2 px-4 no-underline', data: { 'turbo-frame': '_top', row_link_target: :link } %>
|
|
4
|
-
</td>
|
|
5
|
-
<td class="w-15 cursor-pointer" data-action="click->row-link#openLink">
|
|
6
|
-
<%= spree_time_ago(order.completed? ? order.completed_at : order.created_at, format: '%b %e, %Y %l:%M%P') %>
|
|
7
|
-
</td>
|
|
8
|
-
<td class="d-customer w-15 cursor-pointer" data-action="click->row-link#openLink">
|
|
9
|
-
<%= render 'spree/admin/orders/customer_summary', order: order %>
|
|
10
|
-
</td>
|
|
11
|
-
<td class="whitespace-normal w-20 cursor-pointer" data-action="click->row-link#openLink">
|
|
12
|
-
<% order.shipments.map(&:stock_location).compact.uniq.each_with_index do |stock_location, index| %>
|
|
13
|
-
<% if index > 0 %>, <% end %><%= stock_location.name %>
|
|
14
|
-
<% end %>
|
|
15
|
-
</td>
|
|
16
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
17
|
-
<%= order_payment_state(order) %>
|
|
18
|
-
</td>
|
|
19
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
20
|
-
<%= order_shipment_state(order) %>
|
|
21
|
-
</td>
|
|
22
|
-
<td class="text-right w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
23
|
-
<%= pluralize(order.item_count, 'item') %>
|
|
24
|
-
</td>
|
|
25
|
-
<td class="text-right w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
26
|
-
<%= order.display_total.to_html %>
|
|
27
|
-
</td>
|
|
28
|
-
</tr>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<% if controller_name == 'orders' %>
|
|
2
|
-
<%= dropdown do %>
|
|
3
|
-
<%= dropdown_toggle class: 'btn-light dropdown-toggle' do %>
|
|
4
|
-
<span class="text-gray-600 font-normal mr-1">
|
|
5
|
-
<%= Spree.t(:show) %>
|
|
6
|
-
</span>
|
|
7
|
-
<%= order_filter_dropdown_value %>
|
|
8
|
-
<% end %>
|
|
9
|
-
<%= dropdown_menu do %>
|
|
10
|
-
<%= active_link_to Spree.t('admin.orders.all_orders'), params.to_unsafe_h.deep_merge({q: {shipment_state_eq: '', shipment_state_not_in: '', state_eq: '', state_in: '', refunded: '', partially_refunded: '' }}), class: 'dropdown-item', active: (params[:q] || {}).values_at(*%w[payment_state_not_eq shipment_state_not_in shipment_state_eq state_eq state_in refunded partially_refunded] ).all?(&:blank?) %>
|
|
11
|
-
<%= link_to params.to_unsafe_h.deep_merge({q: {shipment_state_not_in: [:shipped, :canceled], shipment_state_eq: '', state_eq: '', state_in: '', refunded: '', partially_refunded: ''}}),
|
|
12
|
-
class: "dropdown-item flex items-center justify-between #{'active' if params[:q][:shipment_state_not_in] == ['shipped', 'canceled']}" do %>
|
|
13
|
-
<%= Spree.t('admin.orders.unfulfilled') %>
|
|
14
|
-
<% if ready_to_ship_orders_count&.positive? %>
|
|
15
|
-
<span class="badge badge-light ml-2">
|
|
16
|
-
<%= ready_to_ship_orders_count %>
|
|
17
|
-
</span>
|
|
18
|
-
<% end %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<%= link_to Spree.t('admin.orders.fulfilled'),
|
|
21
|
-
params.to_unsafe_h.deep_merge({q: {shipment_state_eq: :shipped, shipment_state_not_in: '', state_eq: '', state_in: '', refunded: '', partially_refunded: ''}}),
|
|
22
|
-
class: "dropdown-item #{'active' if params[:q][:shipment_state_eq] == 'shipped'}" %>
|
|
23
|
-
<%= link_to Spree.t('admin.orders.canceled'),
|
|
24
|
-
params.to_unsafe_h.deep_merge({q: {state_eq: nil, state_in: [:canceled, :partially_canceled], shipment_state_not_in: '', shipment_state_eq: '', refunded: '', partially_refunded: ''}}),
|
|
25
|
-
class: "dropdown-item #{'active' if params[:q][:state_in] == ['canceled','partially_canceled']}" %>
|
|
26
|
-
<%= link_to Spree.t('admin.orders.refunded'),
|
|
27
|
-
params.to_unsafe_h.deep_merge({q: {refunded: '1', shipment_state_not_in: '', shipment_state_eq: '', state_eq: '', state_in: '', partially_refunded: ''}}),
|
|
28
|
-
class: "dropdown-item #{'active' if params.dig(:q, :refunded) && params[:q][:refunded].present?}" %>
|
|
29
|
-
<%= link_to Spree.t('admin.orders.partially_refunded'),
|
|
30
|
-
params.to_unsafe_h.deep_merge({q: {partially_refunded: '1', shipment_state_not_in: '', shipment_state_eq: '', state_eq: '', state_in: '', refunded: '' }}),
|
|
31
|
-
class: "dropdown-item #{'active' if params.dig(:q, :partially_refunded) && params[:q][:partially_refunded].present?}" %>
|
|
32
|
-
<% end %>
|
|
33
|
-
<% end %>
|
|
34
|
-
<% end %>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: { controller: "filters" } do |f| %>
|
|
2
|
-
<div class="flex flex-col lg:flex-row gap-2">
|
|
3
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :name_i_cont, label: Spree.t(:name) %>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
7
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
8
|
-
<% end %>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<tr>
|
|
2
|
-
<th scope="col"><%= Spree.t(:name) %></th>
|
|
3
|
-
<th scope="col"><%= Spree.t(:slug) %></th>
|
|
4
|
-
<th scope="col"><%= Spree.t(:filled) %></th>
|
|
5
|
-
<th scope="col"><%= Spree.t(:updated_at) %></th>
|
|
6
|
-
<th scope="col"><%= I18n.t('activerecord.attributes.spree/policy.owner') %></th>
|
|
7
|
-
<th scope="col"></th>
|
|
8
|
-
</tr>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<tr id="<%= spree_dom_id policy %>" data-controller="row-link">
|
|
2
|
-
<td class="w-30 cursor-pointer" data-action="click->row-link#openLink">
|
|
3
|
-
<%= link_to policy.name, spree.edit_admin_policy_path(policy.id), class: 'no-underline flex items-center font-bold text-gray-900', data: { row_link_target: :link, turbo_frame: '_top' } %>
|
|
4
|
-
</td>
|
|
5
|
-
<td class="w-1/4 cursor-pointer" data-action="click->row-link#openLink">
|
|
6
|
-
<code><%= policy.slug %></code>
|
|
7
|
-
</td>
|
|
8
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
9
|
-
<%= active_badge(policy.with_body?) %>
|
|
10
|
-
</td>
|
|
11
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
12
|
-
<%= spree_time(policy.updated_at) %>
|
|
13
|
-
</td>
|
|
14
|
-
<td class="w-15 cursor-pointer" data-action="click->row-link#openLink">
|
|
15
|
-
<%= policy.owner.name %>
|
|
16
|
-
</td>
|
|
17
|
-
<td class="w-10 actions">
|
|
18
|
-
<%= link_to_edit(policy, url: spree.edit_admin_policy_path(policy.id), class: 'btn btn-light btn-sm', data: { turbo_frame: '_top' }) if can?(:edit, policy) %>
|
|
19
|
-
</td>
|
|
20
|
-
</tr>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<tr>
|
|
2
|
-
<th class="no-border handel-head"></th>
|
|
3
|
-
<th scope="col"><%= sort_link @search, :name, Spree.t(:name) %></th>
|
|
4
|
-
<th scope="col"><%= Spree.t(:status) %></th>
|
|
5
|
-
<th scope="col"><%= Spree.t(:starts_at) %></th>
|
|
6
|
-
<th scope="col"><%= Spree.t(:ends_at) %></th>
|
|
7
|
-
</tr>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<% frame_name ||= nil %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<%= search_form_for product_list_filters_search_form_path,
|
|
5
|
-
class: "filter-wrap",
|
|
6
|
-
data: {
|
|
7
|
-
controller: "filters dialog",
|
|
8
|
-
filters_url_value: request.url
|
|
9
|
-
} do |f| %>
|
|
10
|
-
<%= hidden_field_tag :frame_name, frame_name if frame_name.present? %>
|
|
11
|
-
|
|
12
|
-
<div class="flex flex-col lg:flex-row gap-2">
|
|
13
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :multi_search %>
|
|
14
|
-
<%= render "spree/admin/products/table_filter_dropdown" %>
|
|
15
|
-
<%= button_tag type: 'button', class: 'btn btn-light flex items-center', data: { action: 'dialog#open' } do %>
|
|
16
|
-
<%= icon "adjustments", class: "mr-1" %>
|
|
17
|
-
<%= Spree.t("admin.filters") %>
|
|
18
|
-
<% end %>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<%= drawer(id: 'product-filters-drawer', controller_name: 'dialog') do %>
|
|
22
|
-
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
23
|
-
<div class="drawer-body">
|
|
24
|
-
<%= f.hidden_field :status_eq, value: params.dig(:q, :status_eq) %>
|
|
25
|
-
<div class="form-group">
|
|
26
|
-
<%= f.label :taxons_id_in, Spree.t(:taxons) %>
|
|
27
|
-
<% @categories = current_store.taxons.where(id: params.dig(:q, :taxons_id_in)).pluck(:pretty_name, :id) if params.dig(
|
|
28
|
-
:q,
|
|
29
|
-
:taxons_id_in,
|
|
30
|
-
) %>
|
|
31
|
-
<%= tom_select_tag "q[taxons_id_in]",
|
|
32
|
-
multiple: true,
|
|
33
|
-
preloaded_options: @categories,
|
|
34
|
-
active_option: params.dig(:q, :taxons_id_in),
|
|
35
|
-
empty_option: Spree.t(:without_taxon),
|
|
36
|
-
url: spree.admin_taxons_select_options_path(format: :json),
|
|
37
|
-
select_data: {
|
|
38
|
-
filters_target: "input",
|
|
39
|
-
} %>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<div class="form-group">
|
|
43
|
-
<%= f.label :tags_name_in, Spree.t(:tags) %>
|
|
44
|
-
<%= tom_select_tag "q[tags_name_in]",
|
|
45
|
-
active_option: params[:q][:tags_name_in],
|
|
46
|
-
options: tags_json_array,
|
|
47
|
-
multiple: true,
|
|
48
|
-
value_field: :name,
|
|
49
|
-
select_class: "w-full",
|
|
50
|
-
select_data: {
|
|
51
|
-
filters_target: "input",
|
|
52
|
-
} %>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<%= render_admin_partials(:products_filters_partials, f: f) %>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="drawer-footer">
|
|
58
|
-
<%= drawer_discard_button('dialog') %>
|
|
59
|
-
<%= render 'spree/admin/shared/filter_submit' %>
|
|
60
|
-
</div>
|
|
61
|
-
<% end %>
|
|
62
|
-
|
|
63
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
64
|
-
|
|
65
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
66
|
-
<% end %>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<% if @collection.any? %>
|
|
2
|
-
<div data-controller="bulk-operation bulk-dialog" data-action="keydown.esc->bulk-operation#cancel" tabindex="0">
|
|
3
|
-
<%= form_tag spree.admin_products_path, method: :put, data: { 'bulk-operation-target': 'form' } do %>
|
|
4
|
-
<%= render 'spree/admin/shared/bulk_modal' %>
|
|
5
|
-
<%= render 'spree/admin/products/bulk_operations' %>
|
|
6
|
-
|
|
7
|
-
<div class="table-responsive">
|
|
8
|
-
<table class="table" id="listing_products">
|
|
9
|
-
<thead>
|
|
10
|
-
<tr>
|
|
11
|
-
<th scope="col" class="pr-0 w-5">
|
|
12
|
-
<%= bulk_operations_select_all_checkbox %>
|
|
13
|
-
</th>
|
|
14
|
-
<th scope="col">
|
|
15
|
-
<%= sort_link @search,
|
|
16
|
-
:name,
|
|
17
|
-
Spree.t(:name),
|
|
18
|
-
{
|
|
19
|
-
default_order: "desc",
|
|
20
|
-
title: "admin_products_listing_name_title"
|
|
21
|
-
}
|
|
22
|
-
%>
|
|
23
|
-
</th>
|
|
24
|
-
<th scope="col" class="text-center">
|
|
25
|
-
<%= Spree.t(:status) %>
|
|
26
|
-
<%= help_bubble(Spree.t("admin.products.help_bubble")) %>
|
|
27
|
-
</th>
|
|
28
|
-
<th scope="col"><%= Spree.t(:inventory) %></th>
|
|
29
|
-
<% if defined?(current_vendor) %>
|
|
30
|
-
<th scope="col" class="d-vendor"><%= Spree.t(:vendor) %></th>
|
|
31
|
-
<% end %>
|
|
32
|
-
<th scope="col"><%= Spree.t(:price) %></th>
|
|
33
|
-
|
|
34
|
-
<%= render_admin_partials(:products_table_header_partials) %>
|
|
35
|
-
</tr>
|
|
36
|
-
</thead>
|
|
37
|
-
<tbody>
|
|
38
|
-
<%= render partial: 'spree/admin/products/product', collection: @collection, cached: spree_base_cache_scope %>
|
|
39
|
-
</tbody>
|
|
40
|
-
</table>
|
|
41
|
-
</div>
|
|
42
|
-
<% end %>
|
|
43
|
-
</div>
|
|
44
|
-
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
|
|
45
|
-
<% else %>
|
|
46
|
-
<%= render 'spree/admin/shared/no_resource_found' %>
|
|
47
|
-
<% end %>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<tr id="<%= dom_id product %>" data-controller="row-link">
|
|
2
|
-
<td class="pr-0 w-5">
|
|
3
|
-
<%= bulk_operations_checkbox(product) %>
|
|
4
|
-
</td>
|
|
5
|
-
<td scope="row" class="w-40 py-0 whitespace-normal" data-action="click->row-link#openLink">
|
|
6
|
-
<%= link_to spree.edit_admin_product_path(product), class: 'flex items-center w-full no-underline h-full py-2', data: { row_link_target: :link, 'turbo-frame': '_top' } do %>
|
|
7
|
-
<div class="mr-6">
|
|
8
|
-
<%= render 'spree/admin/shared/product_image', object: product %>
|
|
9
|
-
</div>
|
|
10
|
-
<span class="text-gray-900 font-medium">
|
|
11
|
-
<%= product.name %>
|
|
12
|
-
</span>
|
|
13
|
-
<% end %>
|
|
14
|
-
</td>
|
|
15
|
-
<%= render 'spree/admin/products/product_status', product: product %>
|
|
16
|
-
<td class="w-20 cursor-pointer whitespace-normal" data-action="click->row-link#openLink">
|
|
17
|
-
<%= display_inventory(product) %>
|
|
18
|
-
</td>
|
|
19
|
-
<% if defined?(current_vendor) %>
|
|
20
|
-
<td class="d-vendor w-15 cursor-pointer" data-action="click->row-link#openLink">
|
|
21
|
-
<%= product.vendor&.name %>
|
|
22
|
-
</td>
|
|
23
|
-
<% end %>
|
|
24
|
-
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
|
|
25
|
-
<%= display_admin_price(product) %>
|
|
26
|
-
</td>
|
|
27
|
-
|
|
28
|
-
<%= render_admin_partials(:products_table_row_partials, product: product) %>
|
|
29
|
-
</tr>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<%= dropdown do %>
|
|
2
|
-
<%= dropdown_toggle class: 'btn-light dropdown-toggle' do %>
|
|
3
|
-
<span class="text-gray-600 font-normal mr-1">
|
|
4
|
-
<%= Spree.t(:show) %>
|
|
5
|
-
</span>
|
|
6
|
-
<% if product_filter_status_dropdown_value == Spree.t('admin.products.all_statuses') && product_filter_stock_dropdown_value == Spree.t('admin.products.any_stock') %>
|
|
7
|
-
<%= Spree.t(:all_products) %>
|
|
8
|
-
<% else %>
|
|
9
|
-
<%= product_filter_status_dropdown_value if product_filter_status_dropdown_value != Spree.t('admin.products.all_statuses') %>
|
|
10
|
-
<% if product_filter_status_dropdown_value != Spree.t('admin.products.all_statuses') && product_filter_stock_dropdown_value != Spree.t('admin.products.any_stock') %>
|
|
11
|
-
and
|
|
12
|
-
<% end %>
|
|
13
|
-
<%= product_filter_stock_dropdown_value if product_filter_stock_dropdown_value != Spree.t('admin.products.any_stock') %>
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
16
|
-
<%= dropdown_menu do %>
|
|
17
|
-
<h6 class="dropdown-header"><%= Spree.t('admin.products.by_status') %>:</h6>
|
|
18
|
-
|
|
19
|
-
<%= active_link_to Spree.t('admin.products.all_statuses'), params.to_unsafe_h.deep_merge({page: nil, q: {status_eq: nil}}), class: 'dropdown-item', active: (params[:q] || {}).values_at(*%w[status_eq in_stock out_of_stock] ).all?(&:blank?) %>
|
|
20
|
-
<%= link_to Spree.t('admin.products.active'),
|
|
21
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {status_eq: :active}}),
|
|
22
|
-
class: "dropdown-item #{'active' if params[:q][:status_eq] == 'active'}" %>
|
|
23
|
-
<%= link_to Spree.t('admin.products.draft'),
|
|
24
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {status_eq: :draft}}),
|
|
25
|
-
class: "dropdown-item #{'active' if params[:q][:status_eq] == 'draft'}" %>
|
|
26
|
-
<%= link_to Spree.t('admin.products.archived'),
|
|
27
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {status_eq: :archived}}),
|
|
28
|
-
class: "dropdown-item #{'active' if params[:q][:status_eq] == 'archived'}" %>
|
|
29
|
-
|
|
30
|
-
<div class="dropdown-divider"></div>
|
|
31
|
-
|
|
32
|
-
<h6 class="dropdown-header"><%= Spree.t('admin.products.by_stock') %>:</h6>
|
|
33
|
-
|
|
34
|
-
<%= active_link_to Spree.t('admin.products.any_stock'), params.to_unsafe_h.deep_merge({page: nil, q: {in_stock: nil, out_of_stock: nil}}), class: 'dropdown-item', active: (params[:q] || {}).values_at(*%w[status_eq in_stock out_of_stock] ).all?(&:blank?) %>
|
|
35
|
-
<%= link_to Spree.t('admin.products.in_stock'),
|
|
36
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {in_stock: '1', out_of_stock: nil}}),
|
|
37
|
-
class: "dropdown-item #{'active' if params[:q][:in_stock] == '1'}" %>
|
|
38
|
-
<%= link_to Spree.t('admin.products.out_of_stock'),
|
|
39
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {out_of_stock: '1', in_stock: nil}}),
|
|
40
|
-
class: "dropdown-item #{'active' if params[:q][:out_of_stock] == '1'}" %>
|
|
41
|
-
<% end %>
|
|
42
|
-
<% end %>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<%= search_form_for [:admin, @search], class: "filter-wrap", data: {controller: "filters dialog"} do |f| %>
|
|
2
|
-
<div class="flex flex-col lg:flex-row gap-2">
|
|
3
|
-
<%= render 'spree/admin/shared/filters_search_bar', param: :name_cont, label: Spree.t(:name) %>
|
|
4
|
-
<%= render "spree/admin/promotions/table_filter_dropdown" %>
|
|
5
|
-
<%= button_tag type: 'button', class: 'btn btn-light flex items-center', data: { action: 'dialog#open' } do %>
|
|
6
|
-
<%= icon "adjustments", class: "mr-1" %>
|
|
7
|
-
<%= Spree.t("admin.filters") %>
|
|
8
|
-
<% end %>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<%= drawer(id: 'promotion-filters-drawer', controller_name: 'dialog') do %>
|
|
12
|
-
<%= drawer_header(Spree.t(:filter), 'dialog') %>
|
|
13
|
-
<div class="drawer-body">
|
|
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-input", data: { filters_target: :input } %>
|
|
17
|
-
</div>
|
|
18
|
-
<%= render_admin_partials(:promotions_filters_partials, f: f) %>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="drawer-footer">
|
|
21
|
-
<%= drawer_discard_button('dialog') %>
|
|
22
|
-
<%= render 'spree/admin/shared/filter_submit' %>
|
|
23
|
-
</div>
|
|
24
|
-
<% end %>
|
|
25
|
-
|
|
26
|
-
<%= render "spree/admin/shared/filter_badge_template" %>
|
|
27
|
-
|
|
28
|
-
<div data-filters-target="badgesContainer" class="filter-badges-container"></div>
|
|
29
|
-
<% end %>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<%= dropdown do %>
|
|
2
|
-
<%= dropdown_toggle class: 'btn-light dropdown-toggle' do %>
|
|
3
|
-
<span class="text-gray-600 font-normal mr-1">
|
|
4
|
-
<%= Spree.t(:status) %>
|
|
5
|
-
</span>
|
|
6
|
-
<%= promotion_filter_dropdown_value %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<%= dropdown_menu do %>
|
|
9
|
-
<%= active_link_to 'All Promotions', params.to_unsafe_h.deep_merge({page: nil, q: {active: nil, expired: nil}}), class: 'dropdown-item', active: (params[:q] || {}).values_at(*%w[expired active] ).all?(&:blank?) %>
|
|
10
|
-
<%= link_to Spree.t(:expired),
|
|
11
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {active: nil, expired: true}}),
|
|
12
|
-
class: "dropdown-item #{'active' if params[:q][:expired]}" %>
|
|
13
|
-
<%= link_to Spree.t(:active),
|
|
14
|
-
params.to_unsafe_h.deep_merge({page: nil, q: {active: true, expired: false}}),
|
|
15
|
-
class: "dropdown-item #{'active' if params[:q][:active]}" %>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% end %>
|