spree_backend 4.7.1 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +36 -129
  3. data/.github/CONTRIBUTING.md +1 -1
  4. data/.ruby-version +1 -0
  5. data/Gemfile +4 -3
  6. data/README.md +5 -38
  7. data/SECURITY.md +1 -1
  8. data/app/assets/config/spree_backend_manifest.js +4 -1
  9. data/app/assets/images/favicon.png +0 -0
  10. data/app/assets/images/favicon_dark_bg.png +0 -0
  11. data/app/assets/images/logo_dark.png +0 -0
  12. data/app/assets/images/logo_light.png +0 -0
  13. data/app/assets/images/spark_solutions_logo.png +0 -0
  14. data/app/assets/images/vendo_logo.png +0 -0
  15. data/app/assets/javascripts/spree/backend/global/_index.js +1 -0
  16. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +2 -2
  17. data/app/assets/javascripts/spree/backend/global/tooltips.es6 +21 -0
  18. data/app/assets/javascripts/spree/backend.js +3 -0
  19. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +0 -4
  20. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +4 -7
  21. data/app/assets/stylesheets/spree/backend/components/_tables.scss +0 -1
  22. data/app/assets/stylesheets/spree/backend/global/_variables.scss +16 -2
  23. data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +1 -1
  24. data/app/assets/stylesheets/spree/backend/shared/_base.scss +0 -2
  25. data/app/helpers/spree/admin/base_helper.rb +8 -0
  26. data/app/helpers/spree/admin/navigation_helper.rb +1 -1
  27. data/app/helpers/spree/admin/stores_helper.rb +3 -3
  28. data/app/javascript/spree/backend/application.js +5 -0
  29. data/app/javascript/spree/{dashboard → backend}/controllers/clipboard_controller.js +0 -1
  30. data/app/javascript/spree/backend/controllers/index.js +11 -0
  31. data/app/javascript/spree/{dashboard → backend}/controllers/sortable_tree_controller.js +1 -1
  32. data/app/javascript/spree/backend/helpers/index.js +1 -0
  33. data/app/javascript/spree/{dashboard/utilities → backend/helpers}/request_utility.js +1 -1
  34. data/app/models/spree/admin/actions/action.rb +1 -1
  35. data/app/models/spree/admin/updater.rb +35 -0
  36. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
  37. data/app/views/spree/admin/cms_pages/_form.html.erb +3 -3
  38. data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +1 -1
  39. data/app/views/spree/admin/cms_pages/index.html.erb +1 -1
  40. data/app/views/spree/admin/countries/index.html.erb +1 -1
  41. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +1 -1
  42. data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
  43. data/app/views/spree/admin/dashboard/_getting_started.html.erb +18 -18
  44. data/app/views/spree/admin/data_feeds/index.html.erb +1 -1
  45. data/app/views/spree/admin/images/index.html.erb +1 -1
  46. data/app/views/spree/admin/menus/edit.html.erb +1 -1
  47. data/app/views/spree/admin/menus/index.html.erb +1 -1
  48. data/app/views/spree/admin/oauth_applications/index.html.erb +3 -3
  49. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
  50. data/app/views/spree/admin/option_types/edit.html.erb +1 -1
  51. data/app/views/spree/admin/option_types/index.html.erb +2 -2
  52. data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
  53. data/app/views/spree/admin/orders/_line_items.html.erb +1 -1
  54. data/app/views/spree/admin/orders/_shipment.html.erb +14 -12
  55. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
  56. data/app/views/spree/admin/payment_methods/_form.html.erb +15 -2
  57. data/app/views/spree/admin/payment_methods/index.html.erb +2 -2
  58. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +3 -3
  59. data/app/views/spree/admin/products/_autocomplete.js.erb +1 -1
  60. data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
  61. data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
  62. data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
  63. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +1 -1
  64. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +1 -1
  65. data/app/views/spree/admin/promotions/index.html.erb +2 -2
  66. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +1 -1
  67. data/app/views/spree/admin/properties/index.html.erb +1 -1
  68. data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
  69. data/app/views/spree/admin/prototypes/index.html.erb +1 -1
  70. data/app/views/spree/admin/reimbursement_types/index.html.erb +1 -1
  71. data/app/views/spree/admin/return_authorizations/index.html.erb +1 -1
  72. data/app/views/spree/admin/roles/index.html.erb +1 -1
  73. data/app/views/spree/admin/shared/_account_nav.html.erb +31 -17
  74. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
  75. data/app/views/spree/admin/shared/_head.html.erb +7 -1
  76. data/app/views/spree/admin/shared/_header.html.erb +27 -19
  77. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  78. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -11
  79. data/app/views/spree/admin/shared/_product_tabs.html.erb +1 -11
  80. data/app/views/spree/admin/shared/_store_switcher.html.erb +5 -5
  81. data/app/views/spree/admin/shared/_tabs.html.erb +11 -0
  82. data/app/views/spree/admin/shared/_version.html.erb +20 -7
  83. data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
  84. data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
  85. data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
  86. data/app/views/spree/admin/states/index.html.erb +1 -1
  87. data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
  88. data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
  89. data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
  90. data/app/views/spree/admin/stock_transfers/show.html.erb +1 -1
  91. data/app/views/spree/admin/store_credit_categories/index.html.erb +1 -1
  92. data/app/views/spree/admin/stores/edit.html.erb +1 -1
  93. data/app/views/spree/admin/stores/index.html.erb +1 -1
  94. data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
  95. data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
  96. data/app/views/spree/admin/taxonomies/_list.html.erb +1 -1
  97. data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
  98. data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
  99. data/app/views/spree/admin/users/_tabs.html.erb +1 -11
  100. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
  101. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
  102. data/app/views/spree/admin/variants/_split.js.erb +1 -1
  103. data/app/views/spree/admin/variants/index.html.erb +1 -1
  104. data/app/views/spree/admin/webhooks_subscribers/index.html.erb +12 -1
  105. data/app/views/spree/admin/zones/index.html.erb +1 -1
  106. data/app/views/spree/layouts/admin.html.erb +1 -1
  107. data/config/importmap.rb +9 -0
  108. data/config/locales/en.yml +4 -1
  109. data/lib/generators/spree/backend/install/install_generator.rb +0 -2
  110. data/lib/spree/backend/configuration.rb +0 -2
  111. data/lib/spree/backend/engine.rb +13 -0
  112. data/lib/spree/backend/runtime_configuration.rb +8 -0
  113. data/lib/spree/backend/version.rb +1 -1
  114. data/lib/spree/backend.rb +4 -2
  115. data/lib/spree_backend.rb +2 -2
  116. data/license.md +8 -3
  117. data/spree_backend.gemspec +6 -4
  118. metadata +70 -28
  119. data/app/assets/images/admin/logo.png +0 -0
  120. data/app/javascript/spree/dashboard/index.js +0 -54
  121. data/app/javascript/spree/dashboard/utilities/bootstrap.js +0 -17
  122. data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +0 -6
  123. data/package.json +0 -46
  124. data/rollup.config.js +0 -43
  125. data/yarn.lock +0 -1012
  126. /data/app/javascript/spree/{dashboard → backend}/controllers/password_toggle_controller.js +0 -0
  127. /data/app/javascript/spree/{dashboard → backend}/controllers/product_edit_controller.js +0 -0
  128. /data/app/javascript/spree/{dashboard → backend}/controllers/spree_controller.js +0 -0
  129. /data/app/javascript/spree/{dashboard → backend}/controllers/upload_button_controller.js +0 -0
  130. /data/app/javascript/spree/{dashboard → backend}/controllers/webhooks_subscriber_events_controller.js +0 -0
@@ -21,7 +21,7 @@
21
21
  <div class="card-footer">
22
22
  <div class="row text-center pb-0">
23
23
  <div class="col-12 col-lg-6">
24
- <%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :put, class: "btn btn-success" %>
24
+ <%= button_to Spree.t(:open_all_adjustments), open_adjustments_admin_order_path(@order), method: :put, class: "btn btn-primary" %>
25
25
  </div>
26
26
  <div class="col-12 col-lg-6">
27
27
  <%= button_to Spree.t(:close_all_adjustments), close_adjustments_admin_order_path(@order), method: :put, class: "btn btn-danger" %>
@@ -16,17 +16,17 @@
16
16
 
17
17
  <span id="visibilityStatus" class="d-flex align-items-center">
18
18
  <span class="page_hidden badge badge-pill badge-secondary <% if @cms_page.visible? %>d-none<% end %>">
19
- <%= svg_icon name: "eye-slash-fill.svg", width: '18', height: '18' %> <%= Spree.t('admin.cms.draft_mode') %>
19
+ <%= svg_icon name: "eye-slash-fill.svg", width: '14', height: '14' %> <%= Spree.t('admin.cms.draft_mode') %>
20
20
  </span>
21
21
 
22
22
  <span class="page_visible badge badge-pill badge-primary <% if @cms_page.draft_mode? %>d-none<% end %>">
23
- <%= svg_icon name: "view.svg", width: '18', height: '18' %> <%= Spree.t('admin.cms.visible') %>
23
+ <%= svg_icon name: "view.svg", width: '14', height: '14' %> <%= Spree.t('admin.cms.visible') %>
24
24
  </span>
25
25
  </span>
26
26
  </div>
27
27
  <div class="col-auto d-flex align-items-center">
28
28
  <span class="badge badge-pill badge-secondary">
29
- <%= svg_icon name: "translate.svg", width: '18', height: '18' %> <%= locale_full_name(@cms_page.locale) %>
29
+ <%= svg_icon name: "translate.svg", width: '14', height: '14' %> <%= locale_full_name(@cms_page.locale) %>
30
30
  </span>
31
31
  </div>
32
32
  </div>
@@ -4,7 +4,7 @@
4
4
  <hr class="mt-4 hide-on-full-screen-mode">
5
5
  <div class="row">
6
6
  <div class="col d-flex justify-content-start">
7
- <%= button_link_to Spree.t('admin.cms.add_new_section'), spree.new_admin_cms_page_cms_section_path(@cms_page), icon: 'add.svg', class: 'no-wrap btn btn-success align-self-center' %>
7
+ <%= button_link_to Spree.t('admin.cms.add_new_section'), spree.new_admin_cms_page_cms_section_path(@cms_page), icon: 'add.svg', class: 'no-wrap btn btn-primary align-self-center' %>
8
8
  </div>
9
9
  <div class="col d-none d-md-flex justify-content-end">
10
10
  <div id="LiveViewSwitcher" class="btn-group btn-group-toggle" data-toggle="buttons">
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t('admin.cms.add_new_page'), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'new_page' } %>
6
+ <%= button_link_to Spree.t('admin.cms.add_new_page'), new_object_url, { class: "btn-primary", icon: 'add.svg', id: 'new_page' } %>
7
7
  <% end if can?(:create, Spree::CmsPage) %>
8
8
 
9
9
  <% content_for :table_filter do %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_country), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'admin_new_country' } %>
6
+ <%= button_link_to Spree.t(:new_country), new_object_url, { class: "btn-primary", icon: 'add.svg', id: 'admin_new_country' } %>
7
7
  <% end if can? :create, Spree::Country %>
8
8
  <div class="table-responsive border rounded bg-white">
9
9
  <table class="table" id='listing_countries' data-hook>
@@ -40,7 +40,7 @@
40
40
  <% if show_decision %>
41
41
  <td class='actions'>
42
42
  <span class="d-flex justify-content-end">
43
- <%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-success btn-sm', params: { "return_item[acceptance_status]" => 'accepted' }, "data-action" => 'save', title: Spree.t(:accept), method: 'put' } do %>
43
+ <%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-primary btn-sm', params: { "return_item[acceptance_status]" => 'accepted' }, "data-action" => 'save', title: Spree.t(:accept), method: 'put' } do %>
44
44
  <%= Spree.t(:accept) %>
45
45
  <% end if can?(:accept, return_item) %>
46
46
  <%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-danger btn-sm', params: { "return_item[acceptance_status]" => 'rejected' }, "data-action" => 'remove', title: Spree.t(:reject), method: 'put' } do %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <% content_for :page_actions do %>
4
4
  <% if @order.shipments.any?(&:shipped?) && can?(:create, Spree::CustomerReturn) %>
5
- <%= button_link_to Spree.t(:new_customer_return), spree.new_admin_order_customer_return_path(@order), icon: 'add.svg', class: 'btn-success' %>
5
+ <%= button_link_to Spree.t(:new_customer_return), spree.new_admin_order_customer_return_path(@order), icon: 'add.svg', class: 'btn-primary' %>
6
6
  <% end %>
7
7
  <% end %>
8
8
 
@@ -1,4 +1,4 @@
1
- <h4 class="mb-3"><%= Spree.t('admin.gettting_started.lets_get_you_started') %></h4>
1
+ <h4 class="mb-3"><%= Spree.t('admin.getting_started.lets_get_you_started') %></h4>
2
2
 
3
3
  <div class="row mb-3">
4
4
  <div class="col-4">
@@ -9,7 +9,7 @@
9
9
  <% else %>
10
10
  <%= svg_icon name: 'tags', width: 20, height: 20, classes: "mr-3" %>
11
11
  <% end %>
12
- <%= Spree.t('admin.gettting_started.add_products') %>
12
+ <%= Spree.t('admin.getting_started.add_products') %>
13
13
  </a>
14
14
  <a class="list-group-item list-group-item-action <% if @shipping_methods_added %>list-group-item-info<% elsif @active_tab == 'shipping' %>active<% end %>" id="list-shipping-list" data-toggle="list" href="#list-shipping" role="tab" aria-controls="shipping">
15
15
  <% if @shipping_methods_added %>
@@ -17,7 +17,7 @@
17
17
  <% else %>
18
18
  <%= svg_icon name: 'truck', width: 20, height: 20, classes: "mr-3" %>
19
19
  <% end %>
20
- <%= Spree.t('admin.gettting_started.setup_shipping') %>
20
+ <%= Spree.t('admin.getting_started.setup_shipping') %>
21
21
  </a>
22
22
  <a class="list-group-item list-group-item-action <% if @payment_methods_added %>list-group-item-info<% elsif @active_tab == 'payments' %>active<% end %>" id="list-payments-list" data-toggle="list" href="#list-payments" role="tab" aria-controls="payments">
23
23
  <% if @payment_methods_added %>
@@ -25,7 +25,7 @@
25
25
  <% else %>
26
26
  <%= svg_icon name: 'cash-coin', width: 20, height: 20, classes: "mr-3" %>
27
27
  <% end %>
28
- <%= Spree.t('admin.gettting_started.setup_payment_method') %>
28
+ <%= Spree.t('admin.getting_started.setup_payment_method') %>
29
29
  </a>
30
30
  <a class="list-group-item list-group-item-action <% if @taxes_added %>list-group-item-info<% elsif @active_tab == 'taxes' %>active<% end %>" id="list-taxes-list" data-toggle="list" href="#list-taxes" role="tab" aria-controls="taxes">
31
31
  <% if @taxes_added %>
@@ -33,7 +33,7 @@
33
33
  <% else %>
34
34
  <%= svg_icon name: 'receipt', width: 20, height: 20, classes: "mr-3" %>
35
35
  <% end %>
36
- <%= Spree.t('admin.gettting_started.setup_taxes') %>
36
+ <%= Spree.t('admin.getting_started.setup_taxes') %>
37
37
  </a>
38
38
  </div>
39
39
  </div>
@@ -41,19 +41,19 @@
41
41
  <div class="tab-content" id="nav-tabContent">
42
42
  <div class="tab-pane fade <% if @active_tab == 'products'%>show active<% end %>" id="list-products" role="tabpanel" aria-labelledby="list-products-list">
43
43
  <% if @products_added %>
44
- <p><%= Spree.t('admin.gettting_started.products_section.message_with_products_html', count: current_store.products.count ) %></p>
44
+ <p><%= Spree.t('admin.getting_started.products_section.message_with_products_html', count: current_store.products.count ) %></p>
45
45
  <% else %>
46
46
  <p>
47
- <%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
48
- <%= link_to(Spree.t('admin.gettting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product') %>
47
+ <%= Spree.t('admin.getting_started.products_section.message_without_products') %>
48
+ <%= link_to(Spree.t('admin.getting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product') %>
49
49
  </p>
50
- <%= link_to_with_icon 'add.svg', Spree.t('admin.gettting_started.add_products'), spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
50
+ <%= link_to_with_icon 'add.svg', Spree.t('admin.getting_started.add_products'), spree.admin_products_path, class: 'btn btn-primary btn-sm mb-2' %>
51
51
  <% end %>
52
52
  </div>
53
53
  <div class="tab-pane fade <% if @active_tab == 'shipping'%>show active<% end %>" id="list-shipping" role="tabpanel" aria-labelledby="list-shipping-list">
54
54
  <% if @shipping_methods_added %>
55
55
  <p>
56
- <%= Spree.t('admin.gettting_started.shipping_section.message_with_shipping') %>
56
+ <%= Spree.t('admin.getting_started.shipping_section.message_with_shipping') %>
57
57
  <% @shippable_countries.each do |country| %>
58
58
  <strong class="mr-2">
59
59
  <%= country.name %>
@@ -63,33 +63,33 @@
63
63
  </p>
64
64
  <% else %>
65
65
  <p>
66
- <%= Spree.t('admin.gettting_started.shipping_section.message_without_shipping') %>
66
+ <%= Spree.t('admin.getting_started.shipping_section.message_without_shipping') %>
67
67
  </p>
68
- <%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_shipping'), spree.admin_shipping_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
68
+ <%= link_to_with_icon 'settings.svg', Spree.t('admin.getting_started.setup_shipping'), spree.admin_shipping_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
69
69
  <% end %>
70
70
  </div>
71
71
  <div class="tab-pane fade <% if @active_tab == 'payments'%>show active<% end %>" id="list-payments" role="tabpanel" aria-labelledby="list-payments-list">
72
72
  <% if @payment_methods_added %>
73
73
  <p>
74
- <%= Spree.t('admin.gettting_started.payment_methods_section.message_with_payment_method') %>
74
+ <%= Spree.t('admin.getting_started.payment_methods_section.message_with_payment_method') %>
75
75
  </p>
76
76
  <% else %>
77
77
  <p>
78
- <%= Spree.t('admin.gettting_started.payment_methods_section.message_without_payment_method') %>
78
+ <%= Spree.t('admin.getting_started.payment_methods_section.message_without_payment_method') %>
79
79
  </p>
80
- <%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_payment_method'), spree.admin_payment_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
80
+ <%= link_to_with_icon 'settings.svg', Spree.t('admin.getting_started.setup_payment_method'), spree.admin_payment_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
81
81
  <% end %>
82
82
  </div>
83
83
  <div class="tab-pane fade <% if @active_tab == 'taxes' %>show active<% end %>" id="list-taxes" role="tabpanel" aria-labelledby="list-taxes-list">
84
84
  <% if @taxes_added %>
85
85
  <p>
86
- <%= Spree.t('admin.gettting_started.taxes_section.message_with_taxes') %>
86
+ <%= Spree.t('admin.getting_started.taxes_section.message_with_taxes') %>
87
87
  </p>
88
88
  <% else %>
89
89
  <p>
90
- <%= Spree.t('admin.gettting_started.taxes_section.message_without_taxes') %>
90
+ <%= Spree.t('admin.getting_started.taxes_section.message_without_taxes') %>
91
91
  </p>
92
- <%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_taxes_calculation'), spree.admin_tax_rates_path, class: 'btn btn-primary btn-sm mb-2' %>
92
+ <%= link_to_with_icon 'settings.svg', Spree.t('admin.getting_started.setup_taxes_calculation'), spree.admin_tax_rates_path, class: 'btn btn-primary btn-sm mb-2' %>
93
93
  <% end %>
94
94
 
95
95
  </div>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t('admin.data_feeds.new_data_feed'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_data_feed_link' %>
6
+ <%= button_link_to Spree.t('admin.data_feeds.new_data_feed'), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_data_feed_link' %>
7
7
  <% end if can?(:create, Spree::DataFeed) %>
8
8
 
9
9
  <% if @data_feeds.present? %>
@@ -47,7 +47,7 @@
47
47
  <tr id="<%= spree_dom_id image %>" data-hook="images_row">
48
48
  <td class="move-handle text-center">
49
49
  <% if can? :edit, image %>
50
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
50
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
51
51
  <% end %>
52
52
  </td>
53
53
  <td class="image text-center">
@@ -31,7 +31,7 @@
31
31
  <h5 class="mb-0 align-self-center"><%= Spree.t('admin.navigation.menu_items', menu_name: @menu.name) %></h5>
32
32
  </div>
33
33
  <div class="col d-flex justify-content-end">
34
- <%= button_link_to Spree.t('admin.navigation.add_new_item', menu: @menu.name), spree.new_admin_menu_menu_item_path(@menu), icon: 'add.svg', class: 'no-wrap btn btn-success align-self-center' %>
34
+ <%= button_link_to Spree.t('admin.navigation.add_new_item', menu: @menu.name), spree.new_admin_menu_menu_item_path(@menu), icon: 'add.svg', class: 'no-wrap btn btn-primary align-self-center' %>
35
35
  </div>
36
36
  </div>
37
37
  </div>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t('admin.navigation.add_new_menu'), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'new_menu' } %>
6
+ <%= button_link_to Spree.t('admin.navigation.add_new_menu'), new_object_url, { class: "btn-primary", icon: 'add.svg', id: 'new_menu' } %>
7
7
  <% end if can?(:create, Spree::Menu) %>
8
8
 
9
9
  <% content_for :table_filter do %>
@@ -3,13 +3,13 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_role_link' %>
6
+ <%= button_link_to Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_role_link' %>
7
7
  <% end if can? :create, Spree::OauthApplication %>
8
8
 
9
9
  <div class="card bg-light">
10
10
  <div class="card-body">
11
11
  <%=Spree.t('admin.oauth_applications.documentation_message')%>
12
- <%= link_to(Spree.t('admin.oauth_applications.documentation_cta'), 'https://dev-docs.spreecommerce.org/api/platform-api/authenticating-requests')%>
12
+ <%= link_to(Spree.t('admin.oauth_applications.documentation_cta'), 'https://docs.spreecommerce.org/api-reference/platform/authentication')%>
13
13
  </div>
14
14
  </div>
15
15
 
@@ -33,7 +33,7 @@
33
33
  <%= password_field_tag :password, application.uid, class: 'form-control unhide text-muted border-0 shadow-none bg-transparent', data: { password_toggle_target: 'unhide' }, readonly: true %>
34
34
  <div class="input-group-append">
35
35
  <%= button_tag class: 'btn btn-link rounded', data: { action: 'click->password-toggle#password' } do %>
36
- <%= svg_icon name: "view.svg", width: '18', height: '18' %>
36
+ <%= svg_icon name: "view.svg", width: '14', height: '14' %>
37
37
  <% end %>
38
38
  </div>
39
39
  </div>
@@ -1,6 +1,6 @@
1
1
  <tr class="option_value fields" id="spree_<%= dom_id(f.object) %>" data-hook="option_value">
2
2
  <td class="move-handle text-center">
3
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
3
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
4
4
  <%= f.hidden_field :id %>
5
5
  </td>
6
6
  <td class="name"><%= f.text_field :name, class: "form-control", required: true %></td>
@@ -40,7 +40,7 @@
40
40
  <tr>
41
41
  <td colspan="4">
42
42
  <div id="new_add_option_value" class="d-flex" data-hook>
43
- <%= button_link_to Spree.t(:add_option_value), "javascript:;", { icon: 'add.svg', :'data-target' => "tbody#sortVert", class: 'btn-success mx-auto spree_add_fields' } %>
43
+ <%= button_link_to Spree.t(:add_option_value), "javascript:;", { icon: 'add.svg', :'data-target' => "tbody#sortVert", class: 'btn-primary mx-auto spree_add_fields' } %>
44
44
  </div>
45
45
  </td>
46
46
  </tr>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <% content_for :page_actions do %>
6
6
  <span id="new_ot_link">
7
- <%= button_link_to Spree.t(:new_option_type), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'new_option_type_link' } %>
7
+ <%= button_link_to Spree.t(:new_option_type), new_object_url, { class: "btn-primary", icon: 'add.svg', id: 'new_option_type_link' } %>
8
8
  </span>
9
9
  <% end if can?(:create, Spree::OptionType) %>
10
10
 
@@ -26,7 +26,7 @@
26
26
  <% @option_types.each do |option_type| %>
27
27
  <tr class="spree_option_type <%= cycle('odd', 'even') %>" id="<%= spree_dom_id option_type %>" data-hook="option_row">
28
28
  <td class="move-handle text-center">
29
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
29
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
30
30
  </td>
31
31
  <td><%= option_type.name %></td>
32
32
  <td class="presentation"><%= option_type.presentation %></td>
@@ -9,7 +9,7 @@
9
9
  <% end %>
10
10
  </div>
11
11
  <div class="form-actions" data-hook="buttons">
12
- <%= button Spree.t('actions.update'), 'recycle.svg', 'submit', { class: 'btn-success', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
12
+ <%= button Spree.t('actions.update'), 'recycle.svg', 'submit', { class: 'btn-primary', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
13
13
  <span class="or"><%= Spree.t(:or) %></span>
14
14
  <%= button_link_to Spree.t('actions.cancel'), edit_admin_order_url(order), icon: 'cancel.svg' %>
15
15
  </div>
@@ -39,7 +39,7 @@
39
39
  <span class="d-flex justify-content-center">
40
40
  <% if can? :update, item %>
41
41
  <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-line-item btn btn-light btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
42
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-success btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
42
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-primary btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
43
43
  <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "#", class: 'edit-line-item btn btn-light btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
44
44
  <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-line-item btn btn-danger btn-sm', data: { 'line-item-id' => item.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
45
45
  <% end %>
@@ -3,19 +3,21 @@
3
3
  <%= render partial: "spree/admin/variants/split", formats: :js %>
4
4
 
5
5
  <div class="card-header stock-location no-borderb" data-hook="stock-location">
6
- <h5 class="flex-wrap align-items-center card-title mb-0 h6">
7
- <span class="shipment-number"><%= shipment.number %></span>
8
- -
9
- <span class="shipment-state"><%= Spree.t("shipment_states.#{shipment.state}") %></span>
10
- <%= Spree.t(:package_from) %>
11
- <strong class="stock-location-name" data-hook="stock-location-name">
12
- <%= link_to shipment.stock_location.name, spree.edit_admin_stock_location_url(shipment.stock_location) %>
13
- </strong>
6
+ <div class="d-flex align-items-center justify-content-between">
7
+ <h5 class="flex-wrap align-items-center card-title mb-0 h6">
8
+ <span class="shipment-number"><%= shipment.number %></span>
9
+ -
10
+ <span class="shipment-state"><%= Spree.t("shipment_states.#{shipment.state}") %></span>
11
+ <%= Spree.t(:package_from) %>
12
+ <strong class="stock-location-name" data-hook="stock-location-name">
13
+ <%= link_to shipment.stock_location.name, spree.edit_admin_stock_location_url(shipment.stock_location) %>
14
+ </strong>
15
+ </h5>
14
16
  <% if shipment.ready? and can? :update, shipment %>
15
- <%= link_to Spree.t(:ship), 'javascript:;', class: 'ship ml-auto btn btn-success', data: { 'shipment-number' => shipment.number } %>
17
+ <%= link_to Spree.t(:ship), 'javascript:;', class: 'ship ml-auto btn btn-primary', data: { 'shipment-number' => shipment.number } %>
16
18
  <div class='clearfix'></div>
17
19
  <% end %>
18
- </h5>
20
+ </div>
19
21
  </div>
20
22
 
21
23
  <div class="table-responsive bg-white">
@@ -47,7 +49,7 @@
47
49
  <span class="d-flex justify-content-center">
48
50
  <% if can? :update, shipment %>
49
51
  <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-method btn btn-light btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
50
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-method btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
52
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-method btn btn-primary btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
51
53
  <% end %>
52
54
  </span>
53
55
  </td>
@@ -84,7 +86,7 @@
84
86
  <span class="d-flex justify-content-center">
85
87
  <% if can? :update, shipment %>
86
88
  <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-tracking btn btn-light btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
87
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-tracking btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
89
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-tracking btn btn-primary btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
88
90
  <% end %>
89
91
  </span>
90
92
  </td>
@@ -36,7 +36,7 @@
36
36
  <% if((!shipment.shipped?) && can?(:update, item.line_item)) %>
37
37
  <%= link_to_with_icon 'edit.svg', Spree.t('actions.edit'), "#", class: 'edit-item btn btn-light btn-sm', title: Spree.t('actions.edit'), no_text: true %>
38
38
  <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-item btn btn-light btn-sm', data: { action: 'cancel' }, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
39
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-item btn btn-success btn-sm', data: {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none', no_text: true %>
39
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-item btn btn-primary btn-sm', data: {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none', no_text: true %>
40
40
  <%= link_to_with_icon 'split.svg', Spree.t('split'), "#", class: 'split-item btn btn-light btn-sm', data: {action: 'split', 'variant-id' => item.variant.id}, title: Spree.t('split'), no_text: true %>
41
41
  <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-item btn btn-danger btn-sm', data: { 'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
42
42
  <% end %>
@@ -56,14 +56,26 @@
56
56
  </div>
57
57
  </div>
58
58
 
59
+ <% unless @object.new_record? %>
59
60
  <div class="col-12 col-md-6">
61
+
62
+ <% if @object.respond_to?(:payment_configuration_guide) %>
63
+ <div class="card mb-3">
64
+ <div class="card-header">
65
+ <h5 class="mb-0"><%= Spree.t(:payment_method_configuration) %></h5>
66
+ </div>
67
+ <div class="card-body">
68
+ <%= render "spree/admin/payment_methods/configuration_guides/#{@object.payment_configuration_guide}" %>
69
+ </div>
70
+ </div>
71
+ <% end %>
72
+
60
73
  <div class="card mb-3">
61
74
  <div class="card-header">
62
75
  <h5 class="mb-0"><%= Spree.t(:payment_provider_settings) %></h5>
63
76
  </div>
64
77
  <div class="card-body">
65
78
  <div id="preference-settings" data-hook class="form-group">
66
- <% unless @object.new_record? %>
67
79
  <% if preference_fields(@object, f).empty? %>
68
80
  <%= Spree.t('no_payment_provider_settings_message') %>
69
81
  <% end %>
@@ -72,10 +84,11 @@
72
84
  <% if @object.respond_to?(:preferences) %>
73
85
  <div id="gateway-settings-warning" class="info warning"><%= Spree.t(:provider_settings_warning) %></div>
74
86
  <% end %>
75
- <% end %>
76
87
  </div>
77
88
  </div>
78
89
  </div>
79
90
  </div>
91
+ <% end %>
92
+
80
93
  </div>
81
94
  </div>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_payment_method), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_payment_methods_link' %>
6
+ <%= button_link_to Spree.t(:new_payment_method), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_payment_methods_link' %>
7
7
  <% end if can? :create, Spree::PaymentMethod %>
8
8
 
9
9
  <% content_for :table_filter do %>
@@ -41,7 +41,7 @@
41
41
  <tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows">
42
42
  <td class="move-handle text-center">
43
43
  <% if can?(:edit, method) %>
44
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
44
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
45
45
  <% end %>
46
46
  </td>
47
47
  <td><%= method.name %></td>
@@ -1,12 +1,12 @@
1
1
  <tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">
2
2
  <% if f.object.persisted? && can?(:edit, f.object) %>
3
3
  <td class="move-handle">
4
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
4
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
5
5
  <%= f.hidden_field :id %>
6
6
  </td>
7
7
  <% else %>
8
8
  <td style="opacity:0.2;">
9
- <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %>
9
+ <%= svg_icon name: "grip-vertical.svg", width: '14', height: '14' %>
10
10
  <%= f.hidden_field :id %>
11
11
  </td>
12
12
  <% end %>
@@ -25,7 +25,7 @@
25
25
  <%= link_to_delete f.object, no_text: true %>
26
26
  <% else %>
27
27
  <span class="btn btn-danger btn-sm icon-link disabled" style="opacity:0.2;">
28
- <%= svg_icon name: "delete.svg", width: '18', height: '18' %>
28
+ <%= svg_icon name: "delete.svg", width: '14', height: '14' %>
29
29
  </span>
30
30
  <% end %>
31
31
  </span>
@@ -7,7 +7,7 @@
7
7
  </a>
8
8
  <div class="dropdown p-0">
9
9
  <button class="btn btn-light dropdown-toggle products-ddb btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
10
- <%= svg_icon name: "chevron-down.svg", width: '18', height: '18' %>
10
+ <%= svg_icon name: "chevron-down.svg", width: '14', height: '14' %>
11
11
  </button>
12
12
  <div class="dropdown-menu dropdown-menu-right p-2" aria-labelledby="dropdownMenuButton">
13
13
  <a href="{{ edit_product_url product.id }}" class="edit-product js-edit-product dropdown-item p-1"><%= Spree.t(:edit) %></a>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add.svg', class: 'btn-success' %>
6
+ <%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add.svg', class: 'btn-primary' %>
7
7
  <% end if can?(:create, Spree::PromotionCategory) %>
8
8
 
9
9
  <% if @promotion_categories.any? %>
@@ -12,7 +12,7 @@
12
12
  <%= select_tag 'action_type', options, class: 'select2' %>
13
13
  </div>
14
14
  <div class="form-actions">
15
- <%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-success" %>
15
+ <%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-primary" %>
16
16
  </div>
17
17
 
18
18
  <% end %>
@@ -12,7 +12,7 @@
12
12
  <%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), class: 'select2') %>
13
13
  </div>
14
14
  <div class="form-actions">
15
- <%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-success" %>
15
+ <%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-primary" %>
16
16
  </div>
17
17
 
18
18
  <% end %>
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
 
16
16
  <div class="js-tiers"></div>
17
- <button class="btn btn-success js-add-tier"><%= Spree.t(:add) %></button>
17
+ <button class="btn btn-primary js-add-tier"><%= Spree.t(:add) %></button>
18
18
 
19
19
  <script type="text/x-handlebars-template" id="tier-input-name">
20
20
  <%= prefix %>[calculator_attributes][preferred_tiers][{{base}}]
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
 
16
16
  <div class="js-tiers"></div>
17
- <button class="btn btn-success js-add-tier"><%= Spree.t(:add) %></button>
17
+ <button class="btn btn-primary js-add-tier"><%= Spree.t(:add) %></button>
18
18
 
19
19
  <script type="text/x-handlebars-template" id="tier-input-name">
20
20
  <%= prefix %>[calculator_attributes][preferred_tiers][{{base}}]
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add.svg' %>
6
+ <%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-primary", icon: 'add.svg' %>
7
7
  <% end if can?(:create, Spree::Promotion) %>
8
8
 
9
9
  <% content_for :table_filter do %>
@@ -64,7 +64,7 @@
64
64
  <td><%= promotion.description %></td>
65
65
  <td><%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %></td>
66
66
  <td><%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %></td>
67
- <td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
67
+ <td><%= promotion.expires_at.strftime('%F %T %Z') if promotion.expires_at %></td>
68
68
  <td class="actions" data-hook="admin_promotions_index_row_actions">
69
69
  <span class="d-flex justify-content-end">
70
70
  <%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %>
@@ -1,7 +1,7 @@
1
1
  <div class="card-body">
2
2
  <div class="promo-rule-option-values">
3
3
  <div class="js-promo-rule-option-values"></div> <!-- display div for option value select -->
4
- <button class="btn btn-primary btn-success js-add-promo-rule-option-value">
4
+ <button class="btn btn-primary btn-primary js-add-promo-rule-option-value">
5
5
  <%= svg_icon name: "plus-circle", width: '16', height: '16' %>
6
6
  <%= Spree.t(:add) %>
7
7
  </button>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add.svg', 'data-update' => 'new_property', id: 'new_property_link' } %>
6
+ <%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-primary", icon: 'add.svg', 'data-update' => 'new_property', id: 'new_property_link' } %>
7
7
  <% end if can?(:create, Spree::Property) %>
8
8
 
9
9
  <% content_for :table_filter do %>
@@ -15,7 +15,7 @@
15
15
  <%= link_to_with_icon 'save.svg',
16
16
  Spree.t(:select),
17
17
  select_admin_prototype_url(prototype),
18
- class: 'btn btn-success btn-sm ajax select_properties_from_prototype',
18
+ class: 'btn btn-primary btn-sm ajax select_properties_from_prototype',
19
19
  no_text: true %>
20
20
  </span>
21
21
  </td>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-success", icon: 'add.svg', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
6
+ <%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-primary", icon: 'add.svg', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
7
7
  <% end if can?(:create, Spree::Prototype) %>
8
8
 
9
9
  <% if @prototypes.any? %>
@@ -3,7 +3,7 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_reimbursement_type), new_object_url, { :class => "btn-success", :icon => 'add.svg', :id => 'admin_new_reimbursement_type' } %>
6
+ <%= button_link_to Spree.t(:new_reimbursement_type), new_object_url, { :class => "btn-primary", :icon => 'add.svg', :id => 'admin_new_reimbursement_type' } %>
7
7
  <% end if can?(:create, Spree::ReimbursementType) %>
8
8
 
9
9
  <% if @reimbursement_types.any? %>