spree_admin 5.0.3 → 5.0.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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/spree/admin/dashboard_controller.rb +11 -12
  3. data/app/controllers/spree/admin/orders_controller.rb +1 -1
  4. data/app/controllers/spree/admin/products_controller.rb +4 -4
  5. data/app/controllers/spree/admin/webhooks_subscribers_controller.rb +32 -13
  6. data/app/helpers/spree/admin/base_helper.rb +1 -1
  7. data/app/helpers/spree/admin/navigation_helper.rb +1 -1
  8. data/app/helpers/spree/admin/orders_filters_helper.rb +1 -1
  9. data/app/helpers/spree/admin/orders_helper.rb +3 -1
  10. data/app/helpers/spree/admin/payments_helper.rb +0 -5
  11. data/app/javascript/spree/admin/application.js +0 -2
  12. data/app/javascript/spree/admin/controllers/active_storage_upload_controller.js +2 -11
  13. data/app/javascript/spree/admin/controllers/asset_uploader_controller.js +3 -2
  14. data/app/javascript/spree/admin/controllers/multi_tom_select_controller.js +3 -2
  15. data/app/javascript/spree/admin/controllers/variants_form_controller.js +25 -18
  16. data/app/javascript/spree/admin/helpers/trix/video_embed.js +2 -2
  17. data/app/javascript/spree/admin/helpers/uppy_active_storage.js +15 -3
  18. data/app/views/active_storage/_upload_form.html.erb +2 -2
  19. data/app/views/spree/admin/dashboard/_top_products.html.erb +1 -1
  20. data/app/views/spree/admin/orders/_filters.html.erb +11 -1
  21. data/app/views/spree/admin/orders/_return_authorizations.html.erb +3 -1
  22. data/app/views/spree/admin/orders/_summary.html.erb +1 -1
  23. data/app/views/spree/admin/page_blocks/forms/_image.html.erb +9 -0
  24. data/app/views/spree/admin/page_builder/_sidebar_block.html.erb +10 -9
  25. data/app/views/spree/admin/page_builder/_sidebar_sections_toolbar.html.erb +152 -39
  26. data/app/views/spree/admin/page_sections/forms/_featured_posts.html.erb +0 -5
  27. data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
  28. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +1 -1
  29. data/app/views/spree/admin/preferences/_password_field.html.erb +2 -2
  30. data/app/views/spree/admin/products/_form.html.erb +2 -1
  31. data/app/views/spree/admin/products/form/_tax.html.erb +12 -0
  32. data/app/views/spree/admin/products/form/_variants.html.erb +1 -0
  33. data/app/views/spree/admin/shared/_head.html.erb +6 -1
  34. data/app/views/spree/admin/shared/_tax_nav.html.erb +1 -0
  35. data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +3 -2
  36. data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +2 -0
  37. data/app/views/spree/admin/stores/form/_basic.html.erb +1 -1
  38. data/app/views/spree/admin/translations/edit.html.erb +1 -1
  39. data/app/views/spree/admin/users/_form.html.erb +1 -1
  40. data/app/views/spree/admin/users/index.html.erb +3 -3
  41. data/app/views/spree/admin/variants/_variant.html.erb +2 -2
  42. data/app/views/spree/admin/variants/form/_basic.html.erb +4 -4
  43. data/app/views/spree/admin/variants/form/_media.html.erb +1 -0
  44. data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +37 -19
  45. data/app/views/spree/admin/webhooks_subscribers/_webhooks_subscriber.html.erb +12 -6
  46. data/app/views/spree/admin/webhooks_subscribers/edit.html.erb +2 -2
  47. data/app/views/spree/admin/webhooks_subscribers/show.html.erb +58 -47
  48. data/config/importmap.rb +2 -2
  49. data/config/locales/en.yml +0 -1
  50. data/lib/spree/admin/engine.rb +9 -1
  51. data/vendor/javascript/bootstrap--dist--js--bootstrap.bundle.min.js.js +4 -4
  52. data/vendor/javascript/dompurify.js +24 -24
  53. metadata +9 -9
  54. data/app/javascript/spree/admin/controllers/webhook_subscriber_events_controller.js +0 -19
@@ -1,54 +1,65 @@
1
+ <% content_for :title do %>
2
+ <%= @webhooks_subscriber.url %>
3
+ <% end %>
4
+
1
5
  <% content_for :page_title do %>
2
6
  <%= page_header_back_button spree.admin_webhooks_subscribers_path %>
3
7
  <%= @webhooks_subscriber.url %>
4
8
  <% end %>
5
- <fieldset class="card mb-4">
6
- <table class="table card-body pb-0">
7
- <tr>
8
- <td><strong class="text-uppercase"><%= Spree.t(:url) %></strong></td>
9
- <td><%= external_link_to @webhooks_subscriber.url, @webhooks_subscriber.url %></td>
10
- </tr>
11
- <tr>
12
- <td><strong><%= Spree.t(:active) %></strong></td>
13
- <td><%= active_badge(@webhooks_subscriber.active) %></td>
14
- </tr>
15
- <tr>
16
- <td><strong><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></strong></td>
17
- <td>
18
- <% @webhooks_subscriber.subscriptions&.sort&.each do |subscription| %>
19
- <span class="badge badge-light"><%= subscription %></span>
20
- <% end %>
21
- </td>
22
- </tr>
23
- </table>
24
- </fieldset>
25
- <% if @events.any? %>
26
- <div class="card mb-4">
27
- <div class="card-header">
28
- <h5 class="card-title">
29
- <%= Spree.t('admin.webhooks_subscribers.webhooks_events') %>
30
- </h5>
9
+
10
+ <% content_for :page_actions do %>
11
+ <%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_webhooks_subscriber_path(@webhooks_subscriber), class: 'btn btn-primary' %>
12
+ <% end %>
13
+
14
+ <ul class="list-group bg-white mb-4 rounded-lg">
15
+ <li class="list-group-item d-flex justify-content-between">
16
+ <strong class="text-uppercase"><%= Spree.t(:url) %></strong>
17
+ <%= external_link_to @webhooks_subscriber.url, @webhooks_subscriber.url, class: 'text-blue text-decoration-none' %>
18
+ </li>
19
+ <li class="list-group-item d-flex justify-content-between">
20
+ <strong><%= Spree.t(:active) %></strong>
21
+ <%= active_badge(@webhooks_subscriber.active) %>
22
+ </li>
23
+ <li class="list-group-item d-flex justify-content-between">
24
+ <strong><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></strong>
25
+ <div>
26
+ <% @webhooks_subscriber.subscriptions&.sort&.each do |subscription| %>
27
+ <span class="badge badge-light"><%= subscription %></span>
28
+ <% end %>
31
29
  </div>
32
- <table class="table card-body pb-0">
33
- <thead class="text-muted">
30
+ </li>
31
+ </ul>
32
+
33
+ <div class="card mb-4">
34
+ <div class="card-header">
35
+ <h5 class="card-title">
36
+ <%= Spree.t('admin.webhooks_subscribers.webhooks_events') %>
37
+ </h5>
38
+ </div>
39
+ <table class="table card-body pb-0">
40
+ <thead>
41
+ <tr>
42
+ <th><%= Spree.t('admin.name') %></th>
43
+ <th><%= Spree.t('admin.successful') %></th>
44
+ <th><%= Spree.t('admin.created_at') %></th>
45
+ <th><%= Spree.t('admin.response_code') %></th>
46
+ <th><%= Spree.t('admin.execution_time') %></th>
47
+ <th><%= Spree.t('admin.errors') %></th>
48
+ <th></th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+ <% if @events.any? %>
53
+ <%= render partial: 'spree/admin/webhook_events/webhook_event', collection: @events, cached: spree_base_cache_scope %>
54
+ <% else %>
34
55
  <tr>
35
- <th><%= Spree.t('admin.name') %></th>
36
- <th><%= Spree.t('admin.successful') %></th>
37
- <th><%= Spree.t('admin.created_at') %></th>
38
- <th><%= Spree.t('admin.response_code') %></th>
39
- <th><%= Spree.t('admin.execution_time') %></th>
40
- <th><%= Spree.t('admin.errors') %></th>
41
- <th></th>
56
+ <td colspan="7" class="text-center">
57
+ <%= render 'spree/admin/shared/no_resource_found', new_object_url: nil, model_class: Spree::Webhooks::Event %>
58
+ </td>
42
59
  </tr>
43
- </thead>
44
- <tbody>
45
- <%= render partial: 'spree/admin/webhook_events/webhook_event', collection: @events, cached: spree_base_cache_scope %>
46
- </tbody>
47
- </table>
48
- <%= render 'spree/admin/shared/index_table_options', collection: @events %>
49
- </div>
50
- <% else %>
51
- <div class="text-center no-objects-found m-5">
52
- <%= Spree.t('admin.webhooks_subscribers.no_events') %>
53
- </div>
54
- <% end %>
60
+ <% end %>
61
+ </tbody>
62
+ </table>
63
+ <%= render 'spree/admin/shared/index_table_options', collection: @events %>
64
+ </div>
65
+
data/config/importmap.rb CHANGED
@@ -15,8 +15,8 @@ pin 'Chart.bundle', to: 'Chart.bundle.js', preload: ['application-spree-admin']
15
15
  pin 'local-time', preload: ['application-spree-admin'] # @3.0.2
16
16
  pin 'mapkick/bundle', to: 'mapkick.bundle.js', preload: ['application-spree-admin']
17
17
  pin "jquery", to: 'jquery.min.js', preload: ['application-spree-admin'] # @3.7.1
18
- pin 'bootstrap', to: 'bootstrap--dist--js--bootstrap.bundle.min.js.js', preload: ['application-spree-admin'] # @4.6.1
19
- pin 'dompurify', preload: ['application-spree-admin'] # @3.2.3
18
+ pin 'bootstrap', to: 'bootstrap--dist--js--bootstrap.bundle.min.js.js', preload: ['application-spree-admin'] # @4.6.2
19
+ pin 'dompurify', preload: ['application-spree-admin'] # @3.2.5
20
20
 
21
21
  # Stimulus components
22
22
  pin '@stimulus-components/rails-nested-form', to: '@stimulus-components--rails-nested-form.js', preload: ['application-spree-admin'] # @5.0.0
@@ -138,7 +138,6 @@ en:
138
138
  maximum_products_to_show: Maximum products to show
139
139
  nav_centered: Nav centered
140
140
  not_set: Not set
141
- posts_to_show: Posts to show
142
141
  separated: Separated
143
142
  show_more_button: Show explore category button
144
143
  show_taxon_image: Show taxon image
@@ -21,9 +21,13 @@ module Spree
21
21
  :orders_filters_partials,
22
22
  :store_form_partials,
23
23
  :store_nav_partials,
24
+ :settings_nav_partials,
24
25
  :store_settings_nav_partials,
25
26
  :store_orders_nav_partials,
26
- :store_products_nav_partials
27
+ :store_products_nav_partials,
28
+ :storefront_nav_partials,
29
+ :tax_nav_partials,
30
+ :user_dropdown_partials
27
31
  )
28
32
 
29
33
  # accessible via Rails.application.config.spree_admin
@@ -92,9 +96,13 @@ module Spree
92
96
  Rails.application.config.spree_admin.orders_filters_partials = []
93
97
  Rails.application.config.spree_admin.store_form_partials = []
94
98
  Rails.application.config.spree_admin.store_nav_partials = []
99
+ Rails.application.config.spree_admin.settings_nav_partials = []
95
100
  Rails.application.config.spree_admin.store_settings_nav_partials = []
96
101
  Rails.application.config.spree_admin.store_orders_nav_partials = []
97
102
  Rails.application.config.spree_admin.store_products_nav_partials = []
103
+ Rails.application.config.spree_admin.storefront_nav_partials = []
104
+ Rails.application.config.spree_admin.tax_nav_partials = []
105
+ Rails.application.config.spree_admin.user_dropdown_partials = []
98
106
  end
99
107
  end
100
108
  end