solidus_backend 3.1.5 → 3.2.0.alpha
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/README.md +1 -6
- data/app/assets/javascripts/spree/backend/components/sortable_table.js +9 -1
- data/app/assets/javascripts/spree/backend/namespaces.js +1 -0
- data/app/assets/javascripts/spree/backend/products/index.js +7 -0
- data/app/assets/javascripts/spree/backend/shipments.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -3
- data/app/assets/javascripts/spree/backend/views/index.js +1 -0
- data/app/assets/javascripts/spree/backend/views/product/search.js +44 -0
- data/app/assets/javascripts/spree/backend.js +1 -0
- data/app/assets/stylesheets/spree/backend/components/_number_with_currency.scss +1 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +9 -8
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -32
- data/app/concerns/spree/admin/sets_user_language_locale_key.rb +9 -0
- data/app/controllers/spree/admin/base_controller.rb +2 -4
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/locale_controller.rb +2 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +3 -3
- data/app/controllers/spree/admin/prices_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_items_controller.rb +1 -1
- data/app/controllers/spree/admin/store_credits_controller.rb +6 -6
- data/app/controllers/spree/admin/tax_rates_controller.rb +11 -0
- data/app/controllers/spree/admin/users_controller.rb +3 -3
- data/app/helpers/spree/admin/products_helper.rb +4 -0
- data/app/helpers/spree/admin/stock_locations_helper.rb +1 -3
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +8 -4
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +6 -8
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/prices/_master_variant_table.html.erb +5 -6
- data/app/views/spree/admin/prices/_table.html.erb +5 -6
- data/app/views/spree/admin/products/edit.html.erb +2 -2
- data/app/views/spree/admin/products/index.html.erb +9 -3
- data/app/views/spree/admin/promotions/_rules.html.erb +9 -7
- data/app/views/spree/admin/promotions/index.html.erb +2 -2
- data/app/views/spree/admin/refunds/edit.html.erb +1 -1
- data/app/views/spree/admin/refunds/new.html.erb +6 -6
- data/app/views/spree/admin/shared/_head.html.erb +1 -1
- data/app/views/spree/admin/shared/_navigation.html.erb +5 -1
- data/app/views/spree/admin/shared/{_navigation_footer.html.erb → _navigation_footer_fallback.html.erb} +5 -5
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +1 -1
- data/app/views/spree/admin/store_credit_reasons/index.html.erb +5 -3
- data/app/views/spree/admin/store_credits/index.html.erb +1 -1
- data/app/views/spree/admin/store_credits/show.html.erb +4 -3
- data/app/views/spree/admin/tax_rates/index.html.erb +31 -1
- data/app/views/spree/admin/users/_form.html.erb +1 -0
- data/app/views/spree/admin/users/edit.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +3 -3
- data/app/views/spree/admin/variants/_form.html.erb +7 -4
- data/app/views/spree/admin/variants/_table.html.erb +8 -7
- data/app/views/spree/admin/variants/_table_filter.html.erb +8 -9
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/variants/new.html.erb +1 -0
- data/config/routes.rb +3 -3
- data/lib/spree/backend.rb +0 -1
- data/lib/spree/backend_configuration.rb +10 -0
- data/solidus_backend.gemspec +2 -1
- data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-CA.js +10 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/mixins/_lists.scss +35 -0
- metadata +13 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f40b6a70c46a2ad49195d9bfd9642172fea9ec7375b9253adab0f9eaf2bb3c0
|
4
|
+
data.tar.gz: 90b8118323724ba9953ca65dbf44139349a6dafdb59c4e9d7823a8fdff47ef92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2145cf1b419208c84b5a671b67eecde34b56c3cc9efdcd40d43271489855368dcf35268c64fe2d1c08e7977aa81b4eb6472c37eb184d86197b760a3b08a9be6a
|
7
|
+
data.tar.gz: c5e1b38dc22dc6a654dd8e05f3445e8c725ea7d6df2b27544f16dc95a25307e646f8d282e7139c925b83f07d72fc1b2d65c0f8050789e80230f3e91fe4db4ef6
|
data/README.md
CHANGED
@@ -8,12 +8,7 @@ Backend contains the controllers, views, and assets making up the admin interfac
|
|
8
8
|
|
9
9
|
Can be found in [app/assets/javascripts/spree/backend/](./app/assets/javascripts/spree/backend/)
|
10
10
|
|
11
|
-
|
12
|
-
easily use a transpiler for ECMAScript >= 6 without adding additional steps for
|
13
|
-
applications using solidus\_admin.
|
14
|
-
|
15
|
-
Though we have existing CoffeeScript files, any new files should be in
|
16
|
-
JavaScript (ES5).
|
11
|
+
Any new files should be in JavaScript (ES5).
|
17
12
|
|
18
13
|
### Stylesheets
|
19
14
|
|
@@ -1,6 +1,14 @@
|
|
1
1
|
//= require solidus_admin/Sortable
|
2
2
|
/* eslint no-unused-vars: "off" */
|
3
3
|
|
4
|
+
/* Check if string is valid UUID */
|
5
|
+
function isAValidUUID(str) {
|
6
|
+
// https://stackoverflow.com/a/13653180/8170555
|
7
|
+
const regexExp = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
8
|
+
|
9
|
+
return regexExp.test(str);
|
10
|
+
}
|
11
|
+
|
4
12
|
Spree.SortableTable = {
|
5
13
|
refresh: function() {
|
6
14
|
var sortable_tables = document.querySelectorAll('table.sortable');
|
@@ -16,7 +24,7 @@ Spree.SortableTable = {
|
|
16
24
|
var idAttr = el.id;
|
17
25
|
if (idAttr) {
|
18
26
|
var objId = idAttr.split('_').slice(-1);
|
19
|
-
if (!isNaN(objId)) {
|
27
|
+
if (!isNaN(objId) || isAValidUUID(objId)) {
|
20
28
|
positions['positions['+objId+']'] = index + 1;
|
21
29
|
}
|
22
30
|
}
|
@@ -180,7 +180,7 @@ var ShipmentItemView = Backbone.View.extend({
|
|
180
180
|
Spree.ajax({
|
181
181
|
type: "GET",
|
182
182
|
url: Spree.pathFor('api/variants/' + this.variant_id),
|
183
|
-
}).
|
183
|
+
}).done(function(variant){
|
184
184
|
var split = new ShipmentSplitItemView({
|
185
185
|
shipmentItemView: _this,
|
186
186
|
shipment_number: _this.shipment_number,
|
@@ -21,6 +21,7 @@
|
|
21
21
|
//= require 'spree/backend/views/payment/new'
|
22
22
|
//= require 'spree/backend/views/payment/payment_row'
|
23
23
|
//= require 'spree/backend/views/payment/edit_credit_card'
|
24
|
+
//= require 'spree/backend/views/product/search'
|
24
25
|
//= require 'spree/backend/views/promotions/option_values_rule'
|
25
26
|
//= require 'spree/backend/views/tables/editable_table'
|
26
27
|
//= require 'spree/backend/views/tables/editable_table_row'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Spree.Views.Product.Search = Backbone.View.extend({
|
2
|
+
initialize: function() {
|
3
|
+
this.render();
|
4
|
+
},
|
5
|
+
|
6
|
+
events: {
|
7
|
+
"change .js-with-discarded-input": "onChange"
|
8
|
+
},
|
9
|
+
|
10
|
+
onChange: function(e) {
|
11
|
+
const withDiscarded = $(e.target).is(":checked");
|
12
|
+
|
13
|
+
var keptInput = this.$el.find(".js-kept-variant-sku-input input");
|
14
|
+
var allInput = this.$el.find(".js-all-variant-sku-input input");
|
15
|
+
|
16
|
+
if (withDiscarded) {
|
17
|
+
allInput.val(keptInput.val());
|
18
|
+
keptInput.val("");
|
19
|
+
} else {
|
20
|
+
keptInput.val(allInput.val());
|
21
|
+
allInput.val("");
|
22
|
+
}
|
23
|
+
|
24
|
+
allInput.prop("disabled", !withDiscarded)
|
25
|
+
keptInput.prop("disabled", withDiscarded)
|
26
|
+
|
27
|
+
this.render();
|
28
|
+
},
|
29
|
+
|
30
|
+
render: function() {
|
31
|
+
var withDiscarded = this.$el.find(".js-with-discarded-input").is(":checked");
|
32
|
+
|
33
|
+
var keptContainer = this.$el.find(".js-kept-variant-sku-input");
|
34
|
+
var allContainer = this.$el.find(".js-all-variant-sku-input");
|
35
|
+
|
36
|
+
if (withDiscarded) {
|
37
|
+
keptContainer.hide();
|
38
|
+
allContainer.show();
|
39
|
+
} else {
|
40
|
+
keptContainer.show();
|
41
|
+
allContainer.hide();
|
42
|
+
}
|
43
|
+
},
|
44
|
+
});
|
@@ -47,6 +47,7 @@
|
|
47
47
|
//= require spree/backend/orders
|
48
48
|
//= require spree/backend/payments/edit
|
49
49
|
//= require spree/backend/payments/new
|
50
|
+
//= require spree/backend/products/index
|
50
51
|
//= require spree/backend/product_picker
|
51
52
|
//= require spree/backend/progress
|
52
53
|
//= require spree/backend/promotions
|
@@ -147,16 +147,17 @@ span.info {
|
|
147
147
|
}
|
148
148
|
}
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
}
|
150
|
+
.field_with_errors {
|
151
|
+
label {
|
152
|
+
color: theme-color("danger");
|
153
|
+
}
|
155
154
|
|
156
|
-
|
157
|
-
|
158
|
-
}
|
155
|
+
input {
|
156
|
+
border-color: theme-color("danger");
|
159
157
|
}
|
158
|
+
}
|
159
|
+
|
160
|
+
&.withError {
|
160
161
|
.formError {
|
161
162
|
color: lighten(theme-color("danger"), 15);
|
162
163
|
font-style: italic;
|
@@ -57,38 +57,6 @@ ul.text_list {
|
|
57
57
|
padding-left: 0;
|
58
58
|
}
|
59
59
|
|
60
|
-
dl {
|
61
|
-
width: 100%;
|
62
|
-
overflow: hidden;
|
63
|
-
margin: 5px 0;
|
64
|
-
color: lighten($body-color, 15);
|
65
|
-
|
66
|
-
dt, dd {
|
67
|
-
float: left;
|
68
|
-
line-height: 16px;
|
69
|
-
padding: 5px;
|
70
|
-
}
|
71
|
-
|
72
|
-
dt {
|
73
|
-
width: 40%;
|
74
|
-
font-weight: $font-weight-bold;
|
75
|
-
padding-left: 0;
|
76
|
-
clear: left;
|
77
|
-
}
|
78
|
-
|
79
|
-
dd {
|
80
|
-
width: 60%;
|
81
|
-
padding-right: 0;
|
82
|
-
margin-left: 0;
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
.dl-collapse {
|
87
|
-
dt, dd {
|
88
|
-
width: auto;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
60
|
// Helpers
|
93
61
|
.align-center { text-align: center }
|
94
62
|
.align-right { text-align: right }
|
@@ -12,9 +12,7 @@ module Spree
|
|
12
12
|
|
13
13
|
# Overrides ControllerHelpers::Common
|
14
14
|
# We want the admin's locale selection to be different than that on the frontend
|
15
|
-
|
16
|
-
:admin_locale
|
17
|
-
end
|
15
|
+
include SetsUserLanguageLocaleKey
|
18
16
|
|
19
17
|
def action
|
20
18
|
params[:action].to_sym
|
@@ -33,7 +31,7 @@ module Spree
|
|
33
31
|
# Need to generate an API key for a user due to some backend actions
|
34
32
|
# requiring authentication to the Spree API
|
35
33
|
def generate_admin_api_key
|
36
|
-
if (user =
|
34
|
+
if (user = spree_current_user) && user.spree_api_key.blank?
|
37
35
|
user.generate_spree_api_key!
|
38
36
|
end
|
39
37
|
end
|
@@ -112,7 +112,7 @@ module Spree
|
|
112
112
|
end
|
113
113
|
|
114
114
|
def cancel
|
115
|
-
@order.canceled_by(
|
115
|
+
@order.canceled_by(spree_current_user)
|
116
116
|
flash[:success] = t('spree.order_canceled')
|
117
117
|
redirect_to(spree.edit_admin_order_path(@order))
|
118
118
|
end
|
@@ -124,7 +124,7 @@ module Spree
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def approve
|
127
|
-
@order.contents.approve(user:
|
127
|
+
@order.contents.approve(user: spree_current_user)
|
128
128
|
flash[:success] = t('spree.order_approved')
|
129
129
|
redirect_to(spree.edit_admin_order_path(@order))
|
130
130
|
end
|
@@ -156,7 +156,7 @@ module Spree
|
|
156
156
|
|
157
157
|
def order_params
|
158
158
|
{
|
159
|
-
created_by_id:
|
159
|
+
created_by_id: spree_current_user.try(:id),
|
160
160
|
frontend_viewable: false,
|
161
161
|
store_id: current_store.try(:id)
|
162
162
|
}.with_indifferent_access
|
@@ -18,7 +18,7 @@ module Spree
|
|
18
18
|
.currently_valid
|
19
19
|
.for_variant
|
20
20
|
.order(:variant_id, :country_iso, :currency)
|
21
|
-
.page(params[:
|
21
|
+
.page(params[:variants_page]).per(Spree::Config.admin_variants_per_page)
|
22
22
|
end
|
23
23
|
|
24
24
|
def edit
|
@@ -14,7 +14,7 @@ module Spree
|
|
14
14
|
rescue_from Spree::Core::GatewayError, with: :spree_core_gateway_error
|
15
15
|
|
16
16
|
def perform
|
17
|
-
@reimbursement.perform!(created_by:
|
17
|
+
@reimbursement.perform!(created_by: spree_current_user)
|
18
18
|
redirect_to location_after_save
|
19
19
|
end
|
20
20
|
|
@@ -62,7 +62,7 @@ module Spree
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def load_simulated_refunds
|
65
|
-
@reimbursement_objects = @reimbursement.simulate(created_by:
|
65
|
+
@reimbursement_objects = @reimbursement.simulate(created_by: spree_current_user)
|
66
66
|
end
|
67
67
|
|
68
68
|
def spree_core_gateway_error(error)
|
@@ -18,7 +18,7 @@ module Spree
|
|
18
18
|
variant = Spree::Variant.accessible_by(current_ability, :show).find(params[:variant_id])
|
19
19
|
stock_location = Spree::StockLocation.accessible_by(current_ability, :show).find(params[:stock_location_id])
|
20
20
|
stock_location.stock_movements.build(stock_movement_params).tap do |stock_movement|
|
21
|
-
stock_movement.originator =
|
21
|
+
stock_movement.originator = spree_current_user
|
22
22
|
stock_movement.stock_item = stock_location.set_up_stock_item(variant)
|
23
23
|
end
|
24
24
|
end
|
@@ -17,8 +17,8 @@ module Spree
|
|
17
17
|
def create
|
18
18
|
@store_credit = @user.store_credits.build(
|
19
19
|
permitted_resource_params.merge({
|
20
|
-
created_by:
|
21
|
-
action_originator:
|
20
|
+
created_by: spree_current_user,
|
21
|
+
action_originator: spree_current_user
|
22
22
|
})
|
23
23
|
)
|
24
24
|
|
@@ -34,7 +34,7 @@ module Spree
|
|
34
34
|
|
35
35
|
def update
|
36
36
|
@store_credit.assign_attributes(permitted_resource_params)
|
37
|
-
@store_credit.created_by =
|
37
|
+
@store_credit.created_by = spree_current_user
|
38
38
|
|
39
39
|
if @store_credit.save
|
40
40
|
respond_to do |format|
|
@@ -50,7 +50,7 @@ module Spree
|
|
50
50
|
def update_amount
|
51
51
|
@store_credit = @user.store_credits.find(params[:id])
|
52
52
|
amount = params.require(:store_credit).require(:amount)
|
53
|
-
if @store_credit.update_amount(amount, @store_credit_reason,
|
53
|
+
if @store_credit.update_amount(amount, @store_credit_reason, spree_current_user)
|
54
54
|
flash[:success] = flash_message_for(@store_credit, :successfully_updated)
|
55
55
|
redirect_to admin_user_store_credit_path(@user, @store_credit)
|
56
56
|
else
|
@@ -60,7 +60,7 @@ module Spree
|
|
60
60
|
|
61
61
|
def invalidate
|
62
62
|
@store_credit = @user.store_credits.find(params[:id])
|
63
|
-
if @store_credit.invalidate(@store_credit_reason,
|
63
|
+
if @store_credit.invalidate(@store_credit_reason, spree_current_user)
|
64
64
|
redirect_to admin_user_store_credit_path(@user, @store_credit)
|
65
65
|
else
|
66
66
|
render_edit_page
|
@@ -71,7 +71,7 @@ module Spree
|
|
71
71
|
|
72
72
|
def permitted_resource_params
|
73
73
|
params.require(:store_credit).permit([:amount, :currency, :category_id, :memo]).
|
74
|
-
merge(created_by:
|
74
|
+
merge(created_by: spree_current_user)
|
75
75
|
end
|
76
76
|
|
77
77
|
def collection
|
@@ -12,6 +12,17 @@ module Spree
|
|
12
12
|
@available_categories = Spree::TaxCategory.order(:name)
|
13
13
|
@calculators = Rails.application.config.spree.calculators.tax_rates
|
14
14
|
end
|
15
|
+
|
16
|
+
def collection
|
17
|
+
@search = Spree::TaxRate.ransack(params[:q])
|
18
|
+
@collection = @search.result
|
19
|
+
@collection = @collection
|
20
|
+
.includes(:tax_categories)
|
21
|
+
.order(:zone_id)
|
22
|
+
@collection = @collection
|
23
|
+
.page(params[:page])
|
24
|
+
.per(Spree::Config[:admin_products_per_page])
|
25
|
+
end
|
15
26
|
end
|
16
27
|
end
|
17
28
|
end
|
@@ -92,7 +92,7 @@ module Spree
|
|
92
92
|
|
93
93
|
@search = super.ransack(params[:q])
|
94
94
|
@collection = @search.result.includes(:spree_roles)
|
95
|
-
@collection = @collection.includes(:
|
95
|
+
@collection = @collection.includes(:orders)
|
96
96
|
@collection = @collection.page(params[:page]).per(Spree::Config[:admin_products_per_page])
|
97
97
|
end
|
98
98
|
|
@@ -121,11 +121,11 @@ module Spree
|
|
121
121
|
# handling raise from Spree::Admin::ResourceController#destroy
|
122
122
|
def user_destroy_with_orders_error
|
123
123
|
invoke_callbacks(:destroy, :fails)
|
124
|
-
render status: :forbidden,
|
124
|
+
render status: :forbidden, plain: t("spree.error_user_destroy_with_orders")
|
125
125
|
end
|
126
126
|
|
127
127
|
def sign_in_if_change_own_password
|
128
|
-
if
|
128
|
+
if spree_current_user == @user && @user.password.present?
|
129
129
|
sign_in(@user, event: :authentication, bypass: true)
|
130
130
|
end
|
131
131
|
end
|
@@ -4,9 +4,7 @@ module Spree
|
|
4
4
|
module Admin
|
5
5
|
module StockLocationsHelper
|
6
6
|
def admin_stock_location_display_name(stock_location)
|
7
|
-
|
8
|
-
name_parts.delete_if(&:blank?)
|
9
|
-
name_parts.join(' / ')
|
7
|
+
[stock_location.admin_name, stock_location.name].reject(&:blank?).join(' / ')
|
10
8
|
end
|
11
9
|
end
|
12
10
|
end
|
@@ -6,9 +6,11 @@
|
|
6
6
|
|
7
7
|
<% content_for :page_actions do %>
|
8
8
|
<ul class="actions inline-menu">
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
<% if can?(:create, Spree::AdjustmentReason) %>
|
10
|
+
<li>
|
11
|
+
<%= link_to t('spree.new_adjustment_reason'), new_object_url, id: 'admin_new_named_type', class: 'btn btn-primary' %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
12
14
|
</ul>
|
13
15
|
<% end %>
|
14
16
|
|
@@ -38,7 +40,9 @@
|
|
38
40
|
</span>
|
39
41
|
</td>
|
40
42
|
<td class="actions">
|
41
|
-
|
43
|
+
<% if can? :edit, adjustment_reason %>
|
44
|
+
<%= link_to_edit adjustment_reason, no_text: true %>
|
45
|
+
<% end %>
|
42
46
|
</td>
|
43
47
|
</tr>
|
44
48
|
<% end %>
|
@@ -13,12 +13,12 @@
|
|
13
13
|
<tr data-hook="adjustment_buttons">
|
14
14
|
<td class="align-right" colspan="2" style="width: 50%">
|
15
15
|
<% if can? :update, Spree::Adjustment %>
|
16
|
-
<%= button_to t('spree.unfinalize_all_adjustments'), adjustments_unfinalize_admin_order_path(@order), method: :
|
16
|
+
<%= button_to t('spree.unfinalize_all_adjustments'), adjustments_unfinalize_admin_order_path(@order), method: :put %>
|
17
17
|
<% end %>
|
18
18
|
</td>
|
19
19
|
<td colspan="2" style="width: 50%">
|
20
20
|
<% if can? :update, Spree::Adjustment %>
|
21
|
-
<%= button_to t('spree.finalize_all_adjustments'), adjustments_finalize_admin_order_path(@order), method: :
|
21
|
+
<%= button_to t('spree.finalize_all_adjustments'), adjustments_finalize_admin_order_path(@order), method: :put %>
|
22
22
|
<% end %>
|
23
23
|
</td>
|
24
24
|
<td class='actions'> </td>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
<%= render partial: 'adjustments_table' %>
|
14
14
|
|
15
|
-
<% if @order.can_add_coupon? %>
|
15
|
+
<% if @order.can_add_coupon? && can?(:update, @order) %>
|
16
16
|
<div data-hook="adjustments_new_coupon_code">
|
17
17
|
<%= text_field_tag "coupon_code", "", placeholder: t('spree.coupon_code') %>
|
18
18
|
<%= button_tag t('spree.add_coupon_code'), id: "add_coupon_code", class: 'btn btn-primary' %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<li>
|
8
8
|
<%= link_to t('spree.new_order'), new_admin_order_url, id: 'admin_new_order', class: 'btn btn-primary' %>
|
9
9
|
</li>
|
10
|
-
<% end if can? :
|
10
|
+
<% end if can? :create, Spree::Order %>
|
11
11
|
|
12
12
|
<% content_for :table_filter_title do %>
|
13
13
|
<%= t('spree.filter') %>
|
@@ -70,8 +70,8 @@
|
|
70
70
|
|
71
71
|
<div class="col-12 col-xl-6">
|
72
72
|
<div class="field">
|
73
|
-
<%= label_tag :
|
74
|
-
<%= f.text_field :
|
73
|
+
<%= label_tag :q_bill_address_name_cont, t('spree.name_contains') %>
|
74
|
+
<%= f.text_field :bill_address_name_cont, size: 25 %>
|
75
75
|
</div>
|
76
76
|
</div>
|
77
77
|
|
@@ -191,11 +191,9 @@
|
|
191
191
|
</table>
|
192
192
|
<% else %>
|
193
193
|
<div class="no-objects-found">
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
new_resource_url: spree.new_admin_order_path %>
|
198
|
-
<% end %>
|
194
|
+
<%= render 'spree/admin/shared/no_objects_found',
|
195
|
+
resource: Spree::Order,
|
196
|
+
new_resource_url: spree.new_admin_order_path %>
|
199
197
|
</div>
|
200
198
|
<% end %>
|
201
199
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<% allowed_actions = payment.actions.select { |a| can?(a.to_sym, payment) } %>
|
59
59
|
<% allowed_actions.each do |action| %>
|
60
60
|
<% if action == 'credit' %>
|
61
|
-
<%= link_to_with_icon 'reply', t('spree.refund'), new_admin_order_payment_refund_path(@order, payment), no_text: true %>
|
61
|
+
<%= link_to_with_icon 'mail-reply', t('spree.actions.refund'), new_admin_order_payment_refund_path(@order, payment), no_text: true %>
|
62
62
|
<% elsif action == 'capture' && !@order.completed? %>
|
63
63
|
<%# no capture prior to completion. payments get captured when the order completes. %>
|
64
64
|
<% else %>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<%= paginate master_prices, theme: "solidus_admin" %>
|
2
|
-
|
3
1
|
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
|
4
2
|
<% if variants %>
|
5
|
-
<legend align="center"><%=
|
3
|
+
<legend align="center"><%= t(".master_variant") %> <%= admin_hint t(".master_variant"), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
|
6
4
|
<% end %>
|
5
|
+
|
6
|
+
<%= paginate master_prices, theme: "solidus_admin" %>
|
7
7
|
<table class="index master_prices">
|
8
8
|
<colgroup>
|
9
9
|
<col style="width: 30%">
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<td><%= price.currency %></td>
|
26
26
|
<td><%= price.money.to_html %></td>
|
27
27
|
<td class="actions">
|
28
|
-
<% if can?(:
|
28
|
+
<% if can?(:edit, price) %>
|
29
29
|
<%= link_to_edit(price, no_text: true) unless price.discarded? %>
|
30
30
|
<% end %>
|
31
31
|
<% if can?(:destroy, price) %>
|
@@ -36,6 +36,5 @@
|
|
36
36
|
</tr>
|
37
37
|
<% end %>
|
38
38
|
</table>
|
39
|
+
<%= paginate master_prices, theme: "solidus_admin" %>
|
39
40
|
</fieldset>
|
40
|
-
|
41
|
-
<%= paginate master_prices, theme: "solidus_admin" %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
<fieldset class="no-border-bottom" data-hook="variant_prices_table">
|
2
|
+
<legend align="center"><%= t(".variant_pricing") %></legend>
|
2
3
|
|
3
|
-
|
4
|
-
<legend align="center"><%= I18n.t(:variant_pricing, scope: :spree) %></legend>
|
4
|
+
<%= paginate variant_prices, theme: "solidus_admin", param_name: :variants_page %>
|
5
5
|
<table class="index prices">
|
6
6
|
<thead data-hook="prices_header">
|
7
7
|
<tr>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<td><%= price.currency %></td>
|
21
21
|
<td><%= price.money.to_html %></td>
|
22
22
|
<td class="actions">
|
23
|
-
<% if can?(:
|
23
|
+
<% if can?(:edit, price) %>
|
24
24
|
<%= link_to_edit(price, no_text: true) unless price.discarded? %>
|
25
25
|
<% end %>
|
26
26
|
<% if can?(:destroy, price) %>
|
@@ -32,6 +32,5 @@
|
|
32
32
|
<% end %>
|
33
33
|
</tbody>
|
34
34
|
</table>
|
35
|
+
<%= paginate variant_prices, theme: "solidus_admin", param_name: :variants_page %>
|
35
36
|
</fieldset>
|
36
|
-
|
37
|
-
<%= paginate variant_prices, theme: "solidus_admin" %>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<%= link_to t('spree.new_product'), new_object_url, id: 'admin_new_product', class: 'btn btn-primary' %>
|
5
5
|
</li>
|
6
6
|
<% end %>
|
7
|
-
<% if
|
7
|
+
<% if frontend_product_path(@product) %>
|
8
8
|
<li id="view_product_link">
|
9
|
-
<%= link_to t('spree.view_product'),
|
9
|
+
<%= link_to t('spree.view_product'), frontend_product_path(@product), id: 'admin_view_product', class: 'btn btn-default ml-2' %>
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|