spree_admin 5.1.3 → 5.1.5

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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spree/admin/components/_variants_form.scss +5 -1
  3. data/app/assets/stylesheets/spree/admin/shared/_forms.scss +4 -0
  4. data/app/controllers/spree/admin/base_controller.rb +6 -0
  5. data/app/controllers/spree/admin/custom_domains_controller.rb +0 -4
  6. data/app/controllers/spree/admin/reports_controller.rb +0 -6
  7. data/app/controllers/spree/admin/taxonomies_controller.rb +4 -0
  8. data/app/helpers/spree/admin/navigation_helper.rb +9 -3
  9. data/app/javascript/spree/admin/controllers/admin_controller.js +8 -2
  10. data/app/javascript/spree/admin/controllers/select_controller.js +0 -6
  11. data/app/views/spree/admin/admin_users/index.html.erb +6 -0
  12. data/app/views/spree/admin/coupon_codes/index.html.erb +6 -0
  13. data/app/views/spree/admin/custom_domains/_custom_domain.html.erb +4 -6
  14. data/app/views/spree/admin/custom_domains/_custom_domains.html.erb +4 -9
  15. data/app/views/spree/admin/custom_domains/index.html.erb +35 -20
  16. data/app/views/spree/admin/customer_returns/index.html.erb +6 -0
  17. data/app/views/spree/admin/digital_assets/index.html.erb +3 -0
  18. data/app/views/spree/admin/exports/index.html.erb +6 -0
  19. data/app/views/spree/admin/gift_cards/_filters.html.erb +2 -0
  20. data/app/views/spree/admin/gift_cards/index.html.erb +3 -0
  21. data/app/views/spree/admin/integrations/index.html.erb +6 -0
  22. data/app/views/spree/admin/invitations/index.html.erb +6 -0
  23. data/app/views/spree/admin/invitations/show.html.erb +2 -2
  24. data/app/views/spree/admin/oauth_applications/index.html.erb +3 -0
  25. data/app/views/spree/admin/option_types/index.html.erb +3 -0
  26. data/app/views/spree/admin/orders/index.html.erb +3 -0
  27. data/app/views/spree/admin/pages/index.html.erb +3 -0
  28. data/app/views/spree/admin/payment_methods/index.html.erb +6 -0
  29. data/app/views/spree/admin/post_categories/index.html.erb +4 -1
  30. data/app/views/spree/admin/posts/_filters.html.erb +1 -0
  31. data/app/views/spree/admin/posts/index.html.erb +4 -3
  32. data/app/views/spree/admin/products/_list.html.erb +6 -4
  33. data/app/views/spree/admin/products/_product.html.erb +2 -0
  34. data/app/views/spree/admin/products/edit.html.erb +1 -0
  35. data/app/views/spree/admin/products/form/_variants.html.erb +1 -1
  36. data/app/views/spree/admin/products/index.html.erb +10 -1
  37. data/app/views/spree/admin/profile/edit.html.erb +1 -1
  38. data/app/views/spree/admin/promotions/_filters.html.erb +1 -1
  39. data/app/views/spree/admin/promotions/_header.html.erb +2 -6
  40. data/app/views/spree/admin/promotions/index.html.erb +3 -0
  41. data/app/views/spree/admin/properties/index.html.erb +3 -0
  42. data/app/views/spree/admin/refund_reasons/index.html.erb +6 -3
  43. data/app/views/spree/admin/reimbursement_types/index.html.erb +6 -3
  44. data/app/views/spree/admin/reports/index.html.erb +6 -0
  45. data/app/views/spree/admin/return_authorization_reasons/index.html.erb +6 -3
  46. data/app/views/spree/admin/return_authorizations/index.html.erb +6 -0
  47. data/app/views/spree/admin/roles/_form.html.erb +1 -1
  48. data/app/views/spree/admin/roles/index.html.erb +5 -2
  49. data/app/views/spree/admin/roles/new.html.erb +12 -9
  50. data/app/views/spree/admin/shared/_new_item_dropdown.html.erb +1 -1
  51. data/app/views/spree/admin/shared/_returns_and_refunds_nav.html.erb +1 -0
  52. data/app/views/spree/admin/shared/_shipping_nav.html.erb +1 -0
  53. data/app/views/spree/admin/shared/_stock_nav.html.erb +1 -0
  54. data/app/views/spree/admin/shared/_team_nav.html.erb +1 -0
  55. data/app/views/spree/admin/shared/sidebar/_integrations_nav.html.erb +1 -3
  56. data/app/views/spree/admin/shared/sidebar/_products_nav.html.erb +15 -16
  57. data/app/views/spree/admin/shared/sidebar/_promotions_nav.html.erb +4 -14
  58. data/app/views/spree/admin/shared/sidebar/_returns_nav.html.erb +1 -0
  59. data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +10 -30
  60. data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +18 -20
  61. data/app/views/spree/admin/shared/sidebar/_vendors_nav.html.erb +11 -7
  62. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -0
  63. data/app/views/spree/admin/shipping_methods/index.html.erb +8 -1
  64. data/app/views/spree/admin/stock_items/_filters.html.erb +1 -1
  65. data/app/views/spree/admin/stock_items/index.html.erb +6 -0
  66. data/app/views/spree/admin/stock_locations/index.html.erb +3 -0
  67. data/app/views/spree/admin/stock_transfers/_filters.html.erb +1 -0
  68. data/app/views/spree/admin/stock_transfers/index.html.erb +3 -0
  69. data/app/views/spree/admin/store_credit_categories/index.html.erb +3 -0
  70. data/app/views/spree/admin/store_credits/index.html.erb +3 -0
  71. data/app/views/spree/admin/stores/edit.html.erb +1 -1
  72. data/app/views/spree/admin/stores/form/_emails.html.erb +17 -0
  73. data/app/views/spree/admin/tax_categories/index.html.erb +3 -0
  74. data/app/views/spree/admin/tax_rates/_form.html.erb +7 -5
  75. data/app/views/spree/admin/tax_rates/index.html.erb +3 -0
  76. data/app/views/spree/admin/taxonomies/_taxonomy.html.erb +2 -2
  77. data/app/views/spree/admin/taxonomies/index.html.erb +3 -0
  78. data/app/views/spree/admin/taxonomies/update.turbo_stream.erb +1 -0
  79. data/app/views/spree/admin/themes/index.html.erb +3 -0
  80. data/app/views/spree/admin/users/_filters.html.erb +1 -0
  81. data/app/views/spree/admin/users/index.html.erb +3 -1
  82. data/app/views/spree/admin/webhooks_subscribers/index.html.erb +5 -2
  83. data/app/views/spree/admin/zones/index.html.erb +3 -0
  84. data/config/locales/en.yml +1 -0
  85. data/lib/spree/admin/engine.rb +114 -37
  86. metadata +9 -13
  87. data/app/helpers/spree/admin/custom_domains_helper.rb +0 -9
  88. data/app/views/spree/admin/custom_domains/create.turbo_stream.erb +0 -3
  89. data/app/views/spree/admin/products/_index_header.html.erb +0 -7
  90. data/app/views/spree/admin/shared/sidebar/_custom_nav.html.erb +0 -0
  91. data/app/views/spree/admin/shipping_methods/_actions.html.erb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edab2a99241e4db5473957b6cc3294ee86cd82c5d5c09b96c1674b88b74570b8
4
- data.tar.gz: 8ae3514c6c648be6fd26e42c0bd8811f0dfd2a38a4cb06448791ad1b45e24db8
3
+ metadata.gz: 8a44b861bdad4ce0d03b3225344461ced14b8dea71fec7a839beca7d19bac3c9
4
+ data.tar.gz: 7efaca5c31054109ea94d9f867ba0ce820db0fded92e1cc7ddfa5a52763ba645
5
5
  SHA512:
6
- metadata.gz: 1ce82d6b487a7a5db6e39c32e2b8da9e66a77331e2f79c22a1b402283ab7bb7b8bb105666c76c74c937e8f3a923d630cda21ddd1cd246b2b6ea89e5368ab12e8
7
- data.tar.gz: 63efa374a215c5b3ccc8756e2ce0d0dc3397f4896cb899f47d494d3987b7fddf8792e367e28d814f95b6e9279a6b834258a438986f78cb61714a92fbeb49d1a3
6
+ metadata.gz: 5022e147047a7c8e1bdb0484420a4d7f9a461763974b0d1a4b517e676201fdc801bba89a65bb1b244688bccf2d0e404f04e1cbef517a0366c10b7dde5d417561
7
+ data.tar.gz: 8291066c622ef1d32385470823dd9b343e58cda7534e3547d3c26ad32c815d922a21225c700f1c23f920a6b2bfd2c7c5a42bda4f5e1c57a0b74eab2467dfdaa0
@@ -27,7 +27,8 @@
27
27
  &__option {
28
28
  display: flex;
29
29
  border-bottom: 1px solid $border-color;
30
- padding: 1rem 0rem;
30
+ padding: 0.5rem 0.5rem 1rem 0;
31
+ margin-bottom: 0.5rem;
31
32
 
32
33
  .label {
33
34
  margin-bottom: 0.5rem;
@@ -57,6 +58,9 @@
57
58
 
58
59
  &--new {
59
60
  padding-left: calc(1.13px + 3.25rem);
61
+ border-bottom: none;
62
+ margin-bottom: 0;
63
+ padding-bottom: 0.5rem;
60
64
 
61
65
  .values-inputs {
62
66
  display: flex;
@@ -186,3 +186,7 @@ turbo-frame.blur-busy[busy] {
186
186
  pointer-events: none;
187
187
  }
188
188
  }
189
+
190
+ .input-group-text {
191
+ background-color: transparent;
192
+ }
@@ -137,6 +137,12 @@ module Spree
137
137
 
138
138
  'spree/admin'
139
139
  end
140
+
141
+ def parse_date_param(date_string)
142
+ return if date_string.blank?
143
+
144
+ date_string.to_date&.in_time_zone(current_timezone)
145
+ end
140
146
  end
141
147
  end
142
148
  end
@@ -9,10 +9,6 @@ module Spree
9
9
  spree.admin_custom_domains_path
10
10
  end
11
11
 
12
- def create_turbo_stream_enabled?
13
- helpers.entri_enabled?
14
- end
15
-
16
12
  def location_after_save
17
13
  spree.admin_custom_domains_path
18
14
  end
@@ -63,12 +63,6 @@ module Spree
63
63
  attributes[:date_to] = parse_date_param(attributes[:date_to])&.end_of_day if attributes[:date_to].present?
64
64
  attributes
65
65
  end
66
-
67
- def parse_date_param(date_string)
68
- return if date_string.blank?
69
-
70
- date_string.to_date&.in_time_zone(current_timezone)
71
- end
72
66
  end
73
67
  end
74
68
  end
@@ -31,6 +31,10 @@ module Spree
31
31
  def permitted_resource_params
32
32
  params.require(:taxonomy).permit(permitted_taxonomy_attributes)
33
33
  end
34
+
35
+ def update_turbo_stream_enabled?
36
+ true
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -7,10 +7,16 @@ module Spree
7
7
  # @param [String, nil] icon Optional icon name to prepend to the label
8
8
  # @param [Boolean, nil] active Whether the link should be marked as active
9
9
  # @return [SafeBuffer] The navigation item HTML
10
- def nav_item(label, url, icon: nil, active: nil)
10
+ def nav_item(label = nil, url, icon: nil, active: nil, data: {})
11
11
  content_tag :li, class: 'nav-item', role: 'presentation' do
12
- label = icon(icon) + label if icon.present?
13
- active_link_to label, url, class: 'nav-link', active: active
12
+ if block_given?
13
+ active_link_to url, class: 'nav-link', active: active, data: data do
14
+ yield
15
+ end
16
+ else
17
+ label = icon(icon) + label if icon.present? && label.present?
18
+ active_link_to label, url, class: 'nav-link', active: active, data: data
19
+ end
14
20
  end
15
21
  end
16
22
 
@@ -3,16 +3,22 @@ import { Controller } from '@hotwired/stimulus'
3
3
  export default class extends Controller {
4
4
  static targets = ['close', 'save']
5
5
 
6
- close() {
6
+ close(event) {
7
+ // https://github.com/hotwired/stimulus/issues/743
8
+ if (event.type == "keydown" && !(event instanceof KeyboardEvent)) return
9
+
7
10
  if (this.hasCloseTarget) {
8
11
  window.Turbo.visit(this.closeTarget.href)
9
12
  }
10
13
  }
11
14
 
12
15
  save(event) {
16
+ // https://github.com/hotwired/stimulus/issues/743
17
+ if (event.type == "keydown" && !(event instanceof KeyboardEvent)) return
18
+
13
19
  if (this.hasSaveTarget) {
14
20
  event.preventDefault()
15
21
  this.saveTarget.click()
16
22
  }
17
23
  }
18
- }
24
+ }
@@ -38,12 +38,6 @@ export default class extends Controller {
38
38
  }
39
39
  }
40
40
 
41
- disconnect() {
42
- if (this.select) {
43
- this.select.destroy()
44
- }
45
- }
46
-
47
41
  initTomSelect(options = []) {
48
42
  const settings = {
49
43
  maxOptions: 1500,
@@ -1,5 +1,11 @@
1
1
  <%= render 'spree/admin/shared/team_nav' %>
2
2
 
3
+ <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:admin_users_actions_partials) %>
5
+ <% end %>
6
+
7
+ <%= render_admin_partials(:admin_users_header_partials) %>
8
+
3
9
  <div class="card-lg">
4
10
  <div class="table-responsive">
5
11
  <table class="table">
@@ -1,5 +1,11 @@
1
1
  <%= render 'spree/admin/promotions/header' %>
2
2
 
3
+ <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:coupon_codes_actions_partials) %>
5
+ <% end %>
6
+
7
+ <%= render_admin_partials(:coupon_codes_header_partials) %>
8
+
3
9
  <div class="row">
4
10
  <div class="col-12 col-lg-8">
5
11
  <div class="card-lg">
@@ -4,10 +4,8 @@
4
4
  <%= active_badge(custom_domain.active?) %>
5
5
  </td>
6
6
 
7
- <% unless entri_enabled? %>
8
- <td><%= active_badge(custom_domain.default?) %></td>
9
- <td class="actions">
10
- <%= link_to_edit(custom_domain, no_text: true, url: spree.edit_admin_custom_domain_path(custom_domain), data: { turbo: false }) %>
11
- </td>
12
- <% end %>
7
+ <td><%= active_badge(custom_domain.default?) %></td>
8
+ <td class="actions">
9
+ <%= link_to_edit(custom_domain, no_text: true, url: spree.edit_admin_custom_domain_path(custom_domain), data: { turbo: false }) %>
10
+ </td>
13
11
  </tr>
@@ -4,12 +4,9 @@
4
4
  <thead>
5
5
  <tr>
6
6
  <th><%= Spree.t(:name) %></th>
7
- <th>Active?</th>
8
-
9
- <% unless entri_enabled? %>
10
- <th>Default</th>
11
- <th></th>
12
- <% end %>
7
+ <th><%= Spree.t(:active) %>?</th>
8
+ <th><%= Spree.t(:default) %>?</th>
9
+ <th></th>
13
10
  </tr>
14
11
  </thead>
15
12
  <tbody>
@@ -18,7 +15,5 @@
18
15
  </table>
19
16
  </div>
20
17
  <% else %>
21
- <div class="text-muted p-5 d-flex align-items-center w-100 justify-content-center">
22
- You don't have any custom domains set yet.
23
- </div>
18
+ <%= render 'spree/admin/shared/no_resource_found' %>
24
19
  <% end %>
@@ -1,46 +1,61 @@
1
- <% content_for :head do %>
2
- <script type="text/javascript" src="https://cdn.goentri.com/entri.js"></script>
3
- <% end %>
4
1
  <%= content_for(:page_title) do %>
5
2
  <%= Spree.t(:domains) %>
6
3
  <% end %>
7
4
 
5
+ <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:custom_domains_actions_partials) %>
7
+ <% end %>
8
+
9
+ <%= render_admin_partials(:custom_domains_header_partials) %>
10
+
8
11
  <div class="card-lg p-4">
9
12
  <h5 class="mb-3">Internal URL</h5>
10
13
  <div class="row mb-4">
11
14
  <div class="col-lg-4">
12
15
  <p class="text-muted">
13
- This is your internal URL.
16
+ This is your internal Admin URL.
14
17
  </p>
15
18
  </div>
16
19
  <div class="col-lg-7 offset-lg-1">
17
- <%= form_for current_store, url: spree.admin_store_path(current_store), data: { turbo: false, controller: 'enable-button', 'enable-button-disable-when-not-changed-value': true } do |f| %>
18
- <div class="form-control d-flex align-items-center py-0 focus-shadow focus-border mb-3 <% if current_store.custom_domains.any? %>disabled<% end %>">
19
- <%= f.text_field :code, class: 'form-control-plaintext pl-0', data: { enable_button_target: 'input' }, required: true, disabled: current_store.custom_domains.any? %>
20
- <span>.<%= Spree.root_domain %></span>
21
- </div>
22
- <% unless current_store.custom_domains.any? %>
23
- <%= turbo_save_button_tag Spree.t('actions.update') %>
20
+ <%= form_for current_store, url: spree.admin_store_path, data: { turbo: false, controller: 'enable-button', 'enable-button-disable-when-not-changed-value': true } do |f| %>
21
+ <% if Spree.root_domain.present? %>
22
+ <div class="d-flex align-items-center gap-3">
23
+ <div class="form-control d-flex align-items-center py-0 focus-shadow focus-border pr-2 gap-1 <% if current_store.custom_domains.any? %>disabled<% end %>">
24
+ <span class="text-muted">https://</span>
25
+ <%= f.text_field :code, class: 'form-control-plaintext pl-0', data: { enable_button_target: 'input' }, required: true, disabled: current_store.custom_domains.any? %>
26
+ <span>.<%= Spree.root_domain %></span>
27
+
28
+ <%= clipboard_component(current_store.formatted_url) %>
29
+ </div>
30
+ <% unless current_store.custom_domains.any? %>
31
+ <%= turbo_save_button_tag %>
32
+ <% end %>
33
+ </div>
34
+ <% else %>
35
+ <div class="d-flex align-items-center gap-3">
36
+ <div class="form-control d-flex align-items-center py-0 focus-shadow focus-border pr-2 gap-1">
37
+ <span class="text-muted">https://</span>
38
+ <%= f.text_field :url, class: 'form-control-plaintext pl-0', required: true, data: { enable_button_target: 'input' } %>
39
+ <%= clipboard_component(current_store.formatted_url) %>
40
+ </div>
41
+ <%= turbo_save_button_tag %>
42
+ </div>
24
43
  <% end %>
25
44
  <% end %>
26
45
  </div>
27
46
  </div>
28
47
  <hr class="my-5" />
29
- <h5>Custom domains</h5>
48
+ <h5><%= Spree.t(:custom_domains) %></h5>
30
49
  <div class="row">
31
50
  <div class="col-lg-4">
32
51
  <p class="text-muted">
33
- Connect your domain or subdomain to your store.
52
+ Connect your domain or subdomain to your storefront.
34
53
  </p>
35
54
  </div>
36
55
  <div class="col-lg-7 offset-lg-1">
37
- <% if entri_enabled? %>
38
- <%= render 'setup_domain_entri' %>
39
- <% else %>
40
- <div class="text-right">
41
- <%= link_to Spree.t(:new_domain), spree.new_admin_custom_domain_path, class: "btn btn-primary" %>
42
- </div>
43
- <% end %>
56
+ <div class="text-right">
57
+ <%= link_to Spree.t(:new_domain), spree.new_admin_custom_domain_path, class: "btn btn-primary" %>
58
+ </div>
44
59
 
45
60
  <%= turbo_frame_tag 'admin_custom_domains_index' do %>
46
61
  <%= render 'custom_domains' %>
@@ -6,6 +6,12 @@
6
6
  <%= Spree.t(:customer_returns) %>
7
7
  <% end %>
8
8
 
9
+ <% content_for :page_actions do %>
10
+ <%= render_admin_partials(:customer_returns_actions_partials) %>
11
+ <% end %>
12
+
13
+ <%= render_admin_partials(:customer_returns_header_partials) %>
14
+
9
15
  <div class="card-lg">
10
16
  <%= search_form_for [:admin, @search], url: spree.admin_customer_returns_path, class: "filter-wrap", data: {controller: "filters reveal", reveal_hidden_class: "d-none"} do |f| %>
11
17
  <%= render "spree/admin/shared/filters_search_bar",
@@ -4,6 +4,7 @@
4
4
  <% end %>
5
5
 
6
6
  <% content_for :page_actions do %>
7
+ <%= render_admin_partials(:digital_assets_actions_partials) %>
7
8
  <% if can?(:create, Spree::Digital.new(variant: @product.default_variant)) %>
8
9
  <span data-toggle="modal" data-target="#modal">
9
10
  <%= link_to_with_icon "plus",
@@ -17,6 +18,8 @@
17
18
  <% end %>
18
19
  <% end %>
19
20
 
21
+ <%= render_admin_partials(:digital_assets_header_partials) %>
22
+
20
23
  <div class="card p-0">
21
24
  <div class="card-body p-0">
22
25
  <div class="table-responsive" id="<%= dom_id(@product, :digital_assets) %>">
@@ -1,5 +1,11 @@
1
1
  <%= render 'spree/admin/shared/audit_nav' %>
2
2
 
3
+ <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:exports_actions_partials) %>
5
+ <% end %>
6
+
7
+ <%= render_admin_partials(:exports_header_partials) %>
8
+
3
9
  <div class="card-lg">
4
10
  <% if @collection.any? %>
5
11
  <div class="table-responsive">
@@ -29,6 +29,8 @@
29
29
  <%= f.text_field :batch_prefix_eq, class: "form-control", data: {filters_target: :input} %>
30
30
  </div>
31
31
 
32
+ <%= render_admin_partials(:gift_cards_filters_partials, f: f) %>
33
+
32
34
  <div class="form-actions">
33
35
  <%= turbo_save_button_tag Spree.t(:filter_results) do %>
34
36
  <%= icon("search") %>
@@ -4,6 +4,7 @@
4
4
  <% end %>
5
5
 
6
6
  <% content_for :page_actions do %>
7
+ <%= render_admin_partials(:gift_cards_actions_partials) %>
7
8
  <%= link_to spree.admin_gift_cards_path(q: params[:q].to_unsafe_hash, per_page: params[:per_page], format: :csv), id: 'gift-card-batch-export-link', class: 'btn btn-light bg-transparent with-tip', title: 'Export gift cards to a CSV file' do %>
8
9
  <%= icon 'table-export', class: 'mr-2' %>
9
10
  <%= Spree.t(:export) %>
@@ -28,6 +29,8 @@
28
29
  <% end %>
29
30
  <% end %>
30
31
 
32
+ <%= render_admin_partials(:gift_cards_header_partials) %>
33
+
31
34
  <div class="card-lg p-0">
32
35
  <% if params[:frame_name].present? %>
33
36
  <%= turbo_frame_tag params[:frame_name], autoscroll: true, data: { autoscroll_block: :nearest, autoscroll_behavior: :smooth } do %>
@@ -2,6 +2,12 @@
2
2
  <%= Spree.t(:integrations) %>
3
3
  <% end %>
4
4
 
5
+ <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:integrations_actions_partials) %>
7
+ <% end %>
8
+
9
+ <%= render_admin_partials(:integrations_header_partials) %>
10
+
5
11
  <div class="row">
6
12
  <div class="col-lg-8 offset-lg-2">
7
13
  <div class="alert alert-info mb-4">
@@ -1,5 +1,11 @@
1
1
  <%= render 'spree/admin/shared/team_nav' %>
2
2
 
3
+ <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:invitations_actions_partials) %>
5
+ <% end %>
6
+
7
+ <%= render_admin_partials(:invitations_header_partials) %>
8
+
3
9
  <div class="card-lg">
4
10
  <div class="table-responsive">
5
11
  <table class="table">
@@ -1,4 +1,4 @@
1
- <div class="d-flex align-items-center gap-2">
1
+ <div class="d-flex align-items-center gap-2 mb-4">
2
2
  <div>
3
3
  <%= render_avatar(@invitation.inviter, height: 32, width: 32) %>
4
4
  </div>
@@ -6,4 +6,4 @@
6
6
  <strong><%= @invitation.inviter.name %></strong> has invited you to join <strong><%= @invitation.resource.name %></strong>
7
7
  </div>
8
8
  </div>
9
- <%= link_to Spree.t(:accept), spree.accept_admin_invitation_path(@invitation), class: 'btn btn-primary w-100', data: { turbo_method: :put } %>
9
+ <%= link_to Spree.t(:accept), spree.accept_admin_invitation_path(@invitation), class: 'btn btn-primary mx-auto px-5', data: { turbo_method: :put } %>
@@ -3,6 +3,7 @@
3
3
  <%= content_for(:title, Spree.t('admin.oauth_applications.list')) %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:oauth_applications_actions_partials) %>
6
7
  <%= link_to_with_icon 'plus', Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn btn-primary" %>
7
8
  <% end if can? :create, Spree::OauthApplication %>
8
9
 
@@ -15,6 +16,8 @@
15
16
  </div>
16
17
  <% end %>
17
18
 
19
+ <%= render_admin_partials(:oauth_applications_header_partials) %>
20
+
18
21
  <div class="card-lg">
19
22
  <% if @collection.any? %>
20
23
  <div class="table-responsive">
@@ -3,6 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:option_types_actions_partials) %>
6
7
  <%= link_to_with_icon 'plus', Spree.t(:new_option_type), new_object_url, class: 'btn btn-primary' %>
7
8
  <% end if can?(:create, Spree::OptionType) %>
8
9
 
@@ -13,6 +14,8 @@
13
14
  </div>
14
15
  <% end %>
15
16
 
17
+ <%= render_admin_partials(:option_types_header_partials) %>
18
+
16
19
  <div class="card-lg">
17
20
  <%= render partial: "spree/admin/option_types/filter" %>
18
21
  <% if @option_types.any? %>
@@ -7,9 +7,12 @@
7
7
  <% end %>
8
8
 
9
9
  <% content_for :page_actions do %>
10
+ <%= render_admin_partials(:orders_actions_partials) %>
10
11
  <%= link_to_with_icon 'plus', Spree.t(:new_order), spree.admin_orders_path, class: "btn btn-primary", data: { turbo_method: :post } if can?(:create, Spree::Order) %>
11
12
  <% end %>
12
13
 
14
+ <%= render_admin_partials(:orders_header_partials) %>
15
+
13
16
  <div class="card-lg">
14
17
  <% if params[:frame_name].present? %>
15
18
  <%= turbo_frame_tag params[:frame_name], autoscroll: true, data: { autoscroll_block: :nearest, autoscroll_behavior: :smooth } do %>
@@ -2,9 +2,12 @@
2
2
  <%= Spree.t(:pages) %>
3
3
  <% end %>
4
4
  <% content_for :page_actions do %>
5
+ <%= render_admin_partials(:pages_actions_partials) %>
5
6
  <%= link_to_with_icon 'plus', Spree.t(:add_new_page), spree.new_admin_page_path, class: "btn btn-primary" if can?(:create, Spree::Page.new) %>
6
7
  <% end %>
7
8
 
9
+ <%= render_admin_partials(:pages_header_partials) %>
10
+
8
11
  <div class="card-lg">
9
12
  <%= render "spree/admin/pages/filters" %>
10
13
  <% if @collection.any? %>
@@ -2,6 +2,12 @@
2
2
  <%= Spree.t(:payment_methods) %>
3
3
  <% end %>
4
4
 
5
+ <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:payment_methods_actions_partials) %>
7
+ <% end %>
8
+
9
+ <%= render_admin_partials(:payment_methods_header_partials) %>
10
+
5
11
  <div class="card-lg">
6
12
  <div class="table-responsive">
7
13
  <table class="table">
@@ -1,8 +1,11 @@
1
+ <%= render 'spree/admin/shared/posts_tabs' %>
2
+
1
3
  <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:post_categories_actions_partials) %>
2
5
  <%= link_to_with_icon 'plus', Spree.t(:new_post_category), new_object_url, class: 'btn btn-primary' if can?(:create, Spree::PostCategory) %>
3
6
  <% end %>
4
7
 
5
- <%= render 'spree/admin/shared/posts_tabs' %>
8
+ <%= render_admin_partials(:post_categories_header_partials) %>
6
9
 
7
10
  <% if @collection.any? %>
8
11
  <div class="card-lg">
@@ -26,6 +26,7 @@
26
26
  </div>
27
27
  </div>
28
28
  </div>
29
+ <%= render_admin_partials(:posts_filters_partials, f: f) %>
29
30
  <%= render 'spree/admin/shared/filter_submit' %>
30
31
  </div>
31
32
 
@@ -1,10 +1,11 @@
1
- <% content_for :page_actions do %>
2
- <%= render 'extra_actions' %>
1
+ <%= render 'spree/admin/shared/posts_tabs' %>
3
2
 
3
+ <% content_for :page_actions do %>
4
+ <%= render_admin_partials(:posts_actions_partials) %>
4
5
  <%= link_to_with_icon 'plus', Spree.t(:new_post), new_object_url, class: 'btn btn-primary' if can?(:create, Spree::Post) %>
5
6
  <% end %>
6
7
 
7
- <%= render 'spree/admin/shared/posts_tabs' %>
8
+ <%= render_admin_partials(:posts_header_partials) %>
8
9
 
9
10
  <div class="card-lg">
10
11
  <%= render "spree/admin/posts/filters" %>
@@ -15,10 +15,10 @@
15
15
  <%= sort_link @search,
16
16
  :name,
17
17
  Spree.t(:name),
18
- {
19
- default_order: "desc",
20
- title: "admin_products_listing_name_title"
21
- }
18
+ {
19
+ default_order: "desc",
20
+ title: "admin_products_listing_name_title"
21
+ }
22
22
  %>
23
23
  </th>
24
24
  <th scope="col" class="text-center">
@@ -30,6 +30,8 @@
30
30
  <th scope="col" class="d-vendor"><%= Spree.t(:vendor) %></th>
31
31
  <% end %>
32
32
  <th scope="col"><%= Spree.t(:price) %></th>
33
+
34
+ <%= render_admin_partials(:products_table_header_partials) %>
33
35
  </tr>
34
36
  </thead>
35
37
  <tbody>
@@ -24,4 +24,6 @@
24
24
  <td class="w-10 cursor-pointer" data-action="click->row-link#openLink">
25
25
  <%= display_admin_price(product) %>
26
26
  </td>
27
+
28
+ <%= render_admin_partials(:products_table_row_partials, product: product) %>
27
29
  </tr>
@@ -33,6 +33,7 @@ locals: {
33
33
 
34
34
  <% content_for :page_title do %>
35
35
  <%= render "spree/admin/products/edit_page_title" %>
36
+ <%= render_admin_partials(:product_page_title_partials, product: @product) %>
36
37
  <% end %>
37
38
 
38
39
  <%= form_for [:admin, @product] do |f| %>
@@ -35,7 +35,7 @@
35
35
  </button>
36
36
  <% end%>
37
37
  <div class="w-100">
38
- <div class="d-flex justify-content-between">
38
+ <div class="d-flex justify-content-between align-items-center">
39
39
  <h6 data-slot="optionName"><%= option_type.presentation %></h6>
40
40
  <% if can?(:manage_option_types, @product) %>
41
41
  <button class="btn btn-light btn-sm" type="button" data-action="variants-form#editOption" data-variants-form-option-id-param="<%= option_type.id %>"><%= Spree.t(:edit) %></button>
@@ -1,4 +1,13 @@
1
- <%= render 'index_header' %>
1
+ <% content_for :page_title do %>
2
+ <%= Spree.t(:products) %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <%= render_admin_partials(:products_actions_partials) %>
7
+ <%= link_to_with_icon 'plus', Spree.t(:new_product), new_object_url, class: 'btn btn-primary' if can?(:create, Spree::Product) %>
8
+ <% end %>
9
+
10
+ <%= render_admin_partials(:products_header_partials) %>
2
11
 
3
12
  <div class="card-lg">
4
13
  <% if params[:frame_name].present? %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <%= content_for :page_actions do %>
6
- <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user' %>
6
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user', data: { admin_target: 'save' } %>
7
7
  <% end %>
8
8
 
9
9
  <%= form_for @user, url: spree.admin_profile_path, method: :put, as: :user do |f| %>
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  </div>
16
-
16
+ <%= render_admin_partials(:promotions_filters_partials, f: f) %>
17
17
  <%= render 'spree/admin/shared/filter_submit' %>
18
18
  </div>
19
19
 
@@ -5,10 +5,6 @@
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_tabs do %>
8
- <li class="nav-item">
9
- <%= active_link_to Spree.t(:settings), spree.admin_promotion_path(@promotion), class: "nav-link", active: controller_name == 'promotions' %>
10
- </li>
11
- <li class="nav-item">
12
- <%= active_link_to Spree.t(:coupon_codes), spree.admin_promotion_coupon_codes_path(@promotion), class: "nav-link" %>
13
- </li>
8
+ <%= nav_item(Spree.t(:settings), spree.admin_promotion_path(@promotion), active: controller_name == 'promotions') %>
9
+ <%= nav_item(Spree.t(:coupon_codes), spree.admin_promotion_coupon_codes_path(@promotion)) %>
14
10
  <% end if @promotion.multi_codes? %>