spree_backend 2.2.2 → 2.2.3
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/stock_transfer.js.coffee +43 -25
- data/app/assets/stylesheets/spree/backend/plugins/_jstree.scss +14 -10
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +4 -1
- data/app/assets/stylesheets/spree/backend/shared/_icons.scss +22 -9
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +1 -0
- data/app/controllers/spree/admin/adjustments_controller.rb +15 -17
- data/app/controllers/spree/admin/payments_controller.rb +3 -1
- data/app/controllers/spree/admin/properties_controller.rb +17 -4
- data/app/views/spree/admin/orders/_adjustments.html.erb +2 -2
- data/app/views/spree/admin/payments/_form.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +3 -3
- data/app/views/spree/admin/products/_form.html.erb +82 -58
- data/app/views/spree/admin/products/new.html.erb +5 -5
- data/app/views/spree/admin/properties/index.html.erb +30 -0
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_summary.html.erb +8 -8
- data/app/views/spree/admin/shared/_product_tabs.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 141a054dae5dabb9b0419390a14925ab30b09091
|
4
|
+
data.tar.gz: 79f1e35967bc67ca1601f3651d5124d2c78a23dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87a7898e914acab3eaa8258652c218814a91956937cda7c46ae970efb1338a36958fddbbace23ecc070905113bceb7758f94c8ba4f9be35af6b0e4432bc3f4c7
|
7
|
+
data.tar.gz: 0d9fc6a1aa1427f8c972c337de690268010e745223e10946ca68806b01fc3e9a6d15db13cf92569c6df7e9b049d2009d1dbbaaff1747e2bdb3370c4e8d361b9d
|
@@ -82,33 +82,48 @@ $ ->
|
|
82
82
|
|
83
83
|
refresh_variants: ->
|
84
84
|
if @receiving_stock()
|
85
|
-
@
|
85
|
+
@_search_transfer_variants()
|
86
86
|
else
|
87
|
-
@
|
87
|
+
@_search_transfer_stock_items()
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
@populate_select @cached_variants
|
92
|
-
else
|
93
|
-
$.getJSON Spree.url(Spree.routes.variants_api), (data) =>
|
94
|
-
@cached_variants = _.map(data.variants, (variant) -> new TransferVariant(variant))
|
95
|
-
@populate_select @cached_variants
|
89
|
+
_search_transfer_variants: ->
|
90
|
+
@build_select(Spree.url(Spree.routes.variants_api), 'product_name_or_sku_cont')
|
96
91
|
|
97
|
-
|
92
|
+
_search_transfer_stock_items: ->
|
98
93
|
stock_location_id = $('#transfer_source_location_id').val()
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
94
|
+
@build_select(Spree.url(Spree.routes.stock_locations_api + "/#{stock_location_id}/stock_items"),
|
95
|
+
'variant_product_name_or_variant_sku_cont')
|
96
|
+
|
97
|
+
format_variant_result: (result) ->
|
98
|
+
"#{result.name} - #{result.sku}"
|
99
|
+
|
100
|
+
build_select: (url, query) ->
|
101
|
+
$('#transfer_variant').select2
|
102
|
+
minimumInputLength: 3
|
103
|
+
ajax:
|
104
|
+
url: url
|
105
|
+
datatype: "json"
|
106
|
+
data: (term, page) ->
|
107
|
+
query_object = {}
|
108
|
+
query_object[query] = term
|
109
|
+
q: query_object
|
110
|
+
|
111
|
+
results: (data, page) ->
|
112
|
+
result = data["variants"] || data["stock_items"]
|
113
|
+
# Format stock items as variants
|
114
|
+
if data["stock_items"]?
|
115
|
+
result = _(result).map (variant) ->
|
116
|
+
variant.variant
|
117
|
+
window.variants = result
|
118
|
+
results: result
|
119
|
+
|
120
|
+
formatResult: @format_variant_result
|
121
|
+
formatSelection: (variant) ->
|
122
|
+
if !!variant.options_text
|
123
|
+
variant.name + " (#{variant.options_text})" + " - #{variant.sku}"
|
124
|
+
else
|
125
|
+
variant.name + " - #{variant.sku}"
|
110
126
|
|
111
|
-
$('#transfer_variant').select2()
|
112
127
|
|
113
128
|
# Add/Remove variant line items
|
114
129
|
class TransferAddVariants
|
@@ -120,7 +135,10 @@ $ ->
|
|
120
135
|
|
121
136
|
$('button.transfer_add_variant').click (event) =>
|
122
137
|
event.preventDefault()
|
123
|
-
|
138
|
+
if $('#transfer_variant').select2('data')?
|
139
|
+
@add_variant()
|
140
|
+
else
|
141
|
+
alert('Please select a variant first')
|
124
142
|
|
125
143
|
$('#transfer-variants-table').on 'click', '.transfer_remove_variant', (event) =>
|
126
144
|
event.preventDefault()
|
@@ -132,7 +150,7 @@ $ ->
|
|
132
150
|
false
|
133
151
|
|
134
152
|
add_variant: ->
|
135
|
-
variant = $('#transfer_variant
|
153
|
+
variant = $('#transfer_variant').select2('data')
|
136
154
|
quantity = parseInt $('#transfer_variant_quantity').val()
|
137
155
|
|
138
156
|
variant = @find_or_add(variant)
|
@@ -143,7 +161,7 @@ $ ->
|
|
143
161
|
if existing = _.find(@variants, (v) -> v.id == variant.id)
|
144
162
|
return existing
|
145
163
|
else
|
146
|
-
variant = $.extend({}, variant)
|
164
|
+
variant = new TransferVariant($.extend({}, variant))
|
147
165
|
@variants.push variant
|
148
166
|
return variant
|
149
167
|
|
@@ -2,15 +2,16 @@
|
|
2
2
|
> ul, .jstree-icon {
|
3
3
|
background-image: none;
|
4
4
|
}
|
5
|
-
|
5
|
+
|
6
6
|
.jstree-icon {
|
7
7
|
@extend [class^="icon-"]:before;
|
8
|
+
@extend .fa;
|
8
9
|
}
|
9
10
|
|
10
|
-
.jstree-open > .jstree-icon {
|
11
|
+
.jstree-open > .jstree-icon {
|
11
12
|
@extend .fa-caret-down;
|
12
13
|
}
|
13
|
-
.jstree-closed > .jstree-icon {
|
14
|
+
.jstree-closed > .jstree-icon {
|
14
15
|
@extend .fa-caret-right;
|
15
16
|
}
|
16
17
|
|
@@ -31,24 +32,27 @@
|
|
31
32
|
|
32
33
|
.jstree-icon {
|
33
34
|
padding-left: 0px;
|
34
|
-
@extend .fa
|
35
|
+
@extend .fa;
|
36
|
+
@extend .fa-arrows;
|
35
37
|
}
|
36
38
|
}
|
37
39
|
}
|
38
40
|
}
|
39
41
|
|
40
|
-
#vakata-dragged.jstree-apple .jstree-invalid,
|
42
|
+
#vakata-dragged.jstree-apple .jstree-invalid,
|
41
43
|
#vakata-dragged.jstree-apple .jstree-ok,
|
42
44
|
#jstree-marker {
|
43
45
|
background-image: none !important;
|
44
46
|
background-color: transparent !important;
|
45
|
-
@extend [class^="icon-"]:before;
|
47
|
+
@extend [class^="icon-"]:before;
|
46
48
|
}
|
47
49
|
#vakata-dragged.jstree-apple .jstree-invalid {
|
48
|
-
@extend .fa
|
50
|
+
@extend .fa;
|
51
|
+
@extend .fa-bars;
|
49
52
|
color: $color-5;
|
50
53
|
}
|
51
54
|
#vakata-dragged.jstree-apple .jstree-ok {
|
55
|
+
@extend .fa;
|
52
56
|
@extend .fa-check;
|
53
57
|
color: $color-2;
|
54
58
|
}
|
@@ -71,7 +75,7 @@
|
|
71
75
|
-webkit-box-shadow: none !important;
|
72
76
|
-moz-box-shadow: none !important;
|
73
77
|
box-shadow: none !important;
|
74
|
-
|
78
|
+
|
75
79
|
}
|
76
80
|
|
77
81
|
#vakata-contextmenu {
|
@@ -109,7 +113,7 @@
|
|
109
113
|
-webkit-box-shadow: none !important;
|
110
114
|
line-height: inherit !important;
|
111
115
|
padding: 5px 10px !important;
|
112
|
-
margin: 0 !important;
|
116
|
+
margin: 0 !important;
|
113
117
|
}
|
114
118
|
}
|
115
119
|
|
@@ -128,4 +132,4 @@
|
|
128
132
|
li.vakata-separator {
|
129
133
|
display: none;
|
130
134
|
}
|
131
|
-
}
|
135
|
+
}
|
@@ -14,22 +14,35 @@
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
|
-
.fa-email:before
|
18
|
-
.fa-resume:before
|
19
|
-
.fa-approve:before
|
17
|
+
.fa-email:before { @extend .fa-envelope:before }
|
18
|
+
.fa-resume:before { @extend .fa-refresh:before }
|
19
|
+
.fa-approve:before { @extend .fa-check:before }
|
20
20
|
|
21
|
+
.fa-remove:before,
|
21
22
|
.fa-cancel:before,
|
22
|
-
.fa-void:before
|
23
|
+
.fa-void:before { @extend .fa-times:before }
|
23
24
|
|
24
|
-
.fa-trash:before
|
25
|
-
|
26
|
-
.fa-capture:before { @extend .fa-check:before }
|
27
|
-
.fa-credit:before { @extend .fa-check:before }
|
28
|
-
.fa-approve:before { @extend .fa-check:before }
|
25
|
+
.fa-trash:before { @extend .fa-trash-o:before }
|
29
26
|
|
27
|
+
.fa-capture:before { @extend .fa-check:before }
|
28
|
+
.fa-credit:before { @extend .fa-check:before }
|
29
|
+
.fa-approve:before { @extend .fa-check:before }
|
30
|
+
.fa-icon-cogs:before { @extend .fa-cogs:before }
|
31
|
+
.fa-ok:before,
|
32
|
+
.fa-icon-ok:before { @extend .fa-check:before }
|
30
33
|
|
31
34
|
button, a {
|
32
35
|
&.fa:before {
|
33
36
|
padding-right: 5px;
|
34
37
|
}
|
35
38
|
}
|
39
|
+
|
40
|
+
// Admin navigation fixes
|
41
|
+
.icon-user,
|
42
|
+
.icon-signout,
|
43
|
+
.icon-external-link {
|
44
|
+
@extend .fa;
|
45
|
+
}
|
46
|
+
.icon-user { @extend .fa-user; }
|
47
|
+
.icon-signout { @extend .fa-sign-out; }
|
48
|
+
.icon-external-link { @extend .fa-external-link; }
|
@@ -1,16 +1,18 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class AdjustmentsController < ResourceController
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
|
5
|
+
belongs_to 'spree/order', find_by: :number
|
6
|
+
|
7
7
|
create.after :update_totals
|
8
|
+
destroy.after :update_totals
|
8
9
|
update.after :update_totals
|
9
10
|
|
10
|
-
skip_before_filter :load_resource, :
|
11
|
+
skip_before_filter :load_resource, only: [:toggle_state, :edit, :update, :destroy]
|
11
12
|
|
12
|
-
def
|
13
|
-
|
13
|
+
def destroy
|
14
|
+
find_adjustment
|
15
|
+
super
|
14
16
|
end
|
15
17
|
|
16
18
|
def edit
|
@@ -18,30 +20,26 @@ module Spree
|
|
18
20
|
super
|
19
21
|
end
|
20
22
|
|
21
|
-
def
|
22
|
-
|
23
|
-
super
|
23
|
+
def index
|
24
|
+
@adjustments = @order.all_adjustments.order("created_at ASC")
|
24
25
|
end
|
25
26
|
|
26
|
-
def
|
27
|
-
find_adjustment
|
27
|
+
def update
|
28
|
+
find_adjustment
|
28
29
|
super
|
29
30
|
end
|
30
31
|
|
31
32
|
private
|
33
|
+
|
32
34
|
def find_adjustment
|
33
35
|
# Need to assign to @object here to keep ResourceController happy
|
34
36
|
@adjustment = @object = parent.all_adjustments.find(params[:id])
|
35
37
|
end
|
36
38
|
|
37
|
-
def reload_order
|
38
|
-
@order.reload
|
39
|
-
end
|
40
|
-
|
41
39
|
def update_totals
|
42
|
-
@order.
|
43
|
-
@order.persist_totals
|
40
|
+
@order.reload.update!
|
44
41
|
end
|
42
|
+
|
45
43
|
end
|
46
44
|
end
|
47
45
|
end
|
@@ -31,7 +31,9 @@ module Spree
|
|
31
31
|
invoke_callbacks(:create, :after)
|
32
32
|
# Transition order as far as it will go.
|
33
33
|
while @order.next; end
|
34
|
-
@payment.
|
34
|
+
# If "@order.next" didn't trigger payment processing already (e.g. if the order was
|
35
|
+
# already complete) then trigger it manually now
|
36
|
+
@payment.process! if @order.completed? && @payment.checkout?
|
35
37
|
flash[:success] = flash_message_for(@payment, :successfully_created)
|
36
38
|
redirect_to admin_order_payments_path(@order)
|
37
39
|
else
|
@@ -1,11 +1,24 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class PropertiesController < ResourceController
|
4
|
+
def index
|
5
|
+
respond_with(@collection)
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def collection
|
11
|
+
return @collection if @collection.present?
|
12
|
+
# params[:q] can be blank upon pagination
|
13
|
+
params[:q] = {} if params[:q].blank?
|
14
|
+
|
15
|
+
@collection = super
|
16
|
+
@search = @collection.ransack(params[:q])
|
17
|
+
@collection = @search.result.
|
18
|
+
page(params[:page]).
|
19
|
+
per(Spree::Config[:properties_per_page])
|
4
20
|
|
5
|
-
|
6
|
-
def filtered
|
7
|
-
@properties = Property.where('lower(name) LIKE ?', "%#{params[:q].mb_chars.downcase}%").order(:name)
|
8
|
-
render :template => "spree/admin/properties/filtered", :layout => false
|
21
|
+
@collection
|
9
22
|
end
|
10
23
|
end
|
11
24
|
end
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<% adjustments.eligible.group_by(&:label).each do |label, adjustments| %>
|
11
11
|
<tr class="total">
|
12
12
|
<td><strong><%= label %>:</strong></td>
|
13
|
-
<td class="total align-center"><span><%= Spree::Money.new(adjustments.sum(&:amount)) %></span></td>
|
13
|
+
<td class="total align-center"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: adjustments.first.order.try(:currency)) %></span></td>
|
14
14
|
</tr>
|
15
15
|
<% end %>
|
16
16
|
</tbody>
|
17
17
|
</table>
|
18
18
|
</fieldset>
|
19
|
-
<% end %>
|
19
|
+
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="alpha three columns">
|
3
3
|
<div class="field">
|
4
4
|
<%= f.label :amount, Spree.t(:amount) %>
|
5
|
-
<%= f.text_field :amount, :value => @order.
|
5
|
+
<%= f.text_field :amount, :value => @order.display_outstanding_balance.money, :class => 'fullwidth' %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
<div class="omega nine columns">
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= render 'spree/admin/shared/product_sub_menu' %>
|
2
|
-
<%= render 'spree/admin/shared/product_tabs', :
|
3
|
-
<%= render 'spree/shared/error_messages', :
|
2
|
+
<%= render 'spree/admin/shared/product_tabs', current: 'Product Properties' %>
|
3
|
+
<%= render 'spree/shared/error_messages', target: @product %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
6
|
<ul class="tollbar inline-menu">
|
7
7
|
<li>
|
8
|
-
<%= link_to_add_fields Spree.t(:add_product_properties), 'tbody#product_properties', :
|
8
|
+
<%= link_to_add_fields Spree.t(:add_product_properties), 'tbody#product_properties', class: 'plus button' %>
|
9
9
|
</li>
|
10
10
|
<li>
|
11
11
|
<span id="new_ptype_link">
|
@@ -1,40 +1,48 @@
|
|
1
1
|
<div data-hook="admin_product_form_fields">
|
2
|
-
|
3
|
-
<div class="left eight columns alpha" data-hook="admin_product_form_left">
|
4
|
-
<%= f.field_container :name do %>
|
5
|
-
<%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', :class => 'required')) %>
|
6
|
-
<%= f.text_field :name, :class => 'fullwidth title' %>
|
7
|
-
<%= f.error_message_on :name %>
|
8
|
-
<% end %>
|
9
2
|
|
10
|
-
|
11
|
-
|
12
|
-
<%= f.
|
13
|
-
|
14
|
-
|
3
|
+
<div class="left eight columns alpha" data-hook="admin_product_form_left">
|
4
|
+
<div data-hook="admin_product_form_name">
|
5
|
+
<%= f.field_container :name do %>
|
6
|
+
<%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', :class => 'required')) %>
|
7
|
+
<%= f.text_field :name, :class => 'fullwidth title' %>
|
8
|
+
<%= f.error_message_on :name %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
15
11
|
|
16
|
-
|
17
|
-
<%= f.
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
<div data-hook="admin_product_form_slug">
|
13
|
+
<%= f.field_container :slug do %>
|
14
|
+
<%= f.label :slug, raw(Spree.t(:slug) + content_tag(:span, ' *', :class => "required")) %>
|
15
|
+
<%= f.text_field :slug, :class => 'fullwidth title' %>
|
16
|
+
<%= f.error_message_on :slug %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div data-hook="admin_product_form_description">
|
21
|
+
<%= f.field_container :description do %>
|
22
|
+
<%= f.label :description, Spree.t(:description) %>
|
23
|
+
<%= f.text_area :description, {:rows => "#{unless @product.has_variants? then '20' else '13' end}", :class => 'fullwidth'} %>
|
24
|
+
<%= f.error_message_on :description %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
21
27
|
</div>
|
22
28
|
|
23
29
|
<div class="right four columns omega" data-hook="admin_product_form_right">
|
30
|
+
<div data-hook="admin_product_form_price">
|
24
31
|
<%= f.field_container :price do %>
|
25
32
|
<%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', :class => "required")) %>
|
26
33
|
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
|
27
34
|
<%= f.error_message_on :price %>
|
28
35
|
<% end %>
|
36
|
+
</div>
|
29
37
|
|
30
|
-
<div class="alpha two columns">
|
38
|
+
<div data-hook="admin_product_form_cost_price" class="alpha two columns">
|
31
39
|
<%= f.field_container :cost_price do %>
|
32
40
|
<%= f.label :cost_price, Spree.t(:cost_price) %>
|
33
41
|
<%= f.text_field :cost_price, :value => number_to_currency(@product.cost_price, :unit => '') %>
|
34
42
|
<%= f.error_message_on :cost_price %>
|
35
43
|
<% end %>
|
36
44
|
</div>
|
37
|
-
<div class="omega two columns">
|
45
|
+
<div data-hook="admin_product_form_cost_currency" class="omega two columns">
|
38
46
|
<%= f.field_container :cost_currency do %>
|
39
47
|
<%= f.label :cost_currency, Spree.t(:cost_currency) %>
|
40
48
|
<%= f.text_field :cost_currency %>
|
@@ -44,73 +52,89 @@
|
|
44
52
|
|
45
53
|
<div class="clear"></div>
|
46
54
|
|
47
|
-
|
48
|
-
<%= f.
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
<div data-hook="admin_product_form_available_on">
|
56
|
+
<%= f.field_container :available_on do %>
|
57
|
+
<%= f.label :available_on, Spree.t(:available_on) %>
|
58
|
+
<%= f.error_message_on :available_on %>
|
59
|
+
<%= f.text_field :available_on, :value => datepicker_field_value(@product.available_on), :class => 'datepicker' %>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
52
62
|
|
53
63
|
<% unless @product.has_variants? %>
|
54
|
-
|
55
|
-
<%= f.
|
56
|
-
|
57
|
-
|
64
|
+
<div data-hook="admin_product_form_sku">
|
65
|
+
<%= f.field_container :sku do %>
|
66
|
+
<%= f.label :sku, Spree.t(:sku) %>
|
67
|
+
<%= f.text_field :sku, :size => 16 %>
|
68
|
+
<% end %>
|
69
|
+
</div>
|
58
70
|
|
59
71
|
<ul id="shipping_specs">
|
60
|
-
<li id="shipping_specs_weight_field" class="field alpha two columns">
|
72
|
+
<li id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="field alpha two columns">
|
61
73
|
<%= f.label :weight, Spree.t(:weight) %>
|
62
74
|
<%= f.text_field :weight, :size => 4 %>
|
63
75
|
</li>
|
64
|
-
<li id="shipping_specs_height_field" class="field omega two columns">
|
76
|
+
<li id="shipping_specs_height_field" data-hook="admin_product_form_height" class="field omega two columns">
|
65
77
|
<%= f.label :height, Spree.t(:height) %>
|
66
78
|
<%= f.text_field :height, :size => 4 %>
|
67
79
|
</li>
|
68
|
-
<li id="shipping_specs_width_field" class="field alpha two columns">
|
80
|
+
<li id="shipping_specs_width_field" data-hook="admin_product_form_width" class="field alpha two columns">
|
69
81
|
<%= f.label :width, Spree.t(:width) %>
|
70
82
|
<%= f.text_field :width, :size => 4 %>
|
71
83
|
</li>
|
72
|
-
<li id="shipping_specs_depth_field" class="field omega two columns">
|
84
|
+
<li id="shipping_specs_depth_field" data-hook="admin_product_form_depth" class="field omega two columns">
|
73
85
|
<%= f.label :depth, Spree.t(:depth) %>
|
74
86
|
<%= f.text_field :depth, :size => 4 %>
|
75
87
|
</li>
|
76
88
|
</ul>
|
77
89
|
<% end %>
|
78
90
|
|
79
|
-
|
80
|
-
<%= f.
|
81
|
-
|
82
|
-
|
83
|
-
|
91
|
+
<div data-hook="admin_product_form_shipping_categories">
|
92
|
+
<%= f.field_container :shipping_categories do %>
|
93
|
+
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %>
|
94
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
95
|
+
<%= f.error_message_on :shipping_category %>
|
96
|
+
<% end %>
|
97
|
+
</div>
|
84
98
|
|
85
|
-
|
86
|
-
<%= f.
|
87
|
-
|
88
|
-
|
89
|
-
|
99
|
+
<div data-hook="admin_product_form_tax_category">
|
100
|
+
<%= f.field_container :tax_category do %>
|
101
|
+
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
|
102
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
103
|
+
<%= f.error_message_on :tax_category %>
|
104
|
+
<% end %>
|
105
|
+
</div>
|
90
106
|
</div>
|
91
107
|
|
92
108
|
<div class="twelve columns alpha omega">
|
93
|
-
|
94
|
-
<%= f.
|
95
|
-
|
96
|
-
|
109
|
+
<div data-hook="admin_product_form_taxons">
|
110
|
+
<%= f.field_container :taxons do %>
|
111
|
+
<%= f.label :taxon_ids, Spree.t(:taxons) %><br />
|
112
|
+
<%= f.hidden_field :taxon_ids, :value => @product.taxon_ids.join(',') %>
|
113
|
+
<% end %>
|
114
|
+
</div>
|
97
115
|
|
98
|
-
|
99
|
-
<%= f.
|
100
|
-
|
101
|
-
|
116
|
+
<div data-hook="admin_product_form_option_types">
|
117
|
+
<%= f.field_container :option_types do %>
|
118
|
+
<%= f.label :option_type_ids, Spree.t(:option_types) %>
|
119
|
+
<%= f.hidden_field :option_type_ids, :value => @product.option_type_ids.join(',') %>
|
120
|
+
<% end %>
|
121
|
+
</div>
|
102
122
|
</div>
|
103
123
|
|
104
124
|
<div data-hook="admin_product_form_meta" class="alpha omega twelve columns">
|
105
|
-
|
106
|
-
<%= f.
|
107
|
-
|
108
|
-
|
125
|
+
<div data-hook="admin_product_form_meta_keywords">
|
126
|
+
<%= f.field_container :meta_keywords do %>
|
127
|
+
<%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
|
128
|
+
<%= f.text_field :meta_keywords, :class => 'fullwidth' %>
|
129
|
+
<% end %>
|
130
|
+
</div>
|
109
131
|
|
110
|
-
|
111
|
-
<%= f.
|
112
|
-
|
113
|
-
|
132
|
+
<div data-hook="admin_product_form_meta_description">
|
133
|
+
<%= f.field_container :meta_description do %>
|
134
|
+
<%= f.label :meta_description, Spree.t(:meta_description) %>
|
135
|
+
<%= f.text_field :meta_description, :class => 'fullwidth' %>
|
136
|
+
<% end %>
|
137
|
+
</div>
|
114
138
|
</div>
|
115
139
|
|
116
140
|
<div class="clear"></div>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
<div data-hook="new_product_attrs" class="row">
|
17
17
|
<% unless @product.has_variants? %>
|
18
|
-
<div class="alpha four columns">
|
18
|
+
<div data-hook="new_product_sku" class="alpha four columns">
|
19
19
|
<%= f.field_container :sku do %>
|
20
20
|
<%= f.label :sku, Spree.t(:sku) %><br />
|
21
21
|
<%= f.text_field :sku, :size => 16, :class => 'fullwidth' %>
|
@@ -24,14 +24,14 @@
|
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
|
27
|
-
<div class="four columns">
|
27
|
+
<div data-hook="new_product_prototype" class="four columns">
|
28
28
|
<%= f.field_container :prototype do %>
|
29
29
|
<%= f.label :prototype_id, Spree.t(:prototype) %><br />
|
30
30
|
<%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {:include_blank => true}, {:class => 'select2 fullwidth'} %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="four columns">
|
34
|
+
<div data-hook="new_product_price" class="four columns">
|
35
35
|
<%= f.field_container :price do %>
|
36
36
|
<%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span><br />
|
37
37
|
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth' %>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<% end %>
|
40
40
|
</div>
|
41
41
|
|
42
|
-
<div class="omega four columns">
|
42
|
+
<div data-hook="new_product_available_on" class="omega four columns">
|
43
43
|
<%= f.field_container :available_on do %>
|
44
44
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
45
45
|
<%= f.error_message_on :available_on %>
|
@@ -50,7 +50,7 @@
|
|
50
50
|
</div>
|
51
51
|
|
52
52
|
<div class='row'>
|
53
|
-
<div class="alpha four columns">
|
53
|
+
<div data-hook="new_product_shipping_category" class="alpha four columns">
|
54
54
|
<%= f.field_container :shipping_category do %>
|
55
55
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span><br />
|
56
56
|
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth' }) %>
|
@@ -10,6 +10,35 @@
|
|
10
10
|
|
11
11
|
<%= render 'spree/admin/shared/product_sub_menu' %>
|
12
12
|
|
13
|
+
<% content_for :table_filter_title do %>
|
14
|
+
<%= Spree.t(:search) %>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% content_for :table_filter do %>
|
18
|
+
<div data-hook="admin_property_sidebar">
|
19
|
+
|
20
|
+
<%= search_form_for [:admin, @search] do |f| %>
|
21
|
+
|
22
|
+
<%- locals = {:f => f} %>
|
23
|
+
|
24
|
+
<div data-hook="admin_property_index_search">
|
25
|
+
<div class="alpha eight columns">
|
26
|
+
<div class="field">
|
27
|
+
<%= f.label :name_cont, Spree.t(:name) %>
|
28
|
+
<%= f.text_field :name_cont, :size => 15 %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="clear"></div>
|
34
|
+
|
35
|
+
<div class="form-buttons actions filter-actions" data-hook="admin_properties_index_search_buttons">
|
36
|
+
<%= button Spree.t(:search), 'search' %>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
41
|
+
|
13
42
|
<div id="new_property"></div>
|
14
43
|
|
15
44
|
<% if @properties.any? %>
|
@@ -46,3 +75,4 @@
|
|
46
75
|
</div>
|
47
76
|
<% end %>
|
48
77
|
|
78
|
+
<%= paginate @collection %>
|
@@ -2,24 +2,24 @@
|
|
2
2
|
<dl class="additional-info">
|
3
3
|
<dt id="order_status" data-hook><%= Spree.t(:status) %>:</dt>
|
4
4
|
<dd><span class="state <%= @order.state %>"><%= Spree.t(@order.state, :scope => :order_state) %></span></dd>
|
5
|
-
<dt data-hook><%= Spree.t(:subtotal) %>:</dt>
|
5
|
+
<dt data-hook='admin_order_tab_subtotal_title'><%= Spree.t(:subtotal) %>:</dt>
|
6
6
|
<dd id='item_total'><%= @order.display_item_total.to_html %></dd>
|
7
7
|
<% if checkout_steps.include?("delivery") && @order.ship_total > 0 %>
|
8
|
-
<dt data-hook><%= Spree.t(:ship_total) %>:</dt>
|
9
|
-
<dd id='
|
8
|
+
<dt data-hook='admin_order_tab_ship_total_title'><%= Spree.t(:ship_total) %>:</dt>
|
9
|
+
<dd id='ship_total'><%= @order.display_ship_total.to_html %></dd>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<% if @order.included_tax_total != 0 %>
|
13
|
-
<dt data-hook><%= Spree.t(:tax_included) %>:</dt>
|
13
|
+
<dt data-hook='admin_order_tab_included_tax_title'><%= Spree.t(:tax_included) %>:</dt>
|
14
14
|
<dd id='included_tax_total'><%= @order.display_included_tax_total.to_html %></dd>
|
15
15
|
<% end %>
|
16
16
|
|
17
17
|
<% if @order.additional_tax_total != 0 %>
|
18
|
-
<dt data-hook><%= Spree.t(:tax) %>:</dt>
|
19
|
-
<dd id='
|
18
|
+
<dt data-hook='admin_order_tab_additional_tax_title'><%= Spree.t(:tax) %>:</dt>
|
19
|
+
<dd id='additional_tax_total'><%= @order.display_additional_tax_total.to_html %></dd>
|
20
20
|
<% end %>
|
21
21
|
|
22
|
-
<dt data-hook><%= Spree.t(:total) %>:</dt>
|
22
|
+
<dt data-hook='admin_order_tab_total_title'><%= Spree.t(:total) %>:</dt>
|
23
23
|
<dd id='order_total'><%= @order.display_total.to_html %></dd>
|
24
24
|
|
25
25
|
<% if @order.completed? %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<dd id='shipment_status'><span class="state <%= @order.shipment_state %>"><%= Spree.t(@order.shipment_state, :scope => :shipment_states, :default => [:missing, "none"]) %></span></dd>
|
28
28
|
<dt><%= Spree.t(:payment) %>: </dt>
|
29
29
|
<dd id='payment_status'><span class="state <%= @order.payment_state %>"><%= Spree.t(@order.payment_state, :scope => :payment_states, :default => [:missing, "none"]) %></span></dd>
|
30
|
-
<dt data-hook><%= Spree.t(:date_completed) %>:</dt>
|
30
|
+
<dt data-hook='admin_order_tab_date_completed_title'><%= Spree.t(:date_completed) %>:</dt>
|
31
31
|
<dd id='date_complete'><%= pretty_time(@order.completed_at) %></dd>
|
32
32
|
<% end %>
|
33
33
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= link_to_with_icon 'edit', Spree.t(:product_details), edit_admin_product_url(@product) %>
|
14
14
|
<% end if can?(:admin, Spree::Product) %>
|
15
15
|
<%= content_tag :li, :class => ('active' if current == 'Images') do %>
|
16
|
-
<%= link_to_with_icon 'picture', Spree.t(:images), admin_product_images_url(@product) %>
|
16
|
+
<%= link_to_with_icon 'picture-o', Spree.t(:images), admin_product_images_url(@product) %>
|
17
17
|
<% end if can?(:admin, Spree::Image) %>
|
18
18
|
<%= content_tag :li, :class => ('active' if current == 'Variants') do %>
|
19
19
|
<%= link_to_with_icon 'th-large', Spree.t(:variants), admin_product_variants_url(@product) %>
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<div class="alpha eight columns">
|
65
65
|
<div class="field" id="stock_movement_variant_id_field">
|
66
66
|
<%= label_tag 'variant_id', Spree.t(:variant) %>
|
67
|
-
<%=
|
67
|
+
<%= hidden_field_tag 'transfer_variant', {}, class: 'fullwidth' %>
|
68
68
|
</div>
|
69
69
|
</div>
|
70
70
|
<div class="two columns">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.2.
|
19
|
+
version: 2.2.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: 2.2.
|
26
|
+
version: 2.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.2.
|
33
|
+
version: 2.2.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: 2.2.
|
40
|
+
version: 2.2.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jquery-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -529,7 +529,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
529
529
|
requirements:
|
530
530
|
- none
|
531
531
|
rubyforge_project: spree_backend
|
532
|
-
rubygems_version: 2.2.
|
532
|
+
rubygems_version: 2.2.2
|
533
533
|
signing_key:
|
534
534
|
specification_version: 4
|
535
535
|
summary: backend e-commerce functionality for the Spree project.
|