spree_admin 5.1.4 → 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 (25) 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/custom_domains_controller.rb +0 -4
  5. data/app/controllers/spree/admin/taxonomies_controller.rb +4 -0
  6. data/app/javascript/spree/admin/controllers/admin_controller.js +8 -2
  7. data/app/javascript/spree/admin/controllers/select_controller.js +0 -6
  8. data/app/views/spree/admin/custom_domains/_custom_domain.html.erb +4 -6
  9. data/app/views/spree/admin/custom_domains/_custom_domains.html.erb +4 -9
  10. data/app/views/spree/admin/custom_domains/index.html.erb +31 -17
  11. data/app/views/spree/admin/invitations/show.html.erb +2 -2
  12. data/app/views/spree/admin/products/_list.html.erb +6 -4
  13. data/app/views/spree/admin/products/_product.html.erb +2 -0
  14. data/app/views/spree/admin/products/edit.html.erb +1 -0
  15. data/app/views/spree/admin/products/form/_variants.html.erb +1 -1
  16. data/app/views/spree/admin/shared/_new_item_dropdown.html.erb +1 -1
  17. data/app/views/spree/admin/stores/form/_emails.html.erb +17 -0
  18. data/app/views/spree/admin/tax_rates/_form.html.erb +7 -5
  19. data/app/views/spree/admin/taxonomies/_taxonomy.html.erb +2 -2
  20. data/app/views/spree/admin/taxonomies/update.turbo_stream.erb +1 -0
  21. data/config/locales/en.yml +1 -0
  22. data/lib/spree/admin/engine.rb +3 -0
  23. metadata +9 -10
  24. data/app/helpers/spree/admin/custom_domains_helper.rb +0 -9
  25. data/app/views/spree/admin/custom_domains/create.turbo_stream.erb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3970db34e315d777871a1d2e53cf27ac817b0ed7784d0fca0cf74f9ea6b736d4
4
- data.tar.gz: 735e2cf7d03a439acb8cbd492f42f6ee7aa3172ff6bbcbaa300ba53ec5d40a4c
3
+ metadata.gz: 8a44b861bdad4ce0d03b3225344461ced14b8dea71fec7a839beca7d19bac3c9
4
+ data.tar.gz: 7efaca5c31054109ea94d9f867ba0ce820db0fded92e1cc7ddfa5a52763ba645
5
5
  SHA512:
6
- metadata.gz: 5f5951292d223e9e8594898d1156cff0ecb0f2b69029dc160fb226340d3723e3203fee617448e8458709fd01776cb5d481f7863b9792ad0abe5d4411d6250945
7
- data.tar.gz: b3843f735e552418eaab27b0b24f05388dd8ff256e8aa1cde15d2707e0c1cf4874689ab10d6ae4da248570322dbebca54f7267fc42fd31a06c0f64a9afb005be
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
+ }
@@ -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
@@ -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
@@ -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,
@@ -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 %>
@@ -6,42 +6,56 @@
6
6
  <%= render_admin_partials(:custom_domains_actions_partials) %>
7
7
  <% end %>
8
8
 
9
+ <%= render_admin_partials(:custom_domains_header_partials) %>
10
+
9
11
  <div class="card-lg p-4">
10
12
  <h5 class="mb-3">Internal URL</h5>
11
13
  <div class="row mb-4">
12
14
  <div class="col-lg-4">
13
15
  <p class="text-muted">
14
- This is your internal URL.
16
+ This is your internal Admin URL.
15
17
  </p>
16
18
  </div>
17
19
  <div class="col-lg-7 offset-lg-1">
18
- <%= 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| %>
19
- <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 %>">
20
- <%= f.text_field :code, class: 'form-control-plaintext pl-0', data: { enable_button_target: 'input' }, required: true, disabled: current_store.custom_domains.any? %>
21
- <span>.<%= Spree.root_domain %></span>
22
- </div>
23
- <% unless current_store.custom_domains.any? %>
24
- <%= 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>
25
43
  <% end %>
26
44
  <% end %>
27
45
  </div>
28
46
  </div>
29
47
  <hr class="my-5" />
30
- <h5>Custom domains</h5>
48
+ <h5><%= Spree.t(:custom_domains) %></h5>
31
49
  <div class="row">
32
50
  <div class="col-lg-4">
33
51
  <p class="text-muted">
34
- Connect your domain or subdomain to your store.
52
+ Connect your domain or subdomain to your storefront.
35
53
  </p>
36
54
  </div>
37
55
  <div class="col-lg-7 offset-lg-1">
38
- <% if entri_enabled? %>
39
- <%= render 'setup_domain_entri' %>
40
- <% else %>
41
- <div class="text-right">
42
- <%= link_to Spree.t(:new_domain), spree.new_admin_custom_domain_path, class: "btn btn-primary" %>
43
- </div>
44
- <% 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>
45
59
 
46
60
  <%= turbo_frame_tag 'admin_custom_domains_index' do %>
47
61
  <%= render 'custom_domains' %>
@@ -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 } %>
@@ -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>
@@ -21,7 +21,7 @@
21
21
 
22
22
  <%= invite_vendor_button(class: 'dropdown-item') if defined?(invite_vendor_button) %>
23
23
 
24
- <% if can?(:create, Spree::Store) %>
24
+ <% if can?(:create, Spree::Store) && Spree.root_domain.present? %>
25
25
  <div class="dropdown-divider"></div>
26
26
 
27
27
  <span data-toggle="modal" data-target="#modal-lg">
@@ -4,6 +4,23 @@
4
4
 
5
5
  <div class="row">
6
6
  <div class="col-lg-6 offset-lg-3">
7
+ <div class="card mb-4">
8
+ <div class="card-header">
9
+ <h5 class="card-title"><%= Spree.t(:settings) %></h5>
10
+ </div>
11
+ <div class="card-body">
12
+ <div class="form-group">
13
+ <div class="custom-control custom-checkbox">
14
+ <%= f.check_box :preferred_send_consumer_transactional_emails, class: 'custom-control-input' %>
15
+ <%= f.label :preferred_send_consumer_transactional_emails, Spree.t(:send_consumer_transactional_emails), class: 'custom-control-label' %>
16
+ <small class="form-text text-muted mt-2">
17
+ <%= Spree.t('admin.store_form.send_consumer_transactional_emails_help') %>
18
+ </small>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+
7
24
  <div class="card mb-4">
8
25
  <div class="card-header">
9
26
  <h5 class="card-title">Email addresses</h5>
@@ -12,12 +12,14 @@
12
12
  <%= f.error_message_on :name %>
13
13
  </div>
14
14
  <div class="form-group">
15
- <%= f.label :amount, Spree.t(:rate) %>
16
- <%= f.number_field :amount, class: 'form-control', min: 0, step: 0.0001, required: true %>
15
+ <%= f.label :amount_percentage, Spree.t(:rate) %>
16
+ <div class="input-group">
17
+ <%= f.number_field :amount_percentage, class: 'form-control', min: 0, step: 0.1, required: true %>
18
+ <div class="input-group-append">
19
+ <span class="input-group-text">%</span>
20
+ </div>
21
+ </div>
17
22
  <%= f.error_message_on :amount %>
18
- <small class="form-text text-muted">
19
- <%= Spree.t(:tax_rate_amount_explanation) %>
20
- </small>
21
23
  </div>
22
24
 
23
25
  <div class="form-group">
@@ -10,7 +10,7 @@
10
10
  <%= taxonomy.taxons.count - 1 %>
11
11
  </td>
12
12
  <td class="w-10 actions">
13
- <%= link_to_with_icon 'list-tree', Spree.t('admin.manage_taxons'), spree.admin_taxonomy_path(taxonomy), class: 'btn btn-light btn-sm' %>
14
- <%= link_to_edit(taxonomy, class: 'btn btn-light btn-sm') if can?(:edit, taxonomy) %>
13
+ <%= link_to_with_icon 'list-tree', Spree.t('admin.manage_taxons'), spree.admin_taxonomy_path(taxonomy), class: 'btn btn-light btn-sm', data: { turbo_frame: '_top' } %>
14
+ <%= link_to_edit(taxonomy, class: 'btn btn-light btn-sm', data: { turbo_frame: '_top' }) if can?(:edit, taxonomy) %>
15
15
  </td>
16
16
  </tr>
@@ -0,0 +1 @@
1
+ <%= turbo_render_alerts %>
@@ -212,6 +212,7 @@ en:
212
212
  label: Display the company address field
213
213
  customer_support_email_help: This email is visible to your Store visitors in the Footer section
214
214
  new_order_notifications_email_help: If you want to receive an email notification every time someone places an Order please provide an email address for that notification to be sent to
215
+ send_consumer_transactional_emails_help: When unchecked, transactional emails like order confirmations and shipment notifications will not be sent to customers
215
216
  store_setup_tasks:
216
217
  add_billing_address: Add billing address
217
218
  add_products: Add products
@@ -54,11 +54,14 @@ module Spree
54
54
  :posts_filters_partials,
55
55
  :posts_header_partials,
56
56
  :product_dropdown_partials,
57
+ :product_page_title_partials,
57
58
  :product_form_partials,
58
59
  :product_form_sidebar_partials,
59
60
  :products_actions_partials,
60
61
  :products_filters_partials,
61
62
  :products_header_partials,
63
+ :products_table_header_partials,
64
+ :products_table_row_partials,
62
65
  :promotions_actions_partials,
63
66
  :promotions_filters_partials,
64
67
  :promotions_header_partials,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.4
4
+ version: 5.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vendo Connect Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-24 00:00:00.000000000 Z
11
+ date: 2025-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.4
19
+ version: 5.1.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.4
26
+ version: 5.1.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_api
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 5.1.4
33
+ version: 5.1.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 5.1.4
40
+ version: 5.1.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: active_link_to
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -415,7 +415,6 @@ files:
415
415
  - app/controllers/spree/admin/zones_controller.rb
416
416
  - app/helpers/spree/admin/base_helper.rb
417
417
  - app/helpers/spree/admin/bulk_operations_helper.rb
418
- - app/helpers/spree/admin/custom_domains_helper.rb
419
418
  - app/helpers/spree/admin/customer_returns_helper.rb
420
419
  - app/helpers/spree/admin/flash_helper.rb
421
420
  - app/helpers/spree/admin/modal_helper.rb
@@ -530,7 +529,6 @@ files:
530
529
  - app/views/spree/admin/custom_domains/_custom_domain.html.erb
531
530
  - app/views/spree/admin/custom_domains/_custom_domains.html.erb
532
531
  - app/views/spree/admin/custom_domains/_form.html.erb
533
- - app/views/spree/admin/custom_domains/create.turbo_stream.erb
534
532
  - app/views/spree/admin/custom_domains/edit.html.erb
535
533
  - app/views/spree/admin/custom_domains/index.html.erb
536
534
  - app/views/spree/admin/custom_domains/new.html.erb
@@ -1021,6 +1019,7 @@ files:
1021
1019
  - app/views/spree/admin/taxonomies/index.html.erb
1022
1020
  - app/views/spree/admin/taxonomies/new.html.erb
1023
1021
  - app/views/spree/admin/taxonomies/show.html.erb
1022
+ - app/views/spree/admin/taxonomies/update.turbo_stream.erb
1024
1023
  - app/views/spree/admin/taxons/_form.html.erb
1025
1024
  - app/views/spree/admin/taxons/_rule_form.html.erb
1026
1025
  - app/views/spree/admin/taxons/_rules_form.html.erb
@@ -1142,9 +1141,9 @@ licenses:
1142
1141
  - AGPL-3.0-or-later
1143
1142
  metadata:
1144
1143
  bug_tracker_uri: https://github.com/spree/spree/issues
1145
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.4
1144
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.5
1146
1145
  documentation_uri: https://docs.spreecommerce.org/
1147
- source_code_uri: https://github.com/spree/spree/tree/v5.1.4
1146
+ source_code_uri: https://github.com/spree/spree/tree/v5.1.5
1148
1147
  post_install_message:
1149
1148
  rdoc_options: []
1150
1149
  require_paths:
@@ -1,9 +0,0 @@
1
- module Spree
2
- module Admin
3
- module CustomDomainsHelper
4
- def entri_enabled?
5
- false
6
- end
7
- end
8
- end
9
- end
@@ -1,3 +0,0 @@
1
- <%= turbo_stream.replace('admin_custom_domains_index') do %>
2
- <%= render partial: 'custom_domains' %>
3
- <% end %>