spree_backend 4.2.0.rc5 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend.js +1 -1
- data/app/assets/javascripts/spree/backend/admin.js +9 -12
- data/app/assets/stylesheets/spree/backend/global/_mixins.scss +19 -0
- data/app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss +94 -76
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +1 -0
- data/app/controllers/spree/admin/base_controller.rb +1 -0
- data/app/controllers/spree/admin/stores_controller.rb +7 -0
- data/app/helpers/spree/admin/base_helper.rb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +2 -2
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +1 -2
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +2 -2
- data/app/views/spree/admin/products/new.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +5 -6
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_translations.html.erb +1 -2
- data/app/views/spree/admin/stores/_form.html.erb +8 -3
- data/app/views/spree/admin/stores/index.html.erb +4 -2
- data/app/views/spree/admin/variants/_form.html.erb +1 -1
- metadata +11 -11
- data/app/helpers/spree/admin/currency_helper.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a77e87c4b85d35709151d5f3e17ed234d4575c3d7cf8d9ba25406271471cee9
|
4
|
+
data.tar.gz: 03b7a255af3e75e9b0376dd92f844db6ec9cc7acd714b0c586f87ad31fa5fe5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac1ea6505ba5b55b63ffe801062503660190ee11bac23dab2084b67d4e79f424f19a6fba6ab804d0d1c357e1bb62726377afaee1f9d9a47289ee7ff9823d8db9
|
7
|
+
data.tar.gz: a50b60c3e76c03b17297f33a96b6599f98c9a6746011bc0aec0d056f917d68499b51c70a1e4eba4e194c6e5f99be4772c479e9cb1a77d041316646825cd953a1
|
@@ -120,7 +120,7 @@ jQuery(function ($) {
|
|
120
120
|
$('.js-filterable').each(function () {
|
121
121
|
var $this = $(this)
|
122
122
|
|
123
|
-
if ($this.val() !== null && $this.val() !== '' && $this.val().length !== 0) {
|
123
|
+
if ($this.val() !== null && $this.val() !== '' && $this.val().length !== 0 && !$this.hasClass('flatpickr-alt-input')) {
|
124
124
|
var ransackValue, filter
|
125
125
|
var ransackFieldId = $this.attr('id')
|
126
126
|
var label = $('label[for="' + ransackFieldId + '"]')
|
@@ -223,29 +223,26 @@ $.fn.radioControlsVisibilityOfElement = function (dependentElementSelector) {
|
|
223
223
|
}
|
224
224
|
|
225
225
|
document.addEventListener('DOMContentLoaded', function() {
|
226
|
-
|
227
|
-
|
226
|
+
flatpickr.setDefaults({
|
227
|
+
altInput: true,
|
228
228
|
time_24hr: true,
|
229
|
-
|
229
|
+
altInputClass: 'flatpickr-alt-input',
|
230
|
+
locale: Spree.translations.flatpickr_locale
|
231
|
+
})
|
232
|
+
|
233
|
+
var dateFrom = flatpickr('.datePickerFrom', {
|
230
234
|
onChange: function(selectedDates) {
|
231
235
|
dateTo.set('minDate', selectedDates[0])
|
232
236
|
}
|
233
237
|
})
|
234
238
|
|
235
239
|
var dateTo = flatpickr('.datePickerTo', {
|
236
|
-
locale: Spree.translations.flatpickr_locale,
|
237
|
-
monthSelectorType: 'static',
|
238
|
-
time_24hr: true,
|
239
240
|
onChange: function(selectedDates) {
|
240
241
|
dateFrom.set('maxDate', selectedDates[0])
|
241
242
|
}
|
242
243
|
})
|
243
244
|
|
244
|
-
flatpickr('.datepicker', {
|
245
|
-
locale: Spree.translations.flatpickr_locale,
|
246
|
-
monthSelectorType: 'static',
|
247
|
-
time_24hr: true
|
248
|
-
})
|
245
|
+
flatpickr('.datepicker', { })
|
249
246
|
})
|
250
247
|
|
251
248
|
$(document).ready(function() {
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Mixin to prefix several properties at once
|
2
|
+
|
3
|
+
// EXAMPLE
|
4
|
+
// @include prefix((
|
5
|
+
// appearance: none,
|
6
|
+
// touch-callout: none,
|
7
|
+
// user-select: none
|
8
|
+
// ), webkit moz ms khtml);
|
9
|
+
|
10
|
+
@mixin prefix($declarations, $prefixes: ()) {
|
11
|
+
@each $property, $value in $declarations {
|
12
|
+
@each $prefix in $prefixes {
|
13
|
+
#{'-' + $prefix + '-' + $property}: $value;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Output standard non-prefixed declaration
|
17
|
+
#{$property}: $value;
|
18
|
+
}
|
19
|
+
}
|
@@ -1,95 +1,113 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.flatpickr-calendar {
|
2
|
+
// Custom Flatpickr styling for Spree + BS4.
|
3
|
+
.flatpickr-current-month {
|
4
|
+
span.cur-month:hover {
|
5
|
+
background: transparent;
|
6
|
+
}
|
7
|
+
.numInputWrapper {
|
8
|
+
margin-left: 3px;
|
9
|
+
border-radius: $border-radius;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.flatpickr-monthDropdown-months {
|
14
|
+
@include prefix((
|
15
|
+
appearance: none
|
16
|
+
), webkit moz ms khtml);
|
17
|
+
|
18
|
+
padding: 0.2em;
|
19
|
+
border-radius: $border-radius;
|
20
|
+
}
|
5
21
|
}
|
6
|
-
}
|
7
22
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
background-color: white !important;
|
13
|
-
}
|
23
|
+
.numInputWrapper span.arrowUp {
|
24
|
+
border-color: transparent;
|
25
|
+
border-radius: 0;
|
26
|
+
}
|
14
27
|
|
15
|
-
.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
.flatpickr-current-month span.cur-month:hover {
|
21
|
-
background: transparent;
|
22
|
-
}
|
23
|
-
.numInputWrapper span.arrowUp {
|
24
|
-
border-color: transparent;
|
25
|
-
border-radius: 0;
|
26
|
-
}
|
27
|
-
.numInputWrapper span.arrowDown {
|
28
|
-
border-color: transparent;
|
29
|
-
border-radius: 0;
|
30
|
-
}
|
28
|
+
.numInputWrapper span.arrowDown {
|
29
|
+
border-color: transparent;
|
30
|
+
border-radius: 0;
|
31
|
+
}
|
31
32
|
|
32
|
-
.
|
33
|
-
|
34
|
-
|
35
|
-
opacity: 0;
|
36
|
-
}
|
33
|
+
.flatpickr-day {
|
34
|
+
margin: 2px 0;
|
35
|
+
border-radius: $border-radius ;
|
37
36
|
}
|
38
|
-
}
|
39
37
|
|
40
|
-
.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
z-index: 0;
|
45
|
-
height: 100%;
|
46
|
-
}
|
38
|
+
.flatpickr-months .flatpickr-prev-month:hover svg,
|
39
|
+
.flatpickr-months .flatpickr-next-month:hover svg {
|
40
|
+
fill: $primary;
|
41
|
+
}
|
47
42
|
|
48
|
-
.flatpickr-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
.flatpickr-time {
|
44
|
+
border-radius: 0 0 5px 5px;
|
45
|
+
&:after {
|
46
|
+
display: none;
|
47
|
+
}
|
48
|
+
.numInputWrapper {
|
49
|
+
span {
|
50
|
+
border-color: transparent;
|
51
|
+
border-radius: 0;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
52
55
|
|
53
|
-
//
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
-khtml-user-select: none; /* Konqueror HTML */
|
58
|
-
-moz-user-select: none; /* Old versions of Firefox */
|
59
|
-
-ms-user-select: none; /* Internet Explorer/Edge */
|
60
|
-
user-select: none; /* Non-prefixed version, currently
|
61
|
-
supported by Chrome, Edge, Opera and Firefox */
|
56
|
+
// Required to stop an opened cal showing above the nav bar.
|
57
|
+
&.open {
|
58
|
+
z-index: $zindex-dropdown;
|
59
|
+
}
|
62
60
|
}
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
|
62
|
+
// Mixin for calendar toggle icon show/hide.
|
63
|
+
@mixin swith-appended-icon {
|
64
|
+
&:placeholder-shown:not(:focus) + * {
|
65
|
+
@content;
|
66
|
+
}
|
67
67
|
}
|
68
68
|
|
69
|
-
|
70
|
-
.input-group
|
71
|
-
.input-group
|
72
|
-
.
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
}
|
69
|
+
.input-group.datePickerFrom,
|
70
|
+
.input-group.datePickerTo,
|
71
|
+
.input-group.datepicker {
|
72
|
+
input.flatpickr-alt-input[readonly] {
|
73
|
+
// Flatpickr alternate input is read-only,
|
74
|
+
// style it as an active input field.
|
75
|
+
background-color: white !important;
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
77
|
+
// Fix a bug where occasionally the whole screen will highlight
|
78
|
+
// if you clicked the Flatpcikr input box while moving the cursor.
|
79
|
+
@include prefix((
|
80
|
+
appearance: none,
|
81
|
+
touch-callout: none,
|
82
|
+
user-select: none
|
83
|
+
), webkit moz ms khtml);
|
81
84
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
display: none;
|
85
|
+
@include swith-appended-icon {
|
86
|
+
opacity: 0;
|
87
|
+
}
|
86
88
|
}
|
87
|
-
.numInputWrapper {
|
88
|
-
span {
|
89
|
-
border-color: transparent;
|
90
|
-
border-radius: 0;
|
91
89
|
|
92
|
-
|
90
|
+
// Required for calendar toggle icon show/hide.
|
91
|
+
.append_under {
|
92
|
+
position: absolute;
|
93
|
+
right: 0;
|
94
|
+
top: 0;
|
95
|
+
z-index: 0;
|
96
|
+
height: 100%;
|
97
|
+
}
|
98
|
+
|
99
|
+
// Styling for calendar toggle icon toggle
|
100
|
+
.input-group-append:not(:last-child) >
|
101
|
+
.force-round {
|
102
|
+
z-index: 5;
|
103
|
+
border-top-right-radius: $border-radius !important;
|
104
|
+
border-bottom-right-radius: $border-radius !important;
|
105
|
+
}
|
93
106
|
|
107
|
+
// Styling for calendar toggle icon toggle
|
108
|
+
.form-control:not(:first-child),
|
109
|
+
.input-group >.flatpickr-alt-input:not(:first-child) {
|
110
|
+
border-top-left-radius: $border-radius !important;
|
111
|
+
border-bottom-left-radius: $border-radius !important;
|
94
112
|
}
|
95
113
|
}
|
@@ -5,6 +5,7 @@ module Spree
|
|
5
5
|
before_action :set_default_currency, only: :new
|
6
6
|
before_action :set_default_locale, only: :new
|
7
7
|
before_action :normalize_supported_currencies, only: [:create, :update]
|
8
|
+
before_action :normalize_supported_locales, only: [:create, :update]
|
8
9
|
before_action :set_default_country_id, only: :new
|
9
10
|
before_action :load_all_countries, only: [:new, :edit, :update, :create]
|
10
11
|
before_action :load_all_zones, only: %i[new edit]
|
@@ -127,6 +128,12 @@ module Spree
|
|
127
128
|
end
|
128
129
|
end
|
129
130
|
|
131
|
+
def normalize_supported_locales
|
132
|
+
if params[:store][:supported_locales]&.is_a?(Array)
|
133
|
+
params[:store][:supported_locales] = params[:store][:supported_locales].compact.uniq.reject(&:blank?).join(',')
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
130
137
|
def set_default_country_id
|
131
138
|
@store.default_country_id = Spree::Config[:default_country_id]
|
132
139
|
end
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<div class="col-12 col-md-6 mb-3 mb-md-0">
|
24
24
|
<div class="input-group datePickerFrom"
|
25
25
|
data-wrap="true"
|
26
|
-
data-
|
26
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
27
27
|
data-max-date="<%= params[:q][:created_at_lt] %>">
|
28
28
|
<%= f.text_field :created_at_gt,
|
29
29
|
class: 'form-control js-filterable shadow-none',
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<div class="col-12 col-md-6 mt-3 mt-md-0">
|
38
38
|
<div class="input-group datePickerTo"
|
39
39
|
data-wrap="true"
|
40
|
-
data-
|
40
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
41
41
|
data-min-date="<%= params[:q][:created_at_gt] %>">
|
42
42
|
|
43
43
|
<%= f.text_field :created_at_lt,
|
@@ -6,11 +6,10 @@
|
|
6
6
|
</div>
|
7
7
|
<div class="form-group previous_cards card-body mb-0" data-hook="previous_cards">
|
8
8
|
<ul class="m-0 p-0">
|
9
|
-
|
10
9
|
<% previous_cards.each do |card| %>
|
11
10
|
<li>
|
12
11
|
<label>
|
13
|
-
<%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.
|
12
|
+
<%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_brand + ' - ' + card.display_number %>
|
14
13
|
</label>
|
15
14
|
</li>
|
16
15
|
<% end %>
|
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
<div class="input-group datePickerFrom"
|
68
68
|
data-wrap="true"
|
69
|
-
data-
|
69
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
70
70
|
data-max-date="<%= @product.discontinue_on %>">
|
71
71
|
|
72
72
|
<%= f.text_field :available_on,
|
@@ -87,7 +87,7 @@
|
|
87
87
|
|
88
88
|
<div class="input-group datePickerTo"
|
89
89
|
data-wrap="true"
|
90
|
-
data-
|
90
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
91
91
|
data-min-date="<%= @product.available_on %>">
|
92
92
|
|
93
93
|
<%= f.text_field :discontinue_on,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
<div class="input-group datepicker"
|
48
48
|
data-wrap="true"
|
49
|
-
data-
|
49
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>">
|
50
50
|
<%= f.text_field :available_on,
|
51
51
|
value: datepicker_field_value(@product.available_on),
|
52
52
|
placeholder: Spree.t(:select_a_date),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion } %>
|
2
2
|
|
3
3
|
<div class="row" id="general_fields">
|
4
|
-
<div class="col-12 col-
|
4
|
+
<div class="col-12 col-lg-4">
|
5
5
|
<%= f.field_container :name, class: ['form-group'] do %>
|
6
6
|
<%= f.label :name %>
|
7
7
|
<%= f.text_field :name, class: 'form-control' %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<% end %>
|
36
36
|
</div>
|
37
37
|
|
38
|
-
<div class="col-12 col-
|
38
|
+
<div class="col-12 col-lg-4">
|
39
39
|
<%= f.field_container :description, class: ['form-group'] do %>
|
40
40
|
<%= f.label :description %>
|
41
41
|
<%= f.text_area :description, rows: 7, class: 'form-control' %>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<% end %>
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<div id="expiry_fields" class="col-12 col-
|
50
|
+
<div id="expiry_fields" class="col-12 col-lg-4">
|
51
51
|
<div class="form-group">
|
52
52
|
<%= f.field_container :usage_limit do %>
|
53
53
|
<%= f.label :usage_limit, Spree.t('limit_usage_to') %>
|
@@ -57,13 +57,12 @@
|
|
57
57
|
<%= Spree.t(:current_promotion_usage, count: @promotion.credits_count) %>
|
58
58
|
</small>
|
59
59
|
</div>
|
60
|
-
|
61
60
|
<div id="starts_at_field" class="form-group">
|
62
61
|
<%= f.label :starts_at %>
|
63
62
|
<div class="input-group datePickerFrom"
|
64
63
|
data-wrap="true"
|
65
64
|
data-enable-time="true"
|
66
|
-
data-
|
65
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_time_format, scope: 'date_picker', default: 'M j, Y H:i') %>"
|
67
66
|
data-max-date="<%= @promotion.expires_at %>">
|
68
67
|
<%= f.datetime_field :starts_at,
|
69
68
|
class: 'form-control shadow-none',
|
@@ -79,7 +78,7 @@
|
|
79
78
|
<div class="input-group datePickerTo"
|
80
79
|
data-wrap="true"
|
81
80
|
data-enable-time='true'
|
82
|
-
data-
|
81
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_time_format, scope: 'date_picker', default: 'M j, Y H:i') %>"
|
83
82
|
data-min-date="<%= @promotion.starts_at %>">
|
84
83
|
<%= f.datetime_field :expires_at,
|
85
84
|
placeholder:Spree.t('ends_at'),
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="col-12 col-md-6 mb-3 mb-md-0">
|
6
6
|
<div class="input-group datePickerFrom"
|
7
7
|
data-wrap="true"
|
8
|
-
data-
|
8
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
9
9
|
data-max-date="<%= params[:q][:completed_at_lt] %>">
|
10
10
|
<%= s.text_field :completed_at_gt,
|
11
11
|
class: 'form-control shadow-none',
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<div class="col-12 col-md-6 mt-3 mt-md-0">
|
21
21
|
<div class="input-group datePickerTo"
|
22
22
|
data-wrap="true"
|
23
|
-
data-
|
23
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>"
|
24
24
|
data-min-date="<%= params[:q][:completed_at_gt] %>">
|
25
25
|
|
26
26
|
<%= s.text_field :completed_at_lt,
|
@@ -24,8 +24,6 @@
|
|
24
24
|
no_results: Spree.t(:no_results),
|
25
25
|
option_type_placeholder: Spree.t(:option_type_placeholder),
|
26
26
|
paste: Spree.t(:paste),
|
27
|
-
date_format: Spree.t(:js_format, scope: 'date_picker', default: 'Y/m/d'),
|
28
|
-
date_time_format: Spree.t(:js_date_time, scope: 'date_picker', default: 'Y/m/d - H:i'),
|
29
27
|
previous: Spree.t(:previous),
|
30
28
|
remove: Spree.t(:remove),
|
31
29
|
rename: Spree.t(:rename),
|
@@ -45,6 +43,7 @@
|
|
45
43
|
# Substitute - for _ converting zh-tw to zh_tw
|
46
44
|
# Flatpickr not making things easy here.
|
47
45
|
flatpickr_locale: "#{flatpickr_local_fallback.sub("-", "_")}"
|
46
|
+
|
48
47
|
}.to_json
|
49
48
|
%>
|
50
49
|
</script>
|
@@ -132,7 +132,7 @@
|
|
132
132
|
</div>
|
133
133
|
<div class="card-body">
|
134
134
|
<%= f.field_container :default_currency, class: ['form-group'] do %>
|
135
|
-
<%= f.label :default_currency
|
135
|
+
<%= f.label :default_currency %>
|
136
136
|
<%= f.select :default_currency, currency_options(@store.default_currency), {}, { class: 'select2' } %>
|
137
137
|
<%= f.error_message_on :default_currency %>
|
138
138
|
<% end %>
|
@@ -150,15 +150,20 @@
|
|
150
150
|
<%= f.error_message_on :checkout_zone_id %>
|
151
151
|
<% end %>
|
152
152
|
<%= f.field_container :default_locale, class: ['form-group'] do %>
|
153
|
-
<%= f.label :default_locale
|
153
|
+
<%= f.label :default_locale %>
|
154
154
|
<%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale || I18n.locale), {}, { class: 'select2' } %>
|
155
155
|
<%= f.error_message_on :default_locale %>
|
156
156
|
<% unless defined?(SpreeI18n) %>
|
157
157
|
<small class="form-text text-muted">
|
158
|
-
<%= raw(Spree.t('store_form.
|
158
|
+
<%= raw(Spree.t('store_form.locales_help')) %>
|
159
159
|
</small>
|
160
160
|
<% end %>
|
161
161
|
<% end %>
|
162
|
+
<%= f.field_container :supported_locales, class: ['form-group'] do %>
|
163
|
+
<%= f.label :supported_locales, Spree.t(:supported_locales) %>
|
164
|
+
<%= f.select :supported_locales, options_from_collection_for_select(all_locales_options, :last, :first, @store.supported_locales&.split(',')), {}, { multiple: true, class: 'select2' } %>
|
165
|
+
<%= f.error_message_on :supported_locales %>
|
166
|
+
<% end %>
|
162
167
|
<%= f.field_container :default_country_id, class: ['form-group'] do %>
|
163
168
|
<%= f.label :default_country_id, Spree.t('i18n.default_country') %>
|
164
169
|
<%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id || Spree::Config[:default_country_id]), {}, { class: 'select2' } %>
|
@@ -12,7 +12,8 @@
|
|
12
12
|
<thead>
|
13
13
|
<th><%= Spree.t(:name) %></th>
|
14
14
|
<th><%= Spree.t(:url) %></th>
|
15
|
-
<th><%= Spree.t(:
|
15
|
+
<th><%= Spree.t(:supported_currencies) %></th>
|
16
|
+
<th><%= Spree.t(:supported_locales) %></th>
|
16
17
|
<th><%= Spree.t(:default) %>?</th>
|
17
18
|
<th data-hook="admin_stores_index_header_actions" class="actions"></th>
|
18
19
|
<thead>
|
@@ -21,7 +22,8 @@
|
|
21
22
|
<tr>
|
22
23
|
<td><%= store.unique_name %></td>
|
23
24
|
<td><%= link_to store.url, store.formatted_url, target: :blank %></td>
|
24
|
-
<td><%= store.
|
25
|
+
<td><%= store.supported_currencies_list.map(&:iso_code).join(', ') %></td>
|
26
|
+
<td><%= store.supported_locales_list.map {|l| locale_presentation(l).first }.join(', ') %></td>
|
25
27
|
<td><%= active_badge(store.default) %></td>
|
26
28
|
<td class="actions actions-2 text-right" data-hook="admin_stores_index_row_actions">
|
27
29
|
<%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
|
@@ -44,7 +44,7 @@
|
|
44
44
|
<%= f.error_message_on :discontinue_on %>
|
45
45
|
<div class="input-group datepicker"
|
46
46
|
data-wrap="true"
|
47
|
-
data-
|
47
|
+
data-alt-format="<%= Spree.t(:fpr_human_friendly_date_format, scope: 'date_picker', default: 'M j, Y') %>">
|
48
48
|
<%= f.text_field :discontinue_on,
|
49
49
|
value: datepicker_field_value(@variant.discontinue_on),
|
50
50
|
placeholder: Spree.t(:select_a_date),
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.0
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-02-
|
12
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_api
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.2.0
|
20
|
+
version: 4.2.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 4.2.0
|
27
|
+
version: 4.2.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: spree_core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 4.2.0
|
34
|
+
version: 4.2.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 4.2.0
|
41
|
+
version: 4.2.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bootstrap
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,6 +270,7 @@ files:
|
|
270
270
|
- app/assets/stylesheets/spree/backend/components/_spinner.scss
|
271
271
|
- app/assets/stylesheets/spree/backend/components/_tables.scss
|
272
272
|
- app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss
|
273
|
+
- app/assets/stylesheets/spree/backend/global/_mixins.scss
|
273
274
|
- app/assets/stylesheets/spree/backend/global/_variables.scss
|
274
275
|
- app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss
|
275
276
|
- app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss
|
@@ -337,7 +338,6 @@ files:
|
|
337
338
|
- app/controllers/spree/admin/zones_controller.rb
|
338
339
|
- app/helpers/spree/admin/adjustments_helper.rb
|
339
340
|
- app/helpers/spree/admin/base_helper.rb
|
340
|
-
- app/helpers/spree/admin/currency_helper.rb
|
341
341
|
- app/helpers/spree/admin/customer_returns_helper.rb
|
342
342
|
- app/helpers/spree/admin/images_helper.rb
|
343
343
|
- app/helpers/spree/admin/navigation_helper.rb
|
@@ -652,9 +652,9 @@ licenses:
|
|
652
652
|
- BSD-3-Clause
|
653
653
|
metadata:
|
654
654
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
655
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0
|
655
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0
|
656
656
|
documentation_uri: https://guides.spreecommerce.org/
|
657
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.2.0
|
657
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.2.0
|
658
658
|
post_install_message:
|
659
659
|
rdoc_options: []
|
660
660
|
require_paths:
|
@@ -666,9 +666,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
666
666
|
version: 2.5.0
|
667
667
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
668
668
|
requirements:
|
669
|
-
- - "
|
669
|
+
- - ">="
|
670
670
|
- !ruby/object:Gem::Version
|
671
|
-
version:
|
671
|
+
version: '0'
|
672
672
|
requirements:
|
673
673
|
- none
|
674
674
|
rubygems_version: 3.1.4
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Spree
|
2
|
-
module Admin
|
3
|
-
module CurrencyHelper
|
4
|
-
def currency_options(selected_value = nil)
|
5
|
-
selected_value ||= Spree::Config[:currency]
|
6
|
-
currencies = ::Money::Currency.table.map do |_code, details|
|
7
|
-
iso = details[:iso_code]
|
8
|
-
[iso, "#{details[:name]} (#{iso})"]
|
9
|
-
end
|
10
|
-
options_from_collection_for_select(currencies, :first, :last, selected_value)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|