spree_admin 5.1.1 → 5.1.3

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/assets/stylesheets/spree/admin/components/_bulk_panel.scss +58 -10
  3. data/app/assets/stylesheets/spree/admin/components/_buttons.scss +1 -16
  4. data/app/assets/stylesheets/spree/admin/components/_filters.scss +1 -1
  5. data/app/assets/stylesheets/spree/admin/components/_main.scss +46 -0
  6. data/app/assets/stylesheets/spree/admin/components/_tables.scss +24 -1
  7. data/app/assets/stylesheets/spree/admin/shared/_base.scss +7 -0
  8. data/app/controllers/spree/admin/dashboard_controller.rb +6 -0
  9. data/app/controllers/spree/admin/digital_assets_controller.rb +1 -0
  10. data/app/controllers/spree/admin/option_values_controller.rb +9 -0
  11. data/app/controllers/spree/admin/reports_controller.rb +14 -2
  12. data/app/controllers/spree/admin/storefront_controller.rb +1 -1
  13. data/app/helpers/spree/admin/base_helper.rb +10 -0
  14. data/app/helpers/spree/admin/bulk_operations_helper.rb +5 -3
  15. data/app/helpers/spree/admin/navigation_helper.rb +1 -1
  16. data/app/helpers/spree/admin/orders_filters_helper.rb +5 -4
  17. data/app/helpers/spree/admin/products_helper.rb +1 -1
  18. data/app/javascript/spree/admin/application.js +2 -0
  19. data/app/javascript/spree/admin/controllers/admin_controller.js +18 -0
  20. data/app/models/spree/admin/updater.rb +9 -5
  21. data/app/views/kaminari/admin-twitter-bootstrap-4/_first_page.html.erb +3 -5
  22. data/app/views/kaminari/admin-twitter-bootstrap-4/_last_page.html.erb +3 -5
  23. data/app/views/kaminari/admin-twitter-bootstrap-4/_next_page.html.erb +4 -5
  24. data/app/views/kaminari/admin-twitter-bootstrap-4/_paginator.html.erb +1 -1
  25. data/app/views/kaminari/admin-twitter-bootstrap-4/_prev_page.html.erb +4 -5
  26. data/app/views/layouts/spree/admin.html.erb +4 -1
  27. data/app/views/spree/admin/admin_users/show.html.erb +3 -2
  28. data/app/views/spree/admin/dashboard/_updater.html.erb +15 -5
  29. data/app/views/spree/admin/dashboard/getting_started.html.erb +1 -3
  30. data/app/views/spree/admin/dashboard/show.html.erb +2 -2
  31. data/app/views/spree/admin/integrations/index.html.erb +16 -16
  32. data/app/views/spree/admin/pages/index.html.erb +2 -1
  33. data/app/views/spree/admin/payment_methods/_form.html.erb +47 -54
  34. data/app/views/spree/admin/payment_methods/edit.html.erb +8 -4
  35. data/app/views/spree/admin/payment_methods/new.html.erb +7 -4
  36. data/app/views/spree/admin/products/_bulk_operations.html.erb +3 -2
  37. data/app/views/spree/admin/products/form/_variants.html.erb +1 -1
  38. data/app/views/spree/admin/profile/edit.html.erb +6 -8
  39. data/app/views/spree/admin/promotions/new.html.erb +51 -5
  40. data/app/views/spree/admin/shared/_content_header.html.erb +6 -5
  41. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
  42. data/app/views/spree/admin/shared/_header.html.erb +4 -3
  43. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  44. data/app/views/spree/admin/shared/_stock_nav.html.erb +2 -4
  45. data/app/views/spree/admin/shared/sidebar/_enterprise_edition_notice.html.erb +1 -1
  46. data/app/views/spree/admin/storefront/edit.html.erb +6 -6
  47. data/app/views/spree/admin/stores/edit.html.erb +0 -1
  48. data/app/views/spree/admin/stores/form/_checkout.html.erb +20 -24
  49. data/app/views/spree/admin/stores/form/_emails.html.erb +16 -18
  50. data/app/views/spree/admin/users/index.html.erb +2 -1
  51. data/app/views/spree/admin/variants/edit.html.erb +3 -6
  52. data/config/routes.rb +2 -1
  53. metadata +9 -9
  54. data/app/views/spree/admin/promotions/_form.html.erb +0 -47
@@ -2,22 +2,22 @@
2
2
  <%= Spree.t(:integrations) %>
3
3
  <% end %>
4
4
 
5
- <%= content_for(:page_alerts) do %>
6
- <div class="alert alert-info">
7
- <%= Spree.t('admin.integrations.page_subtitle') %>
8
- </div>
9
- <% end %>
10
-
11
- <div class="container px-lg-0 mt-2">
12
- <% grouped_available_store_integrations.each do |group, integrations| %>
13
- <% if group.present? %>
14
- <div class="my-2 text-muted font-weight-light text-uppercase"><%= Spree.t(group) %></div>
15
- <% end %>
5
+ <div class="row">
6
+ <div class="col-lg-8 offset-lg-2">
7
+ <div class="alert alert-info mb-4">
8
+ <%= Spree.t('admin.integrations.page_subtitle') %>
9
+ </div>
16
10
 
17
- <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 mb-4">
18
- <% integrations.each do |integration| %>
19
- <%= render 'spree/admin/integrations/integration', integration_class: integration %>
11
+ <% grouped_available_store_integrations.each do |group, integrations| %>
12
+ <% if group.present? %>
13
+ <div class="my-2 text-muted font-weight-light text-uppercase"><%= Spree.t(group) %></div>
20
14
  <% end %>
21
- </div>
22
- <% end %>
15
+
16
+ <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 mb-4">
17
+ <% integrations.each do |integration| %>
18
+ <%= render 'spree/admin/integrations/integration', integration_class: integration %>
19
+ <% end %>
20
+ </div>
21
+ <% end %>
22
+ </div>
23
23
  </div>
@@ -19,7 +19,8 @@
19
19
  </tr>
20
20
  </thead>
21
21
  <tbody>
22
- <%= render collection: @collection, partial: "spree/admin/pages/page", cached: spree_base_cache_scope %>
22
+ <% default_theme = current_store.default_theme %>
23
+ <%= render collection: @collection, partial: "spree/admin/pages/page", cached: ->(page) { [*spree_base_cache_scope.call(page), default_theme] } %>
23
24
  </tbody>
24
25
  </table>
25
26
  <%= render "spree/admin/shared/index_table_options", collection: @collection %>
@@ -2,69 +2,62 @@
2
2
  <%= render "spree/admin/payment_methods/configuration_guides/#{@object.configuration_guide_partial_name}", f: f %>
3
3
  <% end %>
4
4
 
5
+ <% if !preference_fields(@object, f).empty? || @object.respond_to?(:custom_form_fields_partial_name) %>
6
+ <div class="card mb-4">
7
+ <div class="card-header">
8
+ <h5 class="card-title"><%= Spree.t(:payment_provider_settings) %></h5>
9
+ </div>
10
+ <div class="card-body">
11
+ <%= preference_fields(@object, f) unless preference_fields(@object, f).empty? %>
5
12
 
6
- <div class="row">
7
- <% if !preference_fields(@object, f).empty? || @object.respond_to?(:custom_form_fields_partial_name) %>
8
- <div class="col-12 col-md-6">
9
- <div class="card mb-4">
10
- <div class="card-header">
11
- <h5 class="card-title"><%= Spree.t(:payment_provider_settings) %></h5>
12
- </div>
13
- <div class="card-body">
14
- <%= preference_fields(@object, f) unless preference_fields(@object, f).empty? %>
15
-
16
- <% if @object.respond_to?(:custom_form_fields_partial_name) %>
17
- <%= render "spree/admin/payment_methods/custom_form_fields/#{@object.custom_form_fields_partial_name}", f: f %>
18
- <% end %>
19
- </div>
20
- </div>
13
+ <% if @object.respond_to?(:custom_form_fields_partial_name) %>
14
+ <%= render "spree/admin/payment_methods/custom_form_fields/#{@object.custom_form_fields_partial_name}", f: f %>
15
+ <% end %>
21
16
  </div>
22
- <% end %>
17
+ </div>
18
+ <% end %>
23
19
 
24
- <div class="col-12 col-md-6">
25
- <div class="card mb-4">
26
- <div class="card-header">
27
- <h5 class="card-title"><%= Spree.t(:display_settings) %></h5>
28
- </div>
29
- <div class="card-body">
30
- <div class="form-group">
31
- <%= label_tag :payment_method_name, Spree.t(:name) %>
32
- <%= text_field :payment_method, :name, class: 'form-control' %>
33
- <span class="text-muted form-text mt-2">
34
- This name will be used to identify the payment method on the storefront
35
- </span>
20
+ <div class="card mb-4">
21
+ <div class="card-header">
22
+ <h5 class="card-title"><%= Spree.t(:display_settings) %></h5>
23
+ </div>
24
+ <div class="card-body">
25
+ <div class="form-group">
26
+ <%= label_tag :payment_method_name, Spree.t(:name) %>
27
+ <%= text_field :payment_method, :name, class: 'form-control' %>
28
+ <span class="text-muted form-text mt-2">
29
+ This name will be used to identify the payment method on the storefront
30
+ </span>
36
31
 
37
- <%= error_message_on :payment_method, :name %>
38
- </div>
32
+ <%= error_message_on :payment_method, :name %>
33
+ </div>
39
34
 
40
- <% if can?(:manage, Spree::Store) && available_stores.count > 1 %>
41
- <div class="form-group">
42
- <%= label_tag :payment_method_stores, Spree.t(:stores) %>
43
- <%= f.collection_check_boxes :store_ids, available_stores, :id, :name do |b| %>
44
- <div class="custom-control custom-checkbox mb-1">
45
- <%= b.check_box(class: 'custom-control-input') %>
46
- <%= b.label(class: 'custom-control-label') %>
47
- </div>
48
- <% end %>
35
+ <% if can?(:manage, Spree::Store) && available_stores.count > 1 %>
36
+ <div class="form-group">
37
+ <%= label_tag :payment_method_stores, Spree.t(:stores) %>
38
+ <%= f.collection_check_boxes :store_ids, available_stores, :id, :name do |b| %>
39
+ <div class="custom-control custom-checkbox mb-1">
40
+ <%= b.check_box(class: 'custom-control-input') %>
41
+ <%= b.label(class: 'custom-control-label') %>
49
42
  </div>
50
43
  <% end %>
44
+ </div>
45
+ <% end %>
51
46
 
52
- <div class="form-group">
53
- <%= label_tag :payment_method_display_on, Spree.t(:display) %>
54
- <%= f.select :display_on, display_on_options, {}, { class: 'custom-select' } %>
55
- </div>
56
- <div class="form-group">
57
- <%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
58
- <%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes).to_s, true], [Spree.t(:say_no).to_s, false]], {}, {class: 'custom-select'}) %>
59
- </div>
47
+ <div class="form-group">
48
+ <%= label_tag :payment_method_display_on, Spree.t(:display) %>
49
+ <%= f.select :display_on, display_on_options, {}, { class: 'custom-select' } %>
50
+ </div>
51
+ <div class="form-group">
52
+ <%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
53
+ <%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes).to_s, true], [Spree.t(:say_no).to_s, false]], {}, {class: 'custom-select'}) %>
54
+ </div>
60
55
 
61
- <div class="form-group">
62
- <label><%= Spree.t(:active) %></label>
63
- <div class="custom-control custom-switch">
64
- <%= f.check_box :active, class: 'custom-control-input' %>
65
- <%= f.label :active, '&nbsp;'.html_safe, class: 'custom-control-label' %>
66
- </div>
67
- </div>
56
+ <div class="form-group">
57
+ <label><%= Spree.t(:active) %></label>
58
+ <div class="custom-control custom-switch">
59
+ <%= f.check_box :active, class: 'custom-control-input' %>
60
+ <%= f.label :active, '&nbsp;'.html_safe, class: 'custom-control-label' %>
68
61
  </div>
69
62
  </div>
70
63
  </div>
@@ -2,9 +2,13 @@
2
2
  <%= page_header_back_button spree.admin_payment_methods_path %>
3
3
  <%= @payment_method.name %>
4
4
  <% end %>
5
- <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
6
5
 
7
- <%= form_for @payment_method, as: :payment_method, url: spree.admin_payment_method_path(@payment_method) do |f| %>
8
- <%= render 'form', f: f %>
9
- <%= render 'spree/admin/shared/edit_resource_links', f: f %>
6
+ <%= form_for @payment_method, as: :payment_method, url: spree.admin_payment_method_path(@payment_method), html: { id: "edit_payment_method_#{@payment_method.id}" } do |f| %>
7
+ <div class="row">
8
+ <div class="col-lg-6 offset-lg-3">
9
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
10
+ <%= render 'form', f: f %>
11
+ <%= render 'spree/admin/shared/edit_resource_links', f: f %>
12
+ </div>
13
+ </div>
10
14
  <% end %>
@@ -3,10 +3,13 @@
3
3
  <%= @payment_method.name %>
4
4
  <% end %>
5
5
 
6
- <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
7
-
8
6
  <%= form_for @payment_method, as: :payment_method, url: spree.admin_payment_methods_path do |f| %>
9
7
  <%= f.hidden_field :type %>
10
- <%= render 'form', f: f %>
11
- <%= render 'spree/admin/shared/new_resource_links' %>
8
+ <div class="row">
9
+ <div class="col-lg-6 offset-lg-3">
10
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
11
+ <%= render 'form', f: f %>
12
+ <%= render 'spree/admin/shared/new_resource_links' %>
13
+ </div>
14
+ </div>
12
15
  <% end %>
@@ -1,5 +1,7 @@
1
1
  <div id="bulk-panel" class="d-none" data-bulk-operation-target="panel">
2
2
  <div class="bulk-panel-container">
3
+ <%= bulk_operations_counter %>
4
+
3
5
  <% if can?(:activate, Spree::Product) %>
4
6
  <%= bulk_action_link(
5
7
  Spree.t("admin.bulk_ops.products.title.set_status", status: :active),
@@ -20,7 +22,7 @@
20
22
  <button
21
23
  type="button"
22
24
  data-display="static"
23
- class="btn btn-light px-2 h-100"
25
+ class="btn btn-light"
24
26
  data-placement="bottom"
25
27
  data-toggle="dropdown"
26
28
  aria-expanded="false"
@@ -81,7 +83,6 @@
81
83
  </div>
82
84
  </div>
83
85
 
84
- <%= bulk_operations_counter %>
85
86
  <%= bulk_operations_close_button %>
86
87
  </div>
87
88
  </div>
@@ -56,7 +56,7 @@
56
56
  <label class="label" for="new_option_name"><%= Spree.t(:option_name) %></label>
57
57
  <%= tom_select_tag :new_option_name,
58
58
  multiple: false,
59
- create: true,
59
+ create: can?(:create, Spree::OptionType),
60
60
  preloaded_options: option_types_for_select,
61
61
  include_blank: true,
62
62
  select_data: {
@@ -2,10 +2,14 @@
2
2
  <%= Spree.t('admin.edit_profile') %>
3
3
  <% end %>
4
4
 
5
+ <%= content_for :page_actions do %>
6
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: 'edit_user' %>
7
+ <% end %>
8
+
5
9
  <%= form_for @user, url: spree.admin_profile_path, method: :put, as: :user do |f| %>
6
10
  <div class="row">
7
- <div class="col-lg-6 mb-4">
8
- <div class="card">
11
+ <div class="col-lg-6 offset-lg-3">
12
+ <div class="card mb-4">
9
13
  <div class="card-header">
10
14
  <h5 class="card-title"><%= Spree.t('admin.personal_details') %></h5>
11
15
  </div>
@@ -30,9 +34,7 @@
30
34
  </div>
31
35
  </div>
32
36
  </div>
33
- </div>
34
37
 
35
- <div class="col-lg-6 mb-4">
36
38
  <div class="card">
37
39
  <div class="card-header">
38
40
  <h5 class="card-title"><%= Spree.t('admin.notifications') %></h5>
@@ -72,8 +74,4 @@
72
74
  </div>
73
75
  </div>
74
76
  </div>
75
-
76
- <div class="form-actions">
77
- <%= turbo_save_button_tag Spree.t('actions.update') %>
78
- </div>
79
77
  <% end %>
@@ -3,9 +3,55 @@
3
3
  <%= Spree.t(:new_promotion) %>
4
4
  <% end %>
5
5
  <%= form_for :promotion, url: collection_url do |f| %>
6
- <%= render 'form', f: f %>
7
- <p class="alert alert-info text-center mt-3">
8
- In the next step you will be able to add actions and rules to your promotion
9
- </p>
10
- <%= render 'spree/admin/shared/new_resource_links' %>
6
+
7
+ <div class="row">
8
+ <div class="col-12 col-lg-6 offset-lg-3">
9
+ <%= render 'spree/admin/shared/error_messages', target: @promotion %>
10
+
11
+ <div class="card mb-4">
12
+ <div class="card-header">
13
+ <h5 class="card-title">
14
+ <%= Spree.t(:details) %>
15
+ </h5>
16
+ </div>
17
+ <div class="card-body">
18
+ <div class="form-group">
19
+ <%= f.label :name %>
20
+ <%= f.text_field :name, class: 'form-control', required: true, autofocus: true %>
21
+ <%= f.error_message_on :name %>
22
+ <span class="form-text text-muted mt-2">
23
+ Customers will see this in their cart and at checkout.
24
+ </span>
25
+ </div>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="card mb-4">
30
+ <div class="card-header">
31
+ <h5 class="card-title">
32
+ <%= Spree.t(:kind) %>
33
+ </h5>
34
+ </div>
35
+ <div class="card-body">
36
+ <%= render 'spree/admin/promotions/form/kind', f: f %>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="card mb-4">
41
+ <div class="card-header">
42
+ <h5 class="card-title">
43
+ <%= Spree.t(:settings) %>
44
+ </h5>
45
+ </div>
46
+ <div class="card-body">
47
+ <%= render 'spree/admin/promotions/form/settings', f: f %>
48
+ </div>
49
+ </div>
50
+
51
+ <p class="alert alert-info text-center">
52
+ In the next step you will be able to add actions and rules to your promotion
53
+ </p>
54
+ <%= render 'spree/admin/shared/new_resource_links' %>
55
+ </div>
56
+ </div>
11
57
  <% end %>
@@ -1,4 +1,4 @@
1
- <% record = @object || @customer_return || @order || @product || @vendor || @user || @taxon || @store_credit %>
1
+ <% record = @object || @customer_return || @order || @product || @vendor || @user || @admin_user || @taxon || @store_credit %>
2
2
  <% record = nil if @user&.is_a?(Spree.admin_user_class) %>
3
3
 
4
4
  <% show_record_subtitle = record && record.persisted? && record.has_attribute?(:updated_at) %>
@@ -24,7 +24,8 @@
24
24
  <%= yield :page_actions if content_for?(:page_actions) %>
25
25
 
26
26
  <% if action_name == 'edit' && @object %>
27
- <%= turbo_save_button_tag Spree.t('actions.update'), class: 'btn btn-primary', form: "edit_#{@object.class.name.demodulize.underscore}_#{@object.id}" %>
27
+ <% class_name = defined?(model_class) ? model_class.to_s : @object.class.name %>
28
+ <%= turbo_save_button_tag Spree.t('actions.update'), class: 'btn btn-primary', form: "edit_#{class_name.demodulize.underscore}_#{@object.id}", data: { admin_target: 'save' } %>
28
29
  <% end %>
29
30
 
30
31
  <% if show_record_subtitle || content_for(:page_actions_dropdown) %>
@@ -38,7 +39,7 @@
38
39
  <% if record.respond_to?(:audits) && spree.respond_to?(:admin_audits_path) && defined?(Audited) && can?(:read, Audited.audit_class) %>
39
40
  <a href="<%= spree.admin_audits_path(q: { auditable_id_eq: record.id, auditable_type_eq: record.class.to_s }) %>" target="_blank" class="dropdown-item">
40
41
  <%= icon 'history' %>
41
- <%= Spree.t(:audit_log) %>
42
+ <%= Spree.t('admin.audit_log') %>
42
43
  </a>
43
44
  <% end %>
44
45
  <% if record.respond_to?(:number) %>
@@ -71,8 +72,8 @@
71
72
  <% end %>
72
73
 
73
74
  <% if content_for?(:page_tabs) %>
74
- <div class="container">
75
- <ul class="nav nav-pills flex-nowrap w-100 mb-3">
75
+ <div class="container-fluid" id="page-tabs">
76
+ <ul class="nav">
76
77
  <%= yield :page_tabs %>
77
78
  </ul>
78
79
  </div>
@@ -1,7 +1,7 @@
1
1
  <% destroy_url = defined?(destroy_url) && destroy_url ? destroy_url : object_url(f.object) %>
2
2
 
3
3
  <div class="form-actions">
4
- <%= turbo_save_button_tag Spree.t('actions.update') %>
4
+ <%= turbo_save_button_tag Spree.t('actions.update'), data: { admin_target: 'save' } %>
5
5
  <% if f.object.can_be_deleted? && can?(:delete, f.object) %>
6
6
  <%= link_to Spree.t('actions.destroy'), destroy_url, data: { turbo_method: :delete, turbo_confirm: Spree.t(:are_you_sure_delete), turbo_frame: defined?(turbo_frame) ? turbo_frame : '_top' }, class: 'btn btn-danger ml-auto' %>
7
7
  <% end %>
@@ -11,9 +11,10 @@
11
11
  </div>
12
12
 
13
13
  <% if settings_active? %>
14
- <div class="store-dropdown px-2">
15
- <%= active_link_to_with_icon('arrow-left', Spree.t('admin.back_to_dashboard'), spree.admin_dashboard_path, class: 'btn store-dropdown-button w-100 justify-content-start mx-1 py-2') %>
16
- </div>
14
+ <%= link_to spree.admin_path, class: 'store-dropdown text-decoration-none px-2 justify-content-start with-tip', title: Spree.t('admin.back_to_dashboard'), data: { admin_target: 'close' } do %>
15
+ <%= icon 'x', class: 'mx-2' %>
16
+ <kbd>ESC</kbd>
17
+ <% end %>
17
18
  <% else %>
18
19
  <% if defined?(current_vendor) && current_vendor.present? %>
19
20
  <%= render 'spree/admin/shared/sidebar/vendor_dropdown' %>
@@ -1,3 +1,3 @@
1
1
  <div class="form-actions">
2
- <%= turbo_save_button_tag Spree.t('actions.create') %>
2
+ <%= turbo_save_button_tag Spree.t('actions.create'), data: { admin_target: 'save' } %>
3
3
  </div>
@@ -1,4 +1,2 @@
1
- <ul class="nav mb-0" id="pills-tab" role="tablist">
2
- <%= nav_item(Spree.t(:stock_items), spree.admin_stock_items_path) if can?(:manage, Spree::StockItem) %>
3
- <%= nav_item(Spree.t(:stock_transfers), spree.admin_stock_transfers_path) if can?(:manage, Spree::StockTransfer) %>
4
- </ul>
1
+ <%= nav_item(Spree.t(:stock_items), spree.admin_stock_items_path) if can?(:manage, Spree::StockItem) %>
2
+ <%= nav_item(Spree.t(:stock_transfers), spree.admin_stock_transfers_path) if can?(:manage, Spree::StockTransfer) %>
@@ -2,7 +2,7 @@
2
2
  <% unless session[:spree_enterprise_edition_notice_dismissed] %>
3
3
  <section class="d-none d-lg-block">
4
4
  <div id="enterprise-edition-notice">
5
- <%= link_to '', spree.admin_dismiss_enterprise_edition_notice_path, method: :patch, class: 'btn-close' %>
5
+ <%= link_to '', spree.admin_dismiss_enterprise_edition_notice_path, data: { turbo_method: :patch }, class: 'btn-close' %>
6
6
  <p>You're using Spree Community Edition. To get access to all features, please upgrade to Enterprise Edition.</p>
7
7
 
8
8
  <%= external_link_to 'Upgrade', 'https://spreecommerce.org/pricing', target: '_blank', class: 'btn btn-link btn-sm shadow-xs' %>
@@ -6,15 +6,19 @@
6
6
  <%= Spree.t(:settings) %>
7
7
  <% end %>
8
8
 
9
- <%= content_for(:page_actions) do %>
9
+ <%= content_for(:page_actions_dropdown) do %>
10
10
  <%= link_to_edit_translations(@store) %>
11
11
  <% end %>
12
12
 
13
+ <%= content_for(:page_actions) do %>
14
+ <%= turbo_save_button_tag Spree.t('actions.update'), form: "edit_store_#{@store.id}" %>
15
+ <% end %>
16
+
13
17
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @store }, class: 'mb-5 pb-5' %>
14
18
 
15
19
  <%= form_for @store, url: spree.admin_storefront_path, method: :patch do |f| %>
16
20
  <div class="row">
17
- <div class="col-lg-6">
21
+ <div class="col-lg-6 offset-lg-3">
18
22
  <div class="card mb-4">
19
23
  <div class="card-header">
20
24
  <h5 class="card-title">
@@ -85,9 +89,7 @@
85
89
  </div>
86
90
  </div>
87
91
  </div>
88
- </div>
89
92
 
90
- <div class="col-lg-6">
91
93
  <div class="card mb-4">
92
94
  <div class="card-header">
93
95
  <h5 class="card-title">
@@ -139,6 +141,4 @@
139
141
  </div>
140
142
  </div>
141
143
  </div>
142
-
143
- <%= render 'spree/admin/stores/form/buttons' %>
144
144
  <% end %>
@@ -9,5 +9,4 @@
9
9
  <%= render partial: 'spree/admin/stores/form/emails', locals: { f: f } if params[:section] == 'emails' %>
10
10
  <%= render partial: 'spree/admin/stores/form/checkout', locals: { f: f } if params[:section] == 'checkout' %>
11
11
  <%= render partial: 'spree/admin/stores/form/policies', locals: { f: f } if params[:section] == 'policies' %>
12
- <%= render 'spree/admin/stores/form/buttons' %>
13
12
  <% end %>
@@ -2,33 +2,14 @@
2
2
  <%= Spree.t(:checkout) %> <%= Spree.t(:settings) %>
3
3
  <% end %>
4
4
 
5
- <%= content_for :page_alerts do %>
6
- <div class="alert alert-info mb-3">
7
- <p>
8
- <%= Spree.t('admin.checkout_settings.policy_copy', policies_link: link_to(Spree.t(:policies), spree.edit_admin_store_path + '?section=policies', class: 'alert-link')).html_safe %>
9
- </p>
10
- </div>
11
- <% end %>
12
-
13
5
  <div class="row">
14
- <div class="col-lg-7">
15
- <div class="card mb-4">
16
- <div class="card-header">
17
- <h5 class="card-title"><%= Spree.t(:checkout_message) %></h5>
18
- </div>
19
-
20
- <div class="card-body">
21
- <p class="text-muted">
22
- <%= Spree.t('admin.checkout_settings.checkout_message_description') %>
23
- </p>
24
- <div class="trix-container">
25
- <%= f.rich_text_area :checkout_message, class: 'overflow-auto', style: 'height: 300px' %>
26
- </div>
27
- </div>
6
+ <div class="col-lg-6 offset-lg-3">
7
+ <div class="alert alert-info mb-3">
8
+ <p>
9
+ <%= Spree.t('admin.checkout_settings.policy_copy', policies_link: link_to(Spree.t(:policies), spree.edit_admin_store_path + '?section=policies', class: 'alert-link')).html_safe %>
10
+ </p>
28
11
  </div>
29
- </div>
30
12
 
31
- <div class="col-lg-5">
32
13
  <div class="card mb-4">
33
14
  <div class="card-header">
34
15
  <h5 class="card-title"><%= Spree.t(:settings) %></h5>
@@ -66,5 +47,20 @@
66
47
  </div>
67
48
  </div>
68
49
  </div>
50
+
51
+ <div class="card mb-4">
52
+ <div class="card-header">
53
+ <h5 class="card-title"><%= Spree.t(:checkout_message) %></h5>
54
+ </div>
55
+
56
+ <div class="card-body">
57
+ <p class="text-muted">
58
+ <%= Spree.t('admin.checkout_settings.checkout_message_description') %>
59
+ </p>
60
+ <div class="trix-container">
61
+ <%= f.rich_text_area :checkout_message, class: 'overflow-auto', style: 'height: 300px' %>
62
+ </div>
63
+ </div>
64
+ </div>
69
65
  </div>
70
66
  </div>
@@ -3,24 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <div class="row">
6
- <div class="col-lg-6">
7
- <div class="card mb-4">
8
- <div class="card-header">
9
- <h5 class="card-title">Logo for emails</h5>
10
- </div>
11
- <div class="card-body">
12
- <p class="text-muted">This logo is included in all email notifications such as order confirmation</p>
13
- <%= render 'active_storage/upload_form', form: f, field_name: :mailer_logo, width: 204, height: 104 %>
14
- <p class="form-text text-muted mb-0 mt-2">
15
- We recommend images with a transparent background.
16
- <br />
17
- Only JPEG and PNG formats are supported.
18
- </p>
19
- </div>
20
- </div>
21
- </div>
22
-
23
- <div class="col-lg-6">
6
+ <div class="col-lg-6 offset-lg-3">
24
7
  <div class="card mb-4">
25
8
  <div class="card-header">
26
9
  <h5 class="card-title">Email addresses</h5>
@@ -55,5 +38,20 @@
55
38
  </div>
56
39
  </div>
57
40
  </div>
41
+
42
+ <div class="card mb-4">
43
+ <div class="card-header">
44
+ <h5 class="card-title">Logo for emails</h5>
45
+ </div>
46
+ <div class="card-body">
47
+ <p class="text-muted">This logo is included in all email notifications such as order confirmation</p>
48
+ <%= render 'active_storage/upload_form', form: f, field_name: :mailer_logo, width: 204, height: 104 %>
49
+ <p class="form-text text-muted mb-0 mt-2">
50
+ We recommend images with a transparent background.
51
+ <br />
52
+ Only JPEG and PNG formats are supported.
53
+ </p>
54
+ </div>
55
+ </div>
58
56
  </div>
59
57
  </div>
@@ -22,6 +22,8 @@
22
22
  <%= render 'spree/admin/shared/bulk_modal' %>
23
23
  <div id="bulk-panel" class="d-none" data-bulk-operation-target="panel">
24
24
  <div class="bulk-panel-container">
25
+ <%= bulk_operations_counter %>
26
+
25
27
  <% if can?(:manage_tags, Spree.user_class) %>
26
28
  <%= bulk_action_link(
27
29
  Spree.t("admin.bulk_ops.users.title.add_tags"),
@@ -36,7 +38,6 @@
36
38
  url: spree.bulk_remove_tags_admin_users_path
37
39
  ) %>
38
40
  <% end %>
39
- <%= bulk_operations_counter %>
40
41
  <%= bulk_operations_close_button %>
41
42
  </div>
42
43
  </div>
@@ -3,18 +3,15 @@
3
3
  <%= @variant.human_name %>
4
4
  <% end %>
5
5
 
6
- <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
7
-
8
6
  <%= form_for [:admin, @product, @variant] do |f| %>
9
7
  <div class="row">
10
- <div class="col-lg-6">
8
+ <div class="col-lg-6 offset-lg-3">
9
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
11
10
  <%= render 'spree/admin/variants/form/basic', f: f %>
12
11
  <%= render 'spree/admin/variants/form/pricing', f: f %>
13
12
  <%= render 'spree/admin/variants/form/inventory', f: f %>
14
- </div>
15
- <div class="col-lg-6">
16
13
  <%= render 'spree/admin/variants/form/media', viewable: @variant %>
14
+ <%= render 'spree/admin/shared/edit_resource_links', f: f %>
17
15
  </div>
18
16
  </div>
19
- <%= render 'spree/admin/shared/edit_resource_links', f: f %>
20
17
  <% end %>
data/config/routes.rb CHANGED
@@ -249,7 +249,8 @@ Spree::Core::Engine.add_routes do
249
249
  resource :dashboard, controller: 'dashboard'
250
250
  get '/dashboard/analytics', to: 'dashboard#analytics', as: :dashboard_analytics
251
251
  get '/getting-started', to: 'dashboard#getting_started', as: :getting_started
252
- get '/dismiss_enterprise_edition_notice', to: 'dashboard#dismiss_enterprise_edition_notice', as: :dismiss_enterprise_edition_notice
252
+ patch '/dismiss_enterprise_edition_notice', to: 'dashboard#dismiss_enterprise_edition_notice', as: :dismiss_enterprise_edition_notice
253
+ patch '/dismiss_updater_notice', to: 'dashboard#dismiss_updater_notice', as: :dismiss_updater_notice
253
254
 
254
255
  root to: 'dashboard#show'
255
256
  end