spree_admin 5.0.1 → 5.0.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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/spree/admin/components/_alerts.scss +6 -3
- data/app/assets/stylesheets/spree/admin/global/_variables.scss +5 -5
- data/app/assets/stylesheets/spree/admin/shared/_base.scss +3 -5
- data/app/controllers/spree/admin/page_blocks_controller.rb +10 -2
- data/app/controllers/spree/admin/page_sections_controller.rb +13 -1
- data/app/controllers/spree/admin/posts_controller.rb +6 -0
- data/app/controllers/spree/admin/products_controller.rb +6 -0
- data/app/controllers/spree/admin/users_controller.rb +1 -1
- data/app/helpers/spree/admin/products_helper.rb +4 -0
- data/app/helpers/spree/admin/tags_helper.rb +1 -1
- data/app/javascript/spree/admin/controllers/slug_form_controller.js +0 -3
- data/app/javascript/spree/admin/controllers/variants_form_controller.js +19 -0
- data/app/javascript/spree/admin/helpers/bootstrap.js +3 -3
- data/app/views/spree/admin/errors/forbidden.html.erb +13 -0
- data/app/views/spree/admin/pages/_page.html.erb +26 -0
- data/app/views/spree/admin/pages/index.html.erb +5 -3
- data/app/views/spree/admin/post_categories/_post_category.html.erb +5 -2
- data/app/views/spree/admin/post_categories/index.html.erb +2 -1
- data/app/views/spree/admin/posts/_filters.html.erb +2 -2
- data/app/views/spree/admin/posts/_form.html.erb +2 -2
- data/app/views/spree/admin/posts/index.html.erb +2 -2
- data/app/views/spree/admin/products/form/_inventory.html.erb +1 -1
- data/app/views/spree/admin/products/form/_properties.html.erb +1 -1
- data/app/views/spree/admin/shared/_user.html.erb +1 -1
- data/app/views/spree/admin/stores/new.html.erb +1 -0
- data/app/views/spree/admin/taxons/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +1 -1
- data/app/views/spree/admin/users/_user.html.erb +7 -6
- data/app/views/spree/admin/users/index.html.erb +3 -2
- data/config/initializers/chartkick.rb +1 -1
- data/config/locales/en.yml +3 -5
- metadata +10 -9
- data/app/views/spree/admin/pages/_page.erb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2314972e804657e3746e099913f84a2ffe364d955005ecd2ad0f441f6d38f44c
|
4
|
+
data.tar.gz: b5b4bc046008b7f3077c12dccb7571f5fc965f2196d3a1d077f044d911da0dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f823382a162659d30e565ff7dfc2299f4c8b5ce4e73e11c7b3a146dc0560ebadd289653d09b6c40eb33e30300f4d2032b91389b2a2eebad43657c236d2065df
|
7
|
+
data.tar.gz: 7e104c97735e15737d3b9d209a632ac7cdd8c53b0229e8482225e57e023d44d74228833fef8cb7f2fd54c1f56e696b634fff5d7d289bc6a3bdb5d2e14aa56c23
|
@@ -31,13 +31,16 @@
|
|
31
31
|
}
|
32
32
|
|
33
33
|
.alert-danger {
|
34
|
-
background-color: #
|
35
|
-
border-color:
|
36
|
-
|
34
|
+
background-color: #FEF2F2;
|
35
|
+
border-color: #FBE3E3;
|
36
|
+
color: #450A09;
|
37
37
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-exclamation-circle'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0' /%3E%3Cpath d='M12 9v4' /%3E%3Cpath d='M12 16v.01' /%3E%3C/svg%3E");
|
38
38
|
}
|
39
39
|
|
40
40
|
.alert-success {
|
41
|
+
background-color: #ECFDF5;
|
42
|
+
color: #092E26;
|
43
|
+
border-color: #D5F9E6;
|
41
44
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-check-circle'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0' /%3E%3Cpath d='M9 12l2 2l4 -4' /%3E%3C/svg%3E");
|
42
45
|
}
|
43
46
|
|
@@ -18,10 +18,10 @@ $light: $gray-50 !default;
|
|
18
18
|
|
19
19
|
$primary: #061932 !default;
|
20
20
|
$black: #000000 !default;
|
21
|
-
$blue: #
|
21
|
+
$blue: #0090FE !default;
|
22
22
|
$white: #FFFFFF !default;
|
23
23
|
|
24
|
-
$action: #
|
24
|
+
$action: #F4F9FF !default;
|
25
25
|
$action-border: #e2ecff !default;
|
26
26
|
|
27
27
|
$theme-colors: (
|
@@ -104,11 +104,11 @@ $box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),0 2px 4px -1px rgba(0, 0, 0, 0.06
|
|
104
104
|
$box-shadow-xs: rgba(43, 34, 51, 0.04) 0px 1px 2px !default;
|
105
105
|
$box-shadow-lg: rgba(0, 5, 13, 0.5) 0px 4px 8px 2px;
|
106
106
|
|
107
|
-
$tooltip-border-radius: $border-radius
|
107
|
+
$tooltip-border-radius: $border-radius !default;
|
108
108
|
$tooltip-opacity: 1 !default;
|
109
109
|
$tooltip-margin: 0.25rem 0 !default;
|
110
|
-
$tooltip-padding-y: .
|
111
|
-
$tooltip-padding-x: .
|
110
|
+
$tooltip-padding-y: .25rem !default;
|
111
|
+
$tooltip-padding-x: .5rem !default;
|
112
112
|
$tooltip-bg: $white !default;
|
113
113
|
$tooltip-color: $body-color !default;
|
114
114
|
$tooltip-arrow-color: transparent !default;
|
@@ -1,10 +1,7 @@
|
|
1
1
|
// https://twitter.com/NatalieMarleny/status/1662402066365526016
|
2
2
|
html {
|
3
3
|
min-height: 100%;
|
4
|
-
|
5
|
-
font-optical-sizing: auto;
|
6
|
-
font-style: normal;
|
7
|
-
font-variation-settings: "slnt" 0;
|
4
|
+
letter-spacing: normal;
|
8
5
|
}
|
9
6
|
body {
|
10
7
|
@extend .h-100;
|
@@ -670,7 +667,8 @@ div.uppy-Root {
|
|
670
667
|
}
|
671
668
|
|
672
669
|
.tooltip-inner {
|
673
|
-
|
670
|
+
border: 1px solid $gray-100;
|
671
|
+
box-shadow: $box-shadow-xs;
|
674
672
|
}
|
675
673
|
|
676
674
|
.avatar {
|
@@ -26,15 +26,23 @@ module Spree
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def create
|
29
|
-
allowed_types = Rails.application.config.spree.page_blocks.map(&:to_s)
|
30
29
|
page_block_type = params.dig(:page_block, :type)
|
31
30
|
|
32
|
-
if allowed_types.include?(page_block_type) && page_block_type.safe_constantize.present?
|
31
|
+
if allowed_types.map(&:to_s).include?(page_block_type) && page_block_type.safe_constantize.present?
|
33
32
|
@page_block = page_block_type.constantize.new
|
34
33
|
@page_block.section = @page_section
|
35
34
|
@page_block.save!
|
36
35
|
end
|
37
36
|
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def allowed_types
|
41
|
+
[
|
42
|
+
*Rails.application.config.spree.page_blocks,
|
43
|
+
*parent&.available_blocks_to_add
|
44
|
+
].uniq.sort_by(&:name)
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
40
48
|
end
|
@@ -7,7 +7,7 @@ module Spree
|
|
7
7
|
|
8
8
|
def create
|
9
9
|
page_section_type = params.dig(:page_section, :type)
|
10
|
-
allowed_types =
|
10
|
+
allowed_types = available_page_section_types.map(&:to_s)
|
11
11
|
|
12
12
|
if allowed_types.include?(page_section_type) && page_section_type.safe_constantize.present?
|
13
13
|
@page_section = page_section_type.constantize.new(permitted_resource_params)
|
@@ -52,6 +52,18 @@ module Spree
|
|
52
52
|
current_store.theme_previews.find(params[:theme_id])
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
def available_page_section_types
|
57
|
+
return [] unless @pageable.present?
|
58
|
+
|
59
|
+
if @pageable.is_a?(Spree::Theme)
|
60
|
+
@pageable.available_page_sections
|
61
|
+
elsif @pageable.respond_to?(:theme)
|
62
|
+
@pageable.theme.available_page_sections
|
63
|
+
else
|
64
|
+
[]
|
65
|
+
end
|
66
|
+
end
|
55
67
|
end
|
56
68
|
end
|
57
69
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class PostsController < ResourceController
|
4
|
+
before_action :load_post_categories
|
5
|
+
|
4
6
|
def select_options
|
5
7
|
render json: current_store.posts.published.to_tom_select_json
|
6
8
|
end
|
@@ -18,6 +20,10 @@ module Spree
|
|
18
20
|
@search = @collection.ransack(params[:q])
|
19
21
|
@collection = @search.result.page(params[:page]).per(params[:per_page])
|
20
22
|
end
|
23
|
+
|
24
|
+
def load_post_categories
|
25
|
+
@post_categories = current_store.post_categories.accessible_by(current_ability).order(:title)
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
@@ -15,6 +15,7 @@ module Spree
|
|
15
15
|
before_action :prepare_product_params, only: [:create, :update]
|
16
16
|
before_action :strip_stock_items_param, only: [:create, :update]
|
17
17
|
before_action :ensure_session_uploaded_assets_uuid, only: :new
|
18
|
+
before_action :check_slug_availability, only: [:create, :update]
|
18
19
|
|
19
20
|
new_action.before :build_master_prices
|
20
21
|
new_action.before :build_master_stock_items
|
@@ -354,6 +355,11 @@ module Spree
|
|
354
355
|
variant_images: [],
|
355
356
|
}
|
356
357
|
end
|
358
|
+
|
359
|
+
def check_slug_availability
|
360
|
+
new_slug = permitted_resource_params[:slug]
|
361
|
+
permitted_resource_params[:slug] = @product.ensure_slug_is_unique(new_slug)
|
362
|
+
end
|
357
363
|
end
|
358
364
|
end
|
359
365
|
end
|
@@ -27,7 +27,7 @@ module Spree
|
|
27
27
|
|
28
28
|
def update
|
29
29
|
if @user.update(user_params)
|
30
|
-
flash[:success] =
|
30
|
+
flash[:success] = flash_message_for(@user, :successfully_updated)
|
31
31
|
redirect_to spree.admin_user_path(@user)
|
32
32
|
else
|
33
33
|
render :edit, status: :unprocessable_entity
|
@@ -122,6 +122,10 @@ module Spree
|
|
122
122
|
def product_list_filters_search_form_path
|
123
123
|
[:admin, @search]
|
124
124
|
end
|
125
|
+
|
126
|
+
def sorted_product_properties(product)
|
127
|
+
product.product_properties.sort_by { |product_property| product_property.property.position }
|
128
|
+
end
|
125
129
|
end
|
126
130
|
end
|
127
131
|
end
|
@@ -13,7 +13,7 @@ module Spree
|
|
13
13
|
@post_tags_scope ||= ActsAsTaggableOn::Tag.
|
14
14
|
joins(:taggings).
|
15
15
|
where("#{ActsAsTaggableOn.taggings_table}.taggable_type = ?", 'Spree::Post').
|
16
|
-
for_context(:tags)
|
16
|
+
for_context(:tags).for_tenant(current_store.id)
|
17
17
|
end
|
18
18
|
|
19
19
|
def post_tags_json_array
|
@@ -10,8 +10,5 @@ export default class extends Controller {
|
|
10
10
|
const name = this.nameTarget.value
|
11
11
|
const url = name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)+/g, '')
|
12
12
|
this.urlTarget.value = url
|
13
|
-
|
14
|
-
// TODO: do ajax call and check if url is available
|
15
|
-
// if not, append a number to the end to make it unique
|
16
13
|
}
|
17
14
|
}
|
@@ -67,6 +67,8 @@ export default class extends CheckboxSelectAll {
|
|
67
67
|
.filter((internalName) => !existingVariantsOnServer.includes(internalName))
|
68
68
|
)
|
69
69
|
}
|
70
|
+
|
71
|
+
this.inventoryFormTarget = document.querySelector('.inventory-form');
|
70
72
|
}
|
71
73
|
|
72
74
|
toggleQuantityTracked() {
|
@@ -236,11 +238,14 @@ export default class extends CheckboxSelectAll {
|
|
236
238
|
}
|
237
239
|
|
238
240
|
optionsValueChanged(value, previousValue) {
|
241
|
+
let hasNoOptions = true
|
242
|
+
|
239
243
|
if (this.hasNewOptionButtonTarget) {
|
240
244
|
const label = this.newOptionButtonLabelTarget
|
241
245
|
|
242
246
|
if (Object.values(value).filter(Boolean).length) {
|
243
247
|
label.textContent = label.dataset.hasOptionsText
|
248
|
+
hasNoOptions = false
|
244
249
|
} else {
|
245
250
|
label.textContent = label.dataset.noOptionsText
|
246
251
|
}
|
@@ -248,6 +253,8 @@ export default class extends CheckboxSelectAll {
|
|
248
253
|
this.refreshOptionNameSelect()
|
249
254
|
this.variantsValue = this.generateVariants(value)
|
250
255
|
|
256
|
+
this.toggleInventoryForm(hasNoOptions)
|
257
|
+
|
251
258
|
// We want to clear the ignoredVariants when the options change
|
252
259
|
if (previousValue && Object.keys(previousValue).length === 0) return
|
253
260
|
this.ignoredVariants = new Set()
|
@@ -765,6 +772,8 @@ export default class extends CheckboxSelectAll {
|
|
765
772
|
this.addOption(newOptionName, newOptionValues, newOptionId)
|
766
773
|
|
767
774
|
this.hideNewOptionForm()
|
775
|
+
|
776
|
+
this.toggleInventoryForm(false)
|
768
777
|
}
|
769
778
|
|
770
779
|
hideNewOptionForm() {
|
@@ -1052,4 +1061,14 @@ export default class extends CheckboxSelectAll {
|
|
1052
1061
|
}
|
1053
1062
|
}
|
1054
1063
|
}
|
1064
|
+
|
1065
|
+
toggleInventoryForm(value) {
|
1066
|
+
if (!this.inventoryFormTarget) return
|
1067
|
+
|
1068
|
+
if (value) {
|
1069
|
+
this.inventoryFormTarget.classList.remove('d-none')
|
1070
|
+
} else {
|
1071
|
+
this.inventoryFormTarget.classList.add('d-none')
|
1072
|
+
}
|
1073
|
+
}
|
1055
1074
|
}
|
@@ -4,11 +4,11 @@ import { lockScroll, unlockScroll } from 'spree/core/helpers/scroll_lock'
|
|
4
4
|
|
5
5
|
|
6
6
|
const initTooltips = () => {
|
7
|
-
$('.with-tip').each(function() {
|
7
|
+
$('.with-tip, .trix-button').each(function() {
|
8
8
|
$(this).tooltip()
|
9
9
|
})
|
10
10
|
|
11
|
-
$('.with-tip').on('show.bs.tooltip', function(event) {
|
11
|
+
$('.with-tip, .trix-button').on('show.bs.tooltip', function(event) {
|
12
12
|
if (('ontouchstart' in window)) {
|
13
13
|
event.preventDefault()
|
14
14
|
}
|
@@ -16,7 +16,7 @@ const initTooltips = () => {
|
|
16
16
|
}
|
17
17
|
|
18
18
|
const removeTooltips = () => {
|
19
|
-
$('.with-tip').each(function() {
|
19
|
+
$('.with-tip, .trix-button').each(function() {
|
20
20
|
$(this).tooltip('dispose')
|
21
21
|
})
|
22
22
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= content_for :title do %>
|
2
|
+
<%= Spree.t(:forbidden) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= content_for :page_title do %>
|
6
|
+
<%= Spree.t(:forbidden) %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<p class="text-danger">
|
10
|
+
<%= Spree.t(:forbidden_message) %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<%= link_to Spree.t('admin.back_to_dashboard'), spree.admin_dashboard_path, class: 'btn btn-primary' %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<tr id="<%= dom_id page %>" data-controller="row-link" class="cursor-pointer">
|
2
|
+
<td scope="row" data-action="click->row-link#openLink" class="w-60">
|
3
|
+
<%= link_to page.name, spree.edit_admin_theme_path(current_store.default_theme, page_id: page.id), data: { row_link_target: :link } %>
|
4
|
+
</td>
|
5
|
+
<td data-action="click->row-link#openLink" class="w-15">
|
6
|
+
<%= local_time_ago(page.created_at, class: 'with-tip') %>
|
7
|
+
</td>
|
8
|
+
<td data-action="click->row-link#openLink" class="w-15">
|
9
|
+
<%= local_time_ago(page.updated_at, class: 'with-tip') %>
|
10
|
+
</td>
|
11
|
+
<td class="w-10 text-right">
|
12
|
+
<div class="dropdown">
|
13
|
+
<button class="btn btn-sm btn-light" type="button" data-toggle="dropdown" aria-expanded="false">
|
14
|
+
<%= icon('dots-vertical', class: 'mr-0') %>
|
15
|
+
</button>
|
16
|
+
<ul class="dropdown-menu">
|
17
|
+
<li>
|
18
|
+
<%= link_to_with_icon 'edit', Spree.t(:edit), spree.edit_admin_theme_path(current_store.default_theme, page_id: page.id), class: 'dropdown-item' %>
|
19
|
+
</li>
|
20
|
+
<li>
|
21
|
+
<%= link_to_delete(page, class: 'dropdown-item btn-danger', icon: 'trash') %>
|
22
|
+
</li>
|
23
|
+
</ul>
|
24
|
+
</div>
|
25
|
+
</td>
|
26
|
+
</tr>
|
@@ -10,10 +10,12 @@
|
|
10
10
|
<% if @collection.any? %>
|
11
11
|
<div class="table-responsive">
|
12
12
|
<table class="table">
|
13
|
-
<thead
|
13
|
+
<thead>
|
14
14
|
<tr>
|
15
|
-
<th><%= Spree.t(:name) %></th>
|
16
|
-
<th><%= Spree.t(:
|
15
|
+
<th><%= sort_link @search, :name, Spree.t(:name) %></th>
|
16
|
+
<th><%= sort_link @search, :created_at, Spree.t(:created_at) %></th>
|
17
|
+
<th><%= sort_link @search, :updated_at, Spree.t(:updated_at) %></th>
|
18
|
+
<th></th>
|
17
19
|
</tr>
|
18
20
|
</thead>
|
19
21
|
<tbody>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<tr data-controller="row-link" id="<%= dom_id(post_category) %>">
|
2
|
-
<td
|
3
|
-
|
2
|
+
<td class="w-60 p-0">
|
3
|
+
<%= link_to post_category.title, spree.edit_admin_post_category_path(post_category), class: 'd-block w-100 h-100 px-3 py-2', data: { row_link_target: :link } %>
|
4
|
+
</td>
|
5
|
+
<td class="w-10 cursor-pointer" data-action="click->row-link#openLink"><%= post_category.posts.count %></td>
|
6
|
+
<td class="w-10 cursor-pointer text-right" data-action="click->row-link#openLink">
|
4
7
|
<%= link_to_edit(post_category, class: 'btn btn-light btn-sm') if can? :edit, post_category %>
|
5
8
|
</td>
|
6
9
|
</tr>
|
@@ -20,9 +20,9 @@
|
|
20
20
|
<div class="form-group">
|
21
21
|
<%= f.label :post_category_id_eq, Spree.t(:category) %>
|
22
22
|
<%= f.select :post_category_id_eq,
|
23
|
-
options_for_select(
|
23
|
+
options_for_select(@post_categories.pluck(:title, :id), params.dig(:q, :post_category_id_eq)),
|
24
24
|
{ include_blank: true },
|
25
|
-
{
|
25
|
+
{ data: { filters_target: :input, controller: 'autocomplete-select' } } %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
</div>
|
@@ -48,12 +48,12 @@
|
|
48
48
|
<div class="card-body">
|
49
49
|
<div class="form-group">
|
50
50
|
<%= f.label :author_id, Spree.t(:author) %>
|
51
|
-
<%= f.select :author_id, options_for_select(post_authors_select_options, @post.author_id || try_spree_current_user.id), {}, {
|
51
|
+
<%= f.select :author_id, options_for_select(post_authors_select_options, @post.author_id || try_spree_current_user.id), {}, { data: { controller: 'autocomplete-select' } } %>
|
52
52
|
</div>
|
53
53
|
|
54
54
|
<div class="form-group">
|
55
55
|
<%= f.label :post_category_id, Spree.t(:category) %>
|
56
|
-
<%= f.select :post_category_id, options_for_select(
|
56
|
+
<%= f.select :post_category_id, options_for_select(@post_categories.pluck(:title, :id), @post.post_category_id), { include_blank: true }, { data: { controller: 'autocomplete-select' } } %>
|
57
57
|
</div>
|
58
58
|
|
59
59
|
<div class="form-group">
|
@@ -13,10 +13,10 @@
|
|
13
13
|
<table class="table">
|
14
14
|
<thead class="text-muted">
|
15
15
|
<tr>
|
16
|
-
<th><%= Spree.t(:title) %></th>
|
16
|
+
<th><%= sort_link @search, :title, Spree.t(:title) %></th>
|
17
17
|
<th><%= Spree.t(:category) %></th>
|
18
18
|
<th><%= Spree.t(:author) %></th>
|
19
|
-
<th><%= Spree.t(:published_at) %></th>
|
19
|
+
<th><%= sort_link @search, :published_at, Spree.t(:published_at) %></th>
|
20
20
|
<th></th>
|
21
21
|
</tr>
|
22
22
|
</thead>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
</tr>
|
16
16
|
</thead>
|
17
17
|
<tbody>
|
18
|
-
<%= f.fields_for :product_properties do |product_property_form| %>
|
18
|
+
<%= f.fields_for :product_properties, sorted_product_properties(f.object) do |product_property_form| %>
|
19
19
|
<% property = product_property_form.object.property %>
|
20
20
|
<%= product_property_form.hidden_field :id %>
|
21
21
|
<%= product_property_form.hidden_field :property_id %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= link_to spree.admin_user_path(user), class: 'rounded hover-light p-2 d-flex justify-content-start align-items-center', data: {turbo_frame: :_top} do %>
|
1
|
+
<%= link_to spree.admin_user_path(user), class: 'rounded hover-light p-2 d-flex justify-content-start align-items-center', data: {turbo_frame: :_top, row_link_target: :link} do %>
|
2
2
|
<% if user.name.present? %>
|
3
3
|
<%= render_avatar(user, width: 48, height: 48, class: 'mr-3 avatar') %>
|
4
4
|
<% else %>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
<div class="card-body border-top pt-4 d-none" data-reveal-target="item">
|
47
|
-
<h6><%= Spree.t(:
|
47
|
+
<h6><%= Spree.t(:rules) %></h6>
|
48
48
|
<%= render 'spree/admin/taxons/rules_form', f: f %>
|
49
49
|
</div>
|
50
50
|
</div>
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<% if @taxon.automatic? %>
|
53
53
|
<div class="card mb-4">
|
54
54
|
<div class="card-header">
|
55
|
-
<h5 class="card-title"><%= Spree.t(:
|
55
|
+
<h5 class="card-title"><%= Spree.t(:rules) %></h5>
|
56
56
|
</div>
|
57
57
|
<div class="card-body">
|
58
58
|
<div class="alert alert-info mb-3"><%= Spree.t('admin.taxon_types.automatic_info') %></div>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
|
44
44
|
<div class="col-lg-4">
|
45
45
|
<div class="d-flex justify-content-center flex-column mb-3 mb-lg-0 border-right">
|
46
|
-
<span class="text-muted"><%= Spree.t(
|
46
|
+
<span class="text-muted"><%= Spree.t(:created_at) %></span>
|
47
47
|
<span class="font-size-lg text-dark font-weight-bold mt-1 me-3">
|
48
48
|
<%= local_time(@user.created_at) %>
|
49
49
|
</span>
|
@@ -1,17 +1,18 @@
|
|
1
|
-
<tr id="<%= spree_dom_id user %>">
|
1
|
+
<tr id="<%= spree_dom_id user %>" data-controller="row-link">
|
2
2
|
<td class="pr-0 w-5">
|
3
3
|
<%= bulk_operations_checkbox(user) %>
|
4
4
|
</td>
|
5
|
-
<td class='
|
5
|
+
<td class='w-50 no-wrap py-0 pl-1 pr-0'>
|
6
6
|
<%= render 'spree/admin/shared/user', user: user %>
|
7
7
|
</td>
|
8
|
-
<td class="
|
8
|
+
<td class="cursor-pointer" data-action="click->row-link#openLink">
|
9
9
|
<%= active_badge(user.accepts_email_marketing?) %>
|
10
10
|
</td>
|
11
|
-
<td class="w-25
|
11
|
+
<td class="w-25 cursor-pointer" data-action="click->row-link#openLink">
|
12
12
|
<%= customer_location_flag(user) %>
|
13
13
|
<%= customer_location(user) %>
|
14
14
|
</td>
|
15
|
-
<td class='
|
16
|
-
<td class='
|
15
|
+
<td class='w-10 no-wrap cursor-pointer' data-action="click->row-link#openLink"><%= user.completed_orders_for_store(current_store).count %></td>
|
16
|
+
<td class='w-10 no-wrap cursor-pointer' data-action="click->row-link#openLink"><%= user.display_amount_spent_in(current_currency) %></td>
|
17
|
+
<td class='w-10 no-wrap cursor-pointer' data-action="click->row-link#openLink"><%= local_time(user.created_at) %></td>
|
17
18
|
</tr>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= link_to spree.admin_users_path(q: params[:q].to_unsafe_hash, page: params[:page], per_page: params[:per_page], format: :csv), class: 'btn btn-light bg-transparent with-tip
|
7
|
-
<%= icon 'table-export'
|
6
|
+
<%= link_to spree.admin_users_path(q: params[:q].to_unsafe_hash, page: params[:page], per_page: params[:per_page], format: :csv), class: 'btn btn-light bg-transparent with-tip d-none d-lg-inline-flex', title: 'Export Customers to a CSV file. To filter specific Customers use "Filters" or Customers/Subscribers tabs before clicking this button' do %>
|
7
|
+
<%= icon 'table-export' %>
|
8
8
|
<%= Spree.t(:export) %>
|
9
9
|
<% end if can?(:export, Spree::Export) %>
|
10
10
|
|
@@ -53,6 +53,7 @@
|
|
53
53
|
<th><%= Spree.t(:location) %></th>
|
54
54
|
<th><%= Spree.t('admin.num_orders') %></th>
|
55
55
|
<th><%= Spree.t('admin.amount_spent') %></th>
|
56
|
+
<th><%= sort_link @search, :created_at, Spree.t(:created_at) %></th>
|
56
57
|
</tr>
|
57
58
|
</thead>
|
58
59
|
<tbody>
|
data/config/locales/en.yml
CHANGED
@@ -19,7 +19,6 @@ en:
|
|
19
19
|
active: Setting products to active will make those products available on the storefront.
|
20
20
|
archived: Setting products to archived will hide them from storefront.
|
21
21
|
draft: Setting products to draft will hide them from storefront.
|
22
|
-
ready_for_review: We will notify your partners that these products are ready for review. Your partners will be able to review and publish these products.
|
23
22
|
status_updated: Status updated
|
24
23
|
title:
|
25
24
|
add_tags: Add tags
|
@@ -80,7 +79,6 @@ en:
|
|
80
79
|
manage_stock_locations: Manage Stock Locations
|
81
80
|
manage_taxons: Manage Taxons
|
82
81
|
manage_zones: Manage Zones
|
83
|
-
member_since: Member since
|
84
82
|
name: Name
|
85
83
|
navigation:
|
86
84
|
nested_under: Nested under
|
@@ -160,7 +158,7 @@ en:
|
|
160
158
|
by_stock: By stock
|
161
159
|
deleted: Deleted
|
162
160
|
draft: Draft
|
163
|
-
help_bubble: Draft
|
161
|
+
help_bubble: Draft products aren't available for purchase. Active products are live.
|
164
162
|
in_stock: In Stock
|
165
163
|
inventory:
|
166
164
|
barcode: Barcode (ISBN, UPC, GTIN, etc.)
|
@@ -175,7 +173,7 @@ en:
|
|
175
173
|
available_on: Marks when the product will be released, put a future date to indicate that this is a pre-order
|
176
174
|
discontinue_on: Marks when the product should be automatically taken off from your site
|
177
175
|
make_active_at: Marks when the product should be automatically promoted to "active" state
|
178
|
-
status: Draft
|
176
|
+
status: Draft products aren't available for purchase. Active products are live.
|
179
177
|
stores:
|
180
178
|
choose_stores: Choose which stores this product should be available in
|
181
179
|
variants:
|
@@ -226,7 +224,7 @@ en:
|
|
226
224
|
taxon_type: Taxon type
|
227
225
|
taxon_types:
|
228
226
|
automatic: Automatic
|
229
|
-
automatic_info: Automatically
|
227
|
+
automatic_info: Automatically add products to this taxon if they match the rules you set.
|
230
228
|
manual: Manual
|
231
229
|
manual_info: Curate products manually. You can add or remove them in bulk.
|
232
230
|
upload_new_asset: Upload new asset
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vendo Connect Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.
|
26
|
+
version: 5.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_api
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.0.
|
33
|
+
version: 5.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.0.
|
40
|
+
version: 5.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: active_link_to
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -520,6 +520,7 @@ files:
|
|
520
520
|
- app/views/spree/admin/digital_assets/index.html.erb
|
521
521
|
- app/views/spree/admin/digital_assets/new.html.erb
|
522
522
|
- app/views/spree/admin/digital_assets/update.turbo_stream.erb
|
523
|
+
- app/views/spree/admin/errors/forbidden.html.erb
|
523
524
|
- app/views/spree/admin/exports/_export.html.erb
|
524
525
|
- app/views/spree/admin/exports/create.turbo_stream.erb
|
525
526
|
- app/views/spree/admin/exports/index.html.erb
|
@@ -687,7 +688,7 @@ files:
|
|
687
688
|
- app/views/spree/admin/page_sections/update.turbo_stream.erb
|
688
689
|
- app/views/spree/admin/pages/_filters.html.erb
|
689
690
|
- app/views/spree/admin/pages/_form.html.erb
|
690
|
-
- app/views/spree/admin/pages/_page.erb
|
691
|
+
- app/views/spree/admin/pages/_page.html.erb
|
691
692
|
- app/views/spree/admin/pages/edit.html.erb
|
692
693
|
- app/views/spree/admin/pages/index.html.erb
|
693
694
|
- app/views/spree/admin/pages/new.html.erb
|
@@ -1058,9 +1059,9 @@ licenses:
|
|
1058
1059
|
- AGPL-3.0-or-later
|
1059
1060
|
metadata:
|
1060
1061
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1061
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.
|
1062
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.3
|
1062
1063
|
documentation_uri: https://docs.spreecommerce.org/
|
1063
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.0.
|
1064
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.0.3
|
1064
1065
|
post_install_message:
|
1065
1066
|
rdoc_options: []
|
1066
1067
|
require_paths:
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<tr id="<%= dom_id page %>" data-controller="row-link" class="cursor-pointer">
|
2
|
-
<td scope="row" data-action="click->row-link#openLink">
|
3
|
-
<%= link_to page.name, spree.edit_admin_theme_path(current_store.default_theme, page_id: page.id), data: { row_link_target: :link } %>
|
4
|
-
</td>
|
5
|
-
<td data-action="click->row-link#openLink">
|
6
|
-
<%= local_time_ago(page.updated_at, class: 'with-tip') %>
|
7
|
-
</td>
|
8
|
-
</tr>
|