spree_admin 5.5.3 → 5.6.0.rc2
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.
- checksums.yaml +4 -4
- data/app/assets/images/vercel-deploy-button.svg +14 -0
- data/app/assets/tailwind/spree/admin/components/_alerts.css +5 -1
- data/app/assets/tailwind/spree/admin/components/_badges.css +1 -1
- data/app/assets/tailwind/spree/admin/components/_breadcrumbs.css +1 -1
- data/app/assets/tailwind/spree/admin/components/_buttons.css +1 -1
- data/app/assets/tailwind/spree/admin/components/_cards.css +1 -1
- data/app/assets/tailwind/spree/admin/components/_dialogs.css +3 -1
- data/app/assets/tailwind/spree/admin/components/_dropdowns.css +2 -2
- data/app/assets/tailwind/spree/admin/components/_filters.css +1 -1
- data/app/assets/tailwind/spree/admin/components/_forms.css +10 -6
- data/app/assets/tailwind/spree/admin/components/_layout.css +30 -23
- data/app/assets/tailwind/spree/admin/components/_rtl.css +53 -0
- data/app/assets/tailwind/spree/admin/components/_search-picker.css +2 -2
- data/app/assets/tailwind/spree/admin/components/_tables.css +1 -1
- data/app/assets/tailwind/spree/admin/index.css +1 -0
- data/app/assets/tailwind/spree/admin/plugins/_tom-select.css +6 -6
- data/app/assets/tailwind/spree/admin/plugins/_trix.css +1 -1
- data/app/assets/tailwind/spree/admin/plugins/_uppy.css +1 -1
- data/app/assets/tailwind/spree/admin/views/_page-builder.css +8 -5
- data/app/controllers/concerns/spree/admin/locale_concern.rb +76 -0
- data/app/controllers/spree/admin/base_controller.rb +38 -2
- data/app/controllers/spree/admin/countries_controller.rb +18 -4
- data/app/controllers/spree/admin/exports_controller.rb +7 -0
- data/app/controllers/spree/admin/imports_controller.rb +8 -0
- data/app/controllers/spree/admin/products_controller.rb +1 -0
- data/app/controllers/spree/admin/storefront_controller.rb +100 -0
- data/app/controllers/spree/admin/user_sessions_controller.rb +10 -0
- data/app/controllers/spree/admin/variants_controller.rb +3 -1
- data/app/helpers/spree/admin/base_helper.rb +10 -0
- data/app/helpers/spree/admin/channels_helper.rb +17 -0
- data/app/helpers/spree/admin/dropdown_helper.rb +14 -0
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/helpers/spree/admin/onboarding_helper.rb +1 -1
- data/app/helpers/spree/admin/orders_helper.rb +9 -34
- data/app/helpers/spree/admin/products_helper.rb +1 -1
- data/app/helpers/spree/admin/rtl_helper.rb +15 -0
- data/app/helpers/spree/admin/shipment_helper.rb +1 -1
- data/app/helpers/spree/admin/storefront_helper.rb +46 -0
- data/app/helpers/spree/admin/stores_helper.rb +2 -1
- data/app/javascript/spree/admin/application.js +2 -0
- data/app/javascript/spree/admin/controllers/autocomplete_select_controller.js +4 -0
- data/app/javascript/spree/admin/controllers/calendar_range_controller.js +7 -3
- data/app/javascript/spree/admin/controllers/display_name_controller.js +18 -0
- data/app/javascript/spree/admin/controllers/query_builder_controller.js +39 -28
- data/app/javascript/spree/admin/controllers/variants_form_controller.js +49 -1
- data/app/javascript/spree/admin/helpers/display_names.js +54 -0
- data/app/models/spree/admin/table/column.rb +15 -1
- data/app/models/spree/admin/table/filter.rb +23 -16
- data/app/models/spree/admin/table/query_builder.rb +11 -2
- data/app/models/spree/admin/updater.rb +35 -20
- data/app/views/active_storage/_upload_form.html.erb +1 -1
- data/app/views/layouts/spree/admin.html.erb +1 -1
- data/app/views/layouts/spree/admin_settings.html.erb +1 -1
- data/app/views/layouts/spree/admin_wizard.html.erb +2 -2
- data/app/views/layouts/spree/minimal.html.erb +1 -1
- data/app/views/spree/admin/admin_users/_audit_log.html.erb +2 -2
- data/app/views/spree/admin/admin_users/new.html.erb +1 -1
- data/app/views/spree/admin/assets/edit.html.erb +1 -1
- data/app/views/spree/admin/channels/_form.html.erb +10 -0
- data/app/views/spree/admin/dashboard/_setup_progress.html.erb +4 -4
- data/app/views/spree/admin/dashboard/_setup_tasks.html.erb +5 -4
- data/app/views/spree/admin/dashboard/_updater.html.erb +4 -4
- data/app/views/spree/admin/dashboard/_visits.html.erb +12 -12
- data/app/views/spree/admin/dashboard/analytics.html.erb +5 -5
- data/app/views/spree/admin/dashboard/setup_tasks/_add_products.html.erb +4 -4
- data/app/views/spree/admin/dashboard/setup_tasks/_set_customer_support_email.html.erb +3 -4
- data/app/views/spree/admin/dashboard/setup_tasks/_setup_storefront.html.erb +18 -0
- data/app/views/spree/admin/gift_card_batches/_form.html.erb +1 -1
- data/app/views/spree/admin/import_rows/show.html.erb +2 -2
- data/app/views/spree/admin/imports/_footer.html.erb +1 -1
- data/app/views/spree/admin/imports/_mapping_form.html.erb +1 -1
- data/app/views/spree/admin/imports/show.html.erb +3 -3
- data/app/views/spree/admin/integrations/_integration.html.erb +1 -1
- data/app/views/spree/admin/integrations/index.html.erb +2 -4
- data/app/views/spree/admin/invitations/_invitation.html.erb +1 -1
- data/app/views/spree/admin/invitations/new.html.erb +1 -1
- data/app/views/spree/admin/invitations/show.html.erb +1 -1
- data/app/views/spree/admin/line_items/new.html.erb +1 -1
- data/app/views/spree/admin/markets/_form.html.erb +8 -6
- data/app/views/spree/admin/metafields/edit.html.erb +1 -1
- data/app/views/spree/admin/option_types/_form.html.erb +9 -6
- data/app/views/spree/admin/option_types/index.html.erb +2 -3
- data/app/views/spree/admin/orders/_customer.html.erb +1 -1
- data/app/views/spree/admin/orders/_customer_summary.html.erb +1 -1
- data/app/views/spree/admin/orders/_payments.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment.html.erb +7 -2
- data/app/views/spree/admin/orders/_shipments.html.erb +1 -1
- data/app/views/spree/admin/orders/_user_overview.html.erb +9 -6
- data/app/views/spree/admin/orders/return_authorizations/edit.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/index.html.erb +2 -2
- data/app/views/spree/admin/payments/_payment.html.erb +1 -1
- data/app/views/spree/admin/price_lists/index.html.erb +2 -2
- data/app/views/spree/admin/products/form/_inventory.html.erb +19 -0
- data/app/views/spree/admin/products/form/_publishing.html.erb +2 -3
- data/app/views/spree/admin/products/index.html.erb +1 -2
- data/app/views/spree/admin/profile/edit.html.erb +3 -0
- data/app/views/spree/admin/promotion_rules/forms/_channel.html.erb +7 -0
- data/app/views/spree/admin/promotion_rules/forms/_country.html.erb +1 -1
- data/app/views/spree/admin/promotion_rules/forms/_item_total.html.erb +1 -1
- data/app/views/spree/admin/promotion_rules/forms/_market.html.erb +7 -0
- data/app/views/spree/admin/promotions/_form.html.erb +2 -2
- data/app/views/spree/admin/promotions/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/form/_kind.html.erb +11 -11
- data/app/views/spree/admin/promotions/form/_settings.html.erb +4 -5
- data/app/views/spree/admin/reports/new.html.erb +2 -2
- data/app/views/spree/admin/shared/_address.html.erb +1 -1
- data/app/views/spree/admin/shared/_analytics_loader_skeleton.html.erb +5 -5
- data/app/views/spree/admin/shared/_calendar_range_picker.html.erb +11 -1
- data/app/views/spree/admin/shared/_content_header.html.erb +2 -2
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_filters_search_bar.html.erb +1 -1
- data/app/views/spree/admin/shared/_growth_rate_badge.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +4 -1
- data/app/views/spree/admin/shared/_index_table_options.html.erb +2 -2
- data/app/views/spree/admin/shared/_media_asset.html.erb +1 -1
- data/app/views/spree/admin/shared/_media_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_seo.html.erb +1 -1
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/sidebar/_enterprise_edition_notice.html.erb +2 -2
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/form/_display.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/form/_estimated_transit_business_days.html.erb +1 -2
- data/app/views/spree/admin/shipping_methods/form/_tracking_url.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/form/_zones.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/storefront/show.html.erb +150 -0
- data/app/views/spree/admin/stores/form/_basic.html.erb +2 -2
- data/app/views/spree/admin/stores/form/_checkout.html.erb +4 -0
- data/app/views/spree/admin/stores/form/_emails.html.erb +4 -6
- data/app/views/spree/admin/tables/_table.html.erb +3 -2
- data/app/views/spree/admin/taxons/_form.html.erb +2 -2
- data/app/views/spree/admin/user_sessions/new.html.erb +11 -2
- data/app/views/spree/admin/users/_tabs.html.erb +1 -1
- data/app/views/spree/admin/variants/_search_result.html.erb +1 -1
- data/app/views/spree/admin/variants/_variant.html.erb +1 -1
- data/app/views/spree/admin/variants/form/_inventory.html.erb +17 -0
- data/app/views/spree/admin/webhook_endpoints/_form.html.erb +2 -2
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/config/i18n-tasks.yml +3 -0
- data/config/initializers/spree_admin_navigation.rb +9 -0
- data/config/initializers/spree_admin_tables.rb +20 -18
- data/config/locales/en.yml +647 -0
- data/config/routes.rb +5 -0
- metadata +18 -6
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<div class="grid grid-cols-12 gap-6 pt-6">
|
|
2
|
+
<div class="col-span-12 lg:col-span-8 lg:col-start-3 mb-6">
|
|
3
|
+
<h2 class="page-header-title">
|
|
4
|
+
<%= onboarding_check_circle(current_store.storefront_setup?) %>
|
|
5
|
+
<%= Spree.t('admin.storefront_setup.title') %>
|
|
6
|
+
</h2>
|
|
7
|
+
<p class="mb-4">
|
|
8
|
+
<%= Spree.t('admin.storefront_setup.description') %>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<% if @deployment_origin.present? %>
|
|
12
|
+
<div class="card mb-6">
|
|
13
|
+
<div class="card-body flex flex-col gap-3">
|
|
14
|
+
<% if @deployment_origin_allowed %>
|
|
15
|
+
<div class="flex items-center gap-2">
|
|
16
|
+
<%= onboarding_check_circle(true) %>
|
|
17
|
+
<span>
|
|
18
|
+
<%= Spree.t('admin.storefront_setup.deployment_already_allowed') %>
|
|
19
|
+
<%= link_to @deployment_origin, @deployment_origin, target: :_blank, rel: 'noopener', class: 'font-medium' %>
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
22
|
+
<% else %>
|
|
23
|
+
<h5 class="font-medium">
|
|
24
|
+
🎉 <%= Spree.t('admin.storefront_setup.deployed_title') %>
|
|
25
|
+
</h5>
|
|
26
|
+
<p>
|
|
27
|
+
<%= Spree.t('admin.storefront_setup.deployed_copy') %>
|
|
28
|
+
<%= link_to @deployment_origin, @deployment_origin, target: :_blank, rel: 'noopener', class: 'font-medium' %>
|
|
29
|
+
</p>
|
|
30
|
+
<div class="flex items-center gap-2">
|
|
31
|
+
<%= form_with url: spree.admin_storefront_allow_origin_path, method: :post, data: { turbo: false } do %>
|
|
32
|
+
<%= hidden_field_tag :origin, @deployment_origin %>
|
|
33
|
+
<button type="submit" class="btn btn-primary">
|
|
34
|
+
<%= Spree.t('admin.storefront_setup.allow_origin_button') %>
|
|
35
|
+
</button>
|
|
36
|
+
<% end %>
|
|
37
|
+
<% if @vercel_dashboard_url.present? %>
|
|
38
|
+
<%= link_to @vercel_dashboard_url, target: :_blank, rel: 'noopener', class: 'btn btn-light' do %>
|
|
39
|
+
<%= icon('external-link') %>
|
|
40
|
+
<%= Spree.t('admin.storefront_setup.view_on_vercel') %>
|
|
41
|
+
<% end %>
|
|
42
|
+
<% end %>
|
|
43
|
+
</div>
|
|
44
|
+
<% end %>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<% end %>
|
|
48
|
+
|
|
49
|
+
<% if current_store.storefront_setup? %>
|
|
50
|
+
<div class="alert alert-success mb-6">
|
|
51
|
+
<%= Spree.t('admin.storefront_setup.done') %>
|
|
52
|
+
<%= link_to current_store.storefront_url, current_store.storefront_url, target: :_blank, rel: 'noopener', class: 'font-medium' %>
|
|
53
|
+
</div>
|
|
54
|
+
<% end %>
|
|
55
|
+
|
|
56
|
+
<div class="card mb-6">
|
|
57
|
+
<div class="card-header flex justify-between">
|
|
58
|
+
<h5 class="card-title"><%= Spree.t('admin.storefront_setup.deploy_title') %></h5>
|
|
59
|
+
|
|
60
|
+
<%= external_link_to Spree.t('admin.storefront_setup.see_online_demo'), 'https://demo.spreecommerce.org' %>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="card-body">
|
|
63
|
+
<p class="mb-3"><%= Spree.t('admin.storefront_setup.deploy_copy') %></p>
|
|
64
|
+
<div class="mb-2">
|
|
65
|
+
<% if store_url_loopback?(current_store) %>
|
|
66
|
+
<div class="cursor-not-allowed flex gap-2 items-center">
|
|
67
|
+
<%= image_tag 'vercel-deploy-button.svg', alt: Spree.t('admin.storefront_setup.deploy_button'), height: 32, class: 'disabled opacity-25' %>
|
|
68
|
+
<span data-controller="tooltip">
|
|
69
|
+
<%= icon('alert-circle', class: 'text-yellow-500') %>
|
|
70
|
+
<%= tooltip(Spree.t('admin.storefront_setup.loopback_warning')) %>
|
|
71
|
+
</span>
|
|
72
|
+
</div>
|
|
73
|
+
<% else %>
|
|
74
|
+
<%= link_to vercel_deploy_url(current_store, @publishable_key) do %>
|
|
75
|
+
<%= image_tag 'vercel-deploy-button.svg', alt: Spree.t('admin.storefront_setup.deploy_button'), height: 32 %>
|
|
76
|
+
<% end %>
|
|
77
|
+
<% end %>
|
|
78
|
+
</div>
|
|
79
|
+
<p class="text-gray-500 text-sm mb-3"><%= Spree.t('admin.storefront_setup.deploy_finish_hint') %></p>
|
|
80
|
+
<%= external_link_to Spree.t('admin.storefront_setup.local_installation_instructions'), 'https://spreecommerce.org/docs/developer/storefront/nextjs/quickstart' %>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="card mb-6">
|
|
85
|
+
<div class="card-header">
|
|
86
|
+
<h5 class="card-title"><%= Spree.t('admin.storefront_setup.connect_title') %></h5>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="card-body flex flex-col gap-3">
|
|
89
|
+
<p><%= Spree.t('admin.storefront_setup.connect_copy') %></p>
|
|
90
|
+
|
|
91
|
+
<div class="form-group mb-0">
|
|
92
|
+
<label><%= Spree.t('admin.storefront_setup.api_url_label') %></label>
|
|
93
|
+
<div class="input-group gap-0 pr-1">
|
|
94
|
+
<input type="text" class="grow text-truncate" spellcheck="false" value="<%= current_store.formatted_url %>" readonly>
|
|
95
|
+
<%= clipboard_component(current_store.formatted_url,
|
|
96
|
+
button_class: 'btn hover:bg-gray-100 p-1 rounded',
|
|
97
|
+
icon_class: 'mr-0') %>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div class="form-group mb-0">
|
|
102
|
+
<label><%= Spree.t('admin.storefront_setup.publishable_key_label') %></label>
|
|
103
|
+
<div data-controller="password-visibility" class="input-group gap-0 pr-1">
|
|
104
|
+
<input type="password" class="grow text-truncate" data-password-visibility-target="input" spellcheck="false" value="<%= @publishable_key.token %>" readonly>
|
|
105
|
+
|
|
106
|
+
<button type="button" class="btn hover:bg-gray-100 p-1 mr-1 rounded" data-action="password-visibility#toggle">
|
|
107
|
+
<span data-password-visibility-target="icon"><%= icon 'eye', class: 'mr-0' %></span>
|
|
108
|
+
<span data-password-visibility-target="icon" class="hidden"><%= icon 'eye-off', class: 'mr-0' %></span>
|
|
109
|
+
</button>
|
|
110
|
+
|
|
111
|
+
<%= clipboard_component(@publishable_key.token,
|
|
112
|
+
button_class: 'btn hover:bg-gray-100 p-1 rounded',
|
|
113
|
+
icon_class: 'mr-0') %>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<%= form_with url: spree.admin_storefront_path, method: :patch, data: { turbo: false }, class: 'flex flex-col gap-3 mt-2' do %>
|
|
118
|
+
<div class="form-group mb-0">
|
|
119
|
+
<label for="storefront_url"><%= Spree.t('admin.storefront_setup.storefront_url_label') %></label>
|
|
120
|
+
<input type="text" name="storefront_url" id="storefront_url" class="form-input" spellcheck="false"
|
|
121
|
+
placeholder="https://myshop.com" value="<%= current_store.preferred_storefront_url %>">
|
|
122
|
+
<p class="text-gray-500 text-sm mt-1 mb-0"><%= Spree.t('admin.storefront_setup.storefront_url_help') %></p>
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<button type="submit" class="btn btn-primary"><%= Spree.t('actions.save') %></button>
|
|
126
|
+
</div>
|
|
127
|
+
<% end %>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<% if @storefront_origins.any? %>
|
|
132
|
+
<div class="card mb-6">
|
|
133
|
+
<div class="card-header">
|
|
134
|
+
<h5 class="card-title"><%= Spree.t('admin.storefront_setup.connected_title') %></h5>
|
|
135
|
+
</div>
|
|
136
|
+
<div class="card-body flex flex-col gap-2">
|
|
137
|
+
<% @storefront_origins.each do |allowed_origin| %>
|
|
138
|
+
<div class="flex items-center gap-2">
|
|
139
|
+
<%= icon('world', class: 'text-gray-500') %>
|
|
140
|
+
<%= link_to allowed_origin.origin, allowed_origin.origin, target: :_blank, rel: 'noopener' %>
|
|
141
|
+
</div>
|
|
142
|
+
<% end %>
|
|
143
|
+
<p class="text-gray-500 text-sm mb-0 mt-2">
|
|
144
|
+
<%= link_to Spree.t('admin.storefront_setup.manage_allowed_origins'), spree.admin_allowed_origins_path %>
|
|
145
|
+
</p>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<% end %>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
<%= f.spree_text_field :name, required: true, autofocus: f.object.new_record? %>
|
|
15
15
|
|
|
16
|
-
<%= f.spree_file_field :logo, width: 240, height: 240, crop: true, help_bubble:
|
|
16
|
+
<%= f.spree_file_field :logo, width: 240, height: 240, crop: true, help_bubble: Spree.t('admin.store_form.logo_help') %>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<div class="card-body">
|
|
25
25
|
<div class="alert alert-info w-full mb-0">
|
|
26
26
|
<span>
|
|
27
|
-
|
|
27
|
+
<%= Spree.t('admin.store_form.currencies_managed_by_markets_html', markets_link: link_to(Spree.t('admin.markets.list'), spree.admin_markets_path)) %>
|
|
28
28
|
</span>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
<hr class="my-6">
|
|
17
17
|
|
|
18
|
+
<%= f.spree_select :preferred_storefront_access,
|
|
19
|
+
options_for_select(channel_storefront_access_options, f.object.preferred_storefront_access),
|
|
20
|
+
{ label: Spree.t('admin.checkout_settings.storefront_access.label'),
|
|
21
|
+
help_bubble: Spree.t('admin.checkout_settings.storefront_access.description') } %>
|
|
18
22
|
<%= f.spree_check_box :preferred_guest_checkout, label: Spree.t('admin.checkout_settings.guest_checkout.label'), help: Spree.t('admin.checkout_settings.guest_checkout.description') %>
|
|
19
23
|
<%= f.spree_check_box :preferred_company_field_enabled, label: Spree.t('admin.store_form.company_field.label'), help: Spree.t('admin.store_form.company_field.description') %>
|
|
20
24
|
<%= f.spree_check_box :preferred_special_instructions_enabled, label: Spree.t('admin.checkout_settings.special_instructions.label'), help: Spree.t('admin.checkout_settings.special_instructions.description') %>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
<div class="card mb-6">
|
|
16
16
|
<div class="card-header">
|
|
17
|
-
<h5 class="card-title"
|
|
17
|
+
<h5 class="card-title"><%= Spree.t('admin.store_form.email_addresses') %></h5>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="card-body">
|
|
20
20
|
<p class="text-gray-600">
|
|
21
|
-
|
|
21
|
+
<%= Spree.t('admin.store_form.mail_from_address_help') %>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<%= f.spree_email_field :mail_from_address, required: true %>
|
|
@@ -32,12 +32,10 @@
|
|
|
32
32
|
<h5 class="card-title"><%= Spree.t(:logo) %></h5>
|
|
33
33
|
</div>
|
|
34
34
|
<div class="card-body">
|
|
35
|
-
<p class="text-gray-600"
|
|
35
|
+
<p class="text-gray-600"><%= Spree.t('admin.store_form.mailer_logo_help') %></p>
|
|
36
36
|
<%= f.spree_file_field :mailer_logo, width: 204, height: 104 %>
|
|
37
37
|
<p class="form-text mb-0 mt-2">
|
|
38
|
-
|
|
39
|
-
<br />
|
|
40
|
-
Only JPEG and PNG formats are supported.
|
|
38
|
+
<%= Spree.t('admin.store_form.mailer_logo_format_hint') %>
|
|
41
39
|
</p>
|
|
42
40
|
</div>
|
|
43
41
|
</div>
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<% columns = table.visible_columns(selected_columns, self) %>
|
|
4
4
|
<% current_sort = params.dig(:q, :s) %>
|
|
5
5
|
<% search_param = table.respond_to?(:search_param) ? table.search_param : :name_cont %>
|
|
6
|
-
<%
|
|
6
|
+
<% resource_name = table.model_class ? table.model_class.model_name.human(count: 2) : controller_name.humanize %>
|
|
7
|
+
<% search_placeholder = (table.respond_to?(:search_placeholder) && table.search_placeholder) || Spree.t('admin.search_placeholder', resource: resource_name) %>
|
|
7
8
|
<% date_range_param = table.date_range_param %>
|
|
8
9
|
|
|
9
10
|
<%= turbo_frame_tag frame_name, data: { turbo_action: 'advance' } do %>
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
<div class="flex flex-col lg:flex-row gap-3 items-start lg:items-center justify-between">
|
|
16
17
|
<div class="flex gap-2 items-center flex-wrap">
|
|
17
18
|
<%= search_form_for @search, url: url_for, html: { data: { turbo_frame: frame_name, turbo_action: 'advance', controller: 'auto-submit search-clear', auto_submit_delay_value: 300 } } do |f| %>
|
|
18
|
-
<div class="form-input flex items-center py-0 pr-1 focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-blue-500 lg:w-[300px]
|
|
19
|
+
<div class="form-input flex items-center py-0 pr-1 focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-blue-500 lg:w-[300px] me-auto h-[2rem] transition-all duration-100 ease-in-out">
|
|
19
20
|
<%= icon "search", class: "mr-4 text-gray-600 shrink-0" %>
|
|
20
21
|
<%= search_field_tag "q[#{search_param}]",
|
|
21
22
|
params.dig(:q, search_param),
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<%= f.spree_file_field :image, width: 1920, height: 1080 %>
|
|
86
86
|
</div>
|
|
87
87
|
<div class="card-body">
|
|
88
|
-
<%= f.spree_file_field :square_image, width: 400, height: 400, crop: true, help:
|
|
88
|
+
<%= f.spree_file_field :square_image, width: 400, height: 400, crop: true, help: Spree.t('admin.taxons.square_image_help') %>
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
@@ -113,6 +113,6 @@
|
|
|
113
113
|
slug_attribute_name: :permalink_part,
|
|
114
114
|
slug: @permalink_part,
|
|
115
115
|
slug_path: ['t', @parent_permalink.presence].compact.join('/'),
|
|
116
|
-
placeholder: '
|
|
116
|
+
placeholder: Spree.t('admin.taxons.seo.placeholder') %>
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<% content_for(:title, Spree.t(:login)) %>
|
|
2
2
|
|
|
3
|
-
<h1 class="mb-4 font-light"
|
|
3
|
+
<h1 class="mb-4 font-light"><%= Spree.t('admin.user_sessions.welcome_back') %></h1>
|
|
4
4
|
<%= form_for resource, as: resource_name, url: session_path(resource_name), data: { controller: 'enable-button', turbo: false } do |f| %>
|
|
5
5
|
<div class="form-group mb-4">
|
|
6
6
|
<%= f.label :email, Spree.t(:email), required: true, class: 'form-label' %>
|
|
7
|
-
<%= f.email_field :email, required: true, class: 'form-input form-input-lg', placeholder: '
|
|
7
|
+
<%= f.email_field :email, required: true, class: 'form-input form-input-lg', placeholder: Spree.t('admin.user_sessions.email_placeholder'), data: { enable_button_target: :input }, autocomplete: :email, autofocus: true %>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="form-group mb-4">
|
|
10
10
|
<%= f.label :password, Spree.t(:password), required: true, class: 'form-label' %>
|
|
@@ -14,3 +14,12 @@
|
|
|
14
14
|
<%= turbo_save_button_tag Spree.t(:login), class: 'btn btn-primary btn-lg w-full' %>
|
|
15
15
|
<% end %>
|
|
16
16
|
|
|
17
|
+
<% if admin_locales_options.many? %>
|
|
18
|
+
<%= form_tag new_session_path(resource_name), method: :get, class: 'form-group mt-4', data: { turbo: false } do %>
|
|
19
|
+
<%= label_tag :locale, Spree.t(:language), class: 'form-label' %>
|
|
20
|
+
<%= select_tag :locale,
|
|
21
|
+
options_for_select(admin_locales_options, params[:locale] || I18n.locale.to_s),
|
|
22
|
+
onchange: 'this.form.requestSubmit()', class: 'form-select' %>
|
|
23
|
+
<% end %>
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<ul class="nav nav-pills mb-4" role="tablist">
|
|
3
3
|
<% if spree.respond_to?(:admin_user_visits_path) %>
|
|
4
4
|
<li class="nav-item" role="presentation">
|
|
5
|
-
<a class="nav-link active" id="pills-overview-tab" data-tabs-target="tab" data-action="click->tabs#select" role="tab" aria-controls="pills-overview" aria-selected="true"
|
|
5
|
+
<a class="nav-link active" id="pills-overview-tab" data-tabs-target="tab" data-action="click->tabs#select" role="tab" aria-controls="pills-overview" aria-selected="true"><%= Spree.t('admin.users.timeline') %></a>
|
|
6
6
|
</li>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="w-20">
|
|
18
18
|
<% if params[:stock_location_id].present? %>
|
|
19
19
|
<% stock_item = variant.stock_items.find { |si| si.stock_location_id == params[:stock_location_id] } %>
|
|
20
|
-
<span><%= stock_item&.count_on_hand || 0
|
|
20
|
+
<span><%= Spree.t('admin.variants.count_at_location', count: stock_item&.count_on_hand || 0) %></span>
|
|
21
21
|
<% if stock_item&.backorderable? %> <span class="text-gray-600"><%= Spree.t(:backorderable) %></span><% end %>
|
|
22
22
|
<% else %>
|
|
23
23
|
<%= display_inventory(variant) %>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<% variant_url = spree.edit_admin_product_variant_path(variant.product, variant) %>
|
|
6
6
|
<% end %>
|
|
7
7
|
|
|
8
|
-
<%= link_to variant_url, id: dom_id(variant, 'spree'), data: { turbo_permanent: true, turbo_frame: :_top }, class: 'flex items-center justify-start no-underline' do %>
|
|
8
|
+
<%= link_to variant_url, id: dom_id(variant, 'spree'), data: { turbo_permanent: true, turbo_frame: :_top }, class: 'flex items-center justify-start no-underline gap-2' do %>
|
|
9
9
|
<%= render "spree/admin/shared/product_image", object: variant %>
|
|
10
10
|
<div class="ml-6">
|
|
11
11
|
<strong><%= variant.name %></strong>
|
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
<div class="card-body p-0" data-controller="reveal" data-reveal-hidden-class="hidden!">
|
|
8
8
|
<div class="p-3">
|
|
9
9
|
<%= f.spree_check_box :track_inventory, data: { action: 'change->reveal#toggle' } %>
|
|
10
|
+
<div class="mt-2">
|
|
11
|
+
<%= f.spree_check_box :preorderable, label: Spree.t('admin.variants_form.preorderable_label') %>
|
|
12
|
+
<small class="text-muted text-xs d-block"><%= Spree.t('admin.variants_form.preorderable_hint') %></small>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="mt-2">
|
|
15
|
+
<%# datetime-local inputs have no timezone; render in the store's timezone so admins see and submit store-local times (parsed back in VariantsController#permitted_resource_params). %>
|
|
16
|
+
<% preorder_ships_at_local = f.object.preorder_ships_at&.in_time_zone(current_timezone)&.strftime('%Y-%m-%dT%H:%M') %>
|
|
17
|
+
<%= f.spree_datetime_field :preorder_ships_at,
|
|
18
|
+
value: preorder_ships_at_local,
|
|
19
|
+
label: Spree.t('admin.variants_form.preorder_ships_at_label'),
|
|
20
|
+
help: "#{Spree.t('admin.variants_form.preorder_ships_at_hint')} #{Spree.t('admin.datetime_field_timezone_help', zone: current_timezone.name)}" %>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mt-2">
|
|
23
|
+
<%= f.spree_number_field :backorder_limit, min: 0,
|
|
24
|
+
label: Spree.t('admin.variants_form.backorder_limit_label'),
|
|
25
|
+
help: Spree.t('admin.variants_form.backorder_limit_hint') %>
|
|
26
|
+
</div>
|
|
10
27
|
</div>
|
|
11
28
|
|
|
12
29
|
<table class="table border-t <%= 'hidden!' unless f.object.track_inventory? %>" data-reveal-target="item">
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<h5 class="card-title"><%= Spree.t('admin.webhook_endpoints.endpoint_settings') %></h5>
|
|
4
4
|
</div>
|
|
5
5
|
<div class="card-body">
|
|
6
|
-
<%= f.spree_text_field :name, placeholder: '
|
|
7
|
-
<%= f.spree_text_field :url, required: true, autofocus: f.object.new_record?, placeholder: '
|
|
6
|
+
<%= f.spree_text_field :name, placeholder: Spree.t('admin.webhook_endpoints.name_placeholder') %>
|
|
7
|
+
<%= f.spree_text_field :url, required: true, autofocus: f.object.new_record?, placeholder: Spree.t('admin.webhook_endpoints.url_placeholder') %>
|
|
8
8
|
<%= f.spree_check_box :active %>
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
data/config/i18n-tasks.yml
CHANGED
|
@@ -156,9 +156,12 @@ ignore_unused:
|
|
|
156
156
|
- 'spree.admin.bulk_ops.users.title.*'
|
|
157
157
|
- 'spree.admin.display_on_options.*'
|
|
158
158
|
- 'spree.admin.order.events.*'
|
|
159
|
+
- 'spree.admin.orders.avs_responses.*'
|
|
160
|
+
- 'spree.admin.orders.cvv_responses.*'
|
|
159
161
|
- 'spree.admin.orders.no_email_present'
|
|
160
162
|
- 'spree.admin.orders.payment_link_sent'
|
|
161
163
|
- 'spree.admin.store_setup_tasks.*'
|
|
164
|
+
- 'spree.admin.table.operators.*'
|
|
162
165
|
- 'spree.admin.taxon_rules.*'
|
|
163
166
|
- 'spree.admin.webhooks_subscribers.*'
|
|
164
167
|
|
|
@@ -251,6 +251,15 @@ Rails.application.config.after_initialize do
|
|
|
251
251
|
active: -> { controller_name == 'policies' },
|
|
252
252
|
if: -> { can?(:manage, Spree::Policy) }
|
|
253
253
|
|
|
254
|
+
# Storefront setup
|
|
255
|
+
settings_nav.add :storefront,
|
|
256
|
+
label: 'admin.storefront',
|
|
257
|
+
url: :admin_storefront_path,
|
|
258
|
+
icon: 'building-store',
|
|
259
|
+
position: 60,
|
|
260
|
+
active: -> { controller_name == 'storefront' },
|
|
261
|
+
if: -> { can?(:update, current_store) }
|
|
262
|
+
|
|
254
263
|
# Channels
|
|
255
264
|
settings_nav.add :channels,
|
|
256
265
|
label: :channels,
|
|
@@ -35,9 +35,9 @@ Rails.application.config.after_initialize do
|
|
|
35
35
|
position: 20,
|
|
36
36
|
partial: 'spree/admin/tables/columns/product_status',
|
|
37
37
|
value_options: [
|
|
38
|
-
{ value: 'draft', label: '
|
|
39
|
-
{ value: 'active', label: '
|
|
40
|
-
{ value: 'archived', label: '
|
|
38
|
+
{ value: 'draft', label: 'admin.products.draft' },
|
|
39
|
+
{ value: 'active', label: 'admin.products.active' },
|
|
40
|
+
{ value: 'archived', label: 'admin.products.archived' }
|
|
41
41
|
]
|
|
42
42
|
|
|
43
43
|
# Inventory display (custom partial)
|
|
@@ -90,7 +90,7 @@ Rails.application.config.after_initialize do
|
|
|
90
90
|
|
|
91
91
|
# Stock filter (filter-only, not displayed as column)
|
|
92
92
|
Spree.admin.tables.products.add :in_stock,
|
|
93
|
-
label: '
|
|
93
|
+
label: 'admin.products.in_stock',
|
|
94
94
|
type: :boolean,
|
|
95
95
|
filter_type: :boolean,
|
|
96
96
|
sortable: false,
|
|
@@ -293,7 +293,7 @@ Rails.application.config.after_initialize do
|
|
|
293
293
|
default: false,
|
|
294
294
|
position: 90,
|
|
295
295
|
operators: %i[eq not_eq in not_in],
|
|
296
|
-
value_options: -> { Spree::Order.state_machine(:state).states.map { |s| { value: s.name.to_s, label: s.name.to_s.humanize } } }
|
|
296
|
+
value_options: -> { Spree::Order.state_machine(:state).states.map { |s| { value: s.name.to_s, label: Spree.t("state_machine_states.#{s.name}", default: s.name.to_s.humanize) } } }
|
|
297
297
|
|
|
298
298
|
Spree.admin.tables.orders.add :email,
|
|
299
299
|
label: :email,
|
|
@@ -414,7 +414,7 @@ Rails.application.config.after_initialize do
|
|
|
414
414
|
default: true,
|
|
415
415
|
position: 40,
|
|
416
416
|
operators: %i[eq not_eq in not_in],
|
|
417
|
-
value_options: -> { Spree::Order.state_machine(:state).states.map { |s| { value: s.name.to_s, label: s.name.to_s.humanize } } }
|
|
417
|
+
value_options: -> { Spree::Order.state_machine(:state).states.map { |s| { value: s.name.to_s, label: Spree.t("state_machine_states.#{s.name}", default: s.name.to_s.humanize) } } }
|
|
418
418
|
|
|
419
419
|
Spree.admin.tables.checkouts.add :item_count,
|
|
420
420
|
label: :item_count,
|
|
@@ -489,6 +489,7 @@ Rails.application.config.after_initialize do
|
|
|
489
489
|
ransack_attribute: 'addresses_country_name',
|
|
490
490
|
operators: %i[eq],
|
|
491
491
|
search_url: ->(view_context) { view_context.spree.select_options_admin_countries_path(format: :json) },
|
|
492
|
+
preload_options: true,
|
|
492
493
|
partial: 'spree/admin/tables/columns/user_location'
|
|
493
494
|
|
|
494
495
|
# Number of orders
|
|
@@ -1295,8 +1296,8 @@ Rails.application.config.after_initialize do
|
|
|
1295
1296
|
position: 20,
|
|
1296
1297
|
filter_type: :select,
|
|
1297
1298
|
value_options: [
|
|
1298
|
-
{ value: 'true', label: '
|
|
1299
|
-
{ value: 'false', label: '
|
|
1299
|
+
{ value: 'true', label: 'price_list_statuses.active' },
|
|
1300
|
+
{ value: 'false', label: 'price_list_statuses.inactive' }
|
|
1300
1301
|
]
|
|
1301
1302
|
|
|
1302
1303
|
Spree.admin.tables.webhook_endpoints.add :health,
|
|
@@ -1439,8 +1440,8 @@ Rails.application.config.after_initialize do
|
|
|
1439
1440
|
partial: 'spree/admin/tables/columns/api_key_type',
|
|
1440
1441
|
filter_type: :select,
|
|
1441
1442
|
value_options: [
|
|
1442
|
-
{ value: 'publishable', label: '
|
|
1443
|
-
{ value: 'secret', label: '
|
|
1443
|
+
{ value: 'publishable', label: 'admin.api_keys.key_types.publishable' },
|
|
1444
|
+
{ value: 'secret', label: 'admin.api_keys.key_types.secret' }
|
|
1444
1445
|
]
|
|
1445
1446
|
|
|
1446
1447
|
Spree.admin.tables.api_keys.add :status,
|
|
@@ -1499,10 +1500,10 @@ Rails.application.config.after_initialize do
|
|
|
1499
1500
|
position: 20,
|
|
1500
1501
|
partial: 'spree/admin/tables/columns/price_list_status',
|
|
1501
1502
|
value_options: [
|
|
1502
|
-
{ value: 'draft', label: '
|
|
1503
|
-
{ value: 'active', label: '
|
|
1504
|
-
{ value: 'scheduled', label: '
|
|
1505
|
-
{ value: 'inactive', label: '
|
|
1503
|
+
{ value: 'draft', label: 'price_list_statuses.draft' },
|
|
1504
|
+
{ value: 'active', label: 'price_list_statuses.active' },
|
|
1505
|
+
{ value: 'scheduled', label: 'price_list_statuses.scheduled' },
|
|
1506
|
+
{ value: 'inactive', label: 'price_list_statuses.inactive' }
|
|
1506
1507
|
]
|
|
1507
1508
|
|
|
1508
1509
|
Spree.admin.tables.price_lists.add :starts_at,
|
|
@@ -1561,7 +1562,7 @@ Rails.application.config.after_initialize do
|
|
|
1561
1562
|
position: 20,
|
|
1562
1563
|
partial: 'spree/admin/tables/columns/product_status',
|
|
1563
1564
|
ransack_attribute: 'status',
|
|
1564
|
-
value_options: -> { Spree::Product::STATUSES.map { |s| { value: s, label: s.humanize } } }
|
|
1565
|
+
value_options: -> { Spree::Product::STATUSES.map { |s| { value: s, label: Spree.t("admin.products.#{s}", default: s.humanize) } } }
|
|
1565
1566
|
|
|
1566
1567
|
Spree.admin.tables.price_list_products.add :inventory,
|
|
1567
1568
|
label: :inventory,
|
|
@@ -1713,7 +1714,8 @@ Rails.application.config.after_initialize do
|
|
|
1713
1714
|
type: :string,
|
|
1714
1715
|
sortable: true,
|
|
1715
1716
|
default: true,
|
|
1716
|
-
position: 30
|
|
1717
|
+
position: 30,
|
|
1718
|
+
format: 'locale_display_label'
|
|
1717
1719
|
|
|
1718
1720
|
Spree.admin.tables.markets.add :default,
|
|
1719
1721
|
label: :default,
|
|
@@ -1745,8 +1747,8 @@ Rails.application.config.after_initialize do
|
|
|
1745
1747
|
default: true,
|
|
1746
1748
|
position: 20,
|
|
1747
1749
|
value_options: [
|
|
1748
|
-
{ value: 'unused', label: '
|
|
1749
|
-
{ value: 'used', label: '
|
|
1750
|
+
{ value: 'unused', label: 'admin.coupon_codes.unused' },
|
|
1751
|
+
{ value: 'used', label: 'admin.coupon_codes.used' }
|
|
1750
1752
|
]
|
|
1751
1753
|
|
|
1752
1754
|
Spree.admin.tables.coupon_codes.add :created_at,
|