spree_backend 2.1.4 → 2.1.5
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/javascripts/admin/option_type_autocomplete.js.erb +2 -1
- data/app/assets/javascripts/admin/product_picker.js +2 -1
- data/app/assets/javascripts/admin/stock_transfer.js.coffee +1 -3
- data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +3 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +6 -12
- data/app/controllers/spree/admin/zones_controller.rb +1 -1
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +2 -2
- data/app/views/spree/admin/payment_methods/_form.html.erb +4 -0
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +1 -0
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +17 -0
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +19 -7
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a67893cb1246afcc0b5633e064a985fc5bef80a9
|
4
|
+
data.tar.gz: 461eab8dabfc977a06b14203561983a768120bb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 650dcdb0372b5c022d2fdb616572b8da81809c44e1bd586d1ba35c3c5ff293f6aa618802b9e751c8e92e6a0323000d81389cedffe4b1f9dda9fe5fea9363ca28
|
7
|
+
data.tar.gz: 8045ce114eeb4db7729a73994d6a108377b55aa4398750faa7746145add558df4a86a870fdf1f1448997ad7aeb8fad198a6d23c9b1f28e4486790c65842934c7
|
@@ -69,9 +69,7 @@ $ ->
|
|
69
69
|
populate_select: (select, except=0) ->
|
70
70
|
select.children('option').remove()
|
71
71
|
for location in @locations when location.id isnt except
|
72
|
-
select.append $('<option></option>')
|
73
|
-
.text(location.name)
|
74
|
-
.attr('value', location.id)
|
72
|
+
select.append $('<option></option>').text(location.name).attr('value', location.id)
|
75
73
|
select.select2()
|
76
74
|
|
77
75
|
# Populates variants drop down
|
@@ -71,7 +71,7 @@ module Spree
|
|
71
71
|
if params[:payment] and params[:payment_source] and source_params = params.delete(:payment_source)[params[:payment][:payment_method_id]]
|
72
72
|
params[:payment][:source_attributes] = source_params
|
73
73
|
end
|
74
|
-
params.require(:payment).permit(
|
74
|
+
params.require(:payment).permit(permitted_payment_attributes)
|
75
75
|
end
|
76
76
|
|
77
77
|
def load_data
|
@@ -28,23 +28,17 @@ module Spree
|
|
28
28
|
def sales_total
|
29
29
|
params[:q] = {} unless params[:q]
|
30
30
|
|
31
|
-
if params[:q][:
|
32
|
-
params[:q][:
|
31
|
+
if params[:q][:completed_at_gt].blank?
|
32
|
+
params[:q][:completed_at_gt] = Time.zone.now.beginning_of_month
|
33
33
|
else
|
34
|
-
params[:q][:
|
34
|
+
params[:q][:completed_at_gt] = Time.zone.parse(params[:q][:completed_at_gt]).beginning_of_day rescue Time.zone.now.beginning_of_month
|
35
35
|
end
|
36
36
|
|
37
|
-
if params[:q] && !params[:q][:
|
38
|
-
params[:q][:
|
37
|
+
if params[:q] && !params[:q][:completed_at_lt].blank?
|
38
|
+
params[:q][:completed_at_lt] = Time.zone.parse(params[:q][:completed_at_lt]).end_of_day rescue ""
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
params[:q][:completed_at_not_null] = true
|
43
|
-
else
|
44
|
-
params[:q][:completed_at_not_null] = false
|
45
|
-
end
|
46
|
-
|
47
|
-
params[:q][:s] ||= "created_at desc"
|
41
|
+
params[:q][:s] ||= "completed_at desc"
|
48
42
|
|
49
43
|
@search = Order.complete.ransack(params[:q])
|
50
44
|
@orders = @search.result
|
@@ -13,7 +13,7 @@ module Spree
|
|
13
13
|
params[:q] ||= {}
|
14
14
|
params[:q][:s] ||= "ascend_by_name"
|
15
15
|
@search = super.ransack(params[:q])
|
16
|
-
@zones = @search.result.page(params[:page]).per(
|
16
|
+
@zones = @search.result.page(params[:page]).per(params[:per_page])
|
17
17
|
end
|
18
18
|
|
19
19
|
def load_data
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<fieldset class="no-border-bottom">
|
2
|
-
<legend><%= Spree.t(:risk_analysis) %></legend>
|
2
|
+
<legend><%= "#{Spree.t(:risk_analysis)}: #{Spree.t(:not) unless @order.is_risky?} #{Spree.t(:risky)}" %></legend>
|
3
3
|
<table>
|
4
4
|
<thead>
|
5
5
|
<th><%= Spree.t('risk')%></th>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= Spree.t(:failed_payment_attempts) %>:
|
12
12
|
</strong></td>
|
13
13
|
<td class="align-center">
|
14
|
-
<span class="<%= @order.
|
14
|
+
<span class="<%= @order.payments.failed.count > 0 ? 'state void' : 'state complete' %>">
|
15
15
|
<%= link_to "#{pluralize(@order.payments.failed.count, Spree.t(:payment))}", spree.admin_order_payments_path(@order) %>
|
16
16
|
</span>
|
17
17
|
</td>
|
@@ -23,6 +23,10 @@
|
|
23
23
|
<%= label_tag nil, Spree.t(:display) %>
|
24
24
|
<%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %>
|
25
25
|
</div>
|
26
|
+
<div data-hook="auto_capture" class="field">
|
27
|
+
<%= label_tag nil, Spree.t(:auto_capture) %>
|
28
|
+
<%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {:class => 'select2 fullwidth'}) %>
|
29
|
+
</div>
|
26
30
|
<div data-hook="active" class="field">
|
27
31
|
<%= label_tag nil, Spree.t(:active) %>
|
28
32
|
<ul>
|
@@ -17,6 +17,7 @@
|
|
17
17
|
<div class="alpha four columns">
|
18
18
|
<div data-hook="card_number">
|
19
19
|
<div class="field">
|
20
|
+
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', {:id => 'cc_type'} %>
|
20
21
|
<%= label_tag 'card_number', raw(Spree.t(:card_number) + content_tag(:span, ' *', :class => 'required')) %>
|
21
22
|
<%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth', :id => 'card_number', :maxlength => 19 %>
|
22
23
|
<span id="card_type" style="display:none;">
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
<% content_for :table_filter do %>
|
15
|
-
<%= render :partial => 'spree/admin/shared/
|
15
|
+
<%= render :partial => 'spree/admin/shared/report_order_criteria', :locals => {} %>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<table class="admin-report" data-hook="sales_total">
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= search_form_for @search, :url => spree.sales_total_admin_reports_path do |s| %>
|
2
|
+
<div class="date-range-filter field align-center">
|
3
|
+
<%= label_tag nil, Spree.t(:start), :class => 'inline' %>
|
4
|
+
<%= s.text_field :completed_at_gt, :class => 'datepicker datepicker-from', :value => datepicker_field_value(params[:q][:completed_at_gt]) %>
|
5
|
+
|
6
|
+
<span class="range-divider">
|
7
|
+
<i class="icon-arrow-right"></i>
|
8
|
+
</span>
|
9
|
+
|
10
|
+
<%= s.text_field :completed_at_lt, :class => 'datepicker datepicker-to', :value => datepicker_field_value(params[:q][:completed_at_lt]) %>
|
11
|
+
<%= label_tag nil, Spree.t(:end), :class => 'inline' %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="actions filter-actions">
|
15
|
+
<%= button Spree.t(:search), 'icon-search' %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
%>
|
39
39
|
<tr id="<%= spree_dom_id stock_location %>" data-hook="stock_location_row" class="<%= cycle('odd', 'even')%>">
|
40
40
|
<td class="align-center"><%= display_name(stock_location) %></td>
|
41
|
-
<td class="align-center"><span class="state <%= state(stock_location) %>"><%= state(stock_location) %></span></td>
|
41
|
+
<td class="align-center"><span class="state <%= state(stock_location) %>"><%= Spree.t(state(stock_location)) %></span></td>
|
42
42
|
<td class="align-center"><%= link_to Spree.t(:stock_movements), admin_stock_location_stock_movements_path(stock_location.id) %> </td>
|
43
43
|
<td class="actions">
|
44
44
|
<%= link_to_edit stock_location, :no_text => true %>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<script type='text/template' id='variant_autocomplete_stock_template'>
|
3
2
|
<fieldset>
|
4
3
|
<legend align="center"><%= Spree.t(:select_stock) %></legend>
|
@@ -19,10 +18,10 @@
|
|
19
18
|
{{#each variant.stock_items}}
|
20
19
|
<tr>
|
21
20
|
<td>{{this.stock_location_name}}</td>
|
22
|
-
|
21
|
+
|
22
|
+
{{#unless ../variant.track_inventory}}
|
23
23
|
<td>
|
24
|
-
|
25
|
-
{{#if this.backorderable}} (<%= Spree.t(:backorders_allowed) %>) {{/if}}
|
24
|
+
It doesn't track inventory
|
26
25
|
</td>
|
27
26
|
<td>
|
28
27
|
<input class="quantity" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
|
@@ -31,9 +30,22 @@
|
|
31
30
|
<button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add"></button>
|
32
31
|
</td>
|
33
32
|
{{else}}
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
{{#if this.available}}
|
34
|
+
<td>
|
35
|
+
{{this.count_on_hand}}
|
36
|
+
{{#if this.backorderable}} (<%= Spree.t(:backorders_allowed) %>) {{/if}}
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<input class="quantity" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
|
40
|
+
</td>
|
41
|
+
<td class="actions">
|
42
|
+
<button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add"></button>
|
43
|
+
</td>
|
44
|
+
{{else}}
|
45
|
+
<td><%= Spree.t(:out_of_stock) %></td>
|
46
|
+
<td>0</td>
|
47
|
+
{{/if}}
|
48
|
+
{{/unless}}
|
37
49
|
</tr>
|
38
50
|
{{/each}}
|
39
51
|
</tbody>
|
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.1.
|
4
|
+
version: 2.1.5
|
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-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.5
|
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.1.
|
26
|
+
version: 2.1.5
|
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.1.
|
33
|
+
version: 2.1.5
|
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.1.
|
40
|
+
version: 2.1.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jquery-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
47
|
+
version: 3.1.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
54
|
+
version: 3.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: jquery-ui-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.
|
61
|
+
version: 4.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.
|
68
|
+
version: 4.1.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: select2-rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -363,6 +363,7 @@ files:
|
|
363
363
|
- app/views/spree/admin/shared/_product_sub_menu.html.erb
|
364
364
|
- app/views/spree/admin/shared/_product_tabs.html.erb
|
365
365
|
- app/views/spree/admin/shared/_report_criteria.html.erb
|
366
|
+
- app/views/spree/admin/shared/_report_order_criteria.html.erb
|
366
367
|
- app/views/spree/admin/shared/_routes.html.erb
|
367
368
|
- app/views/spree/admin/shared/_show_resource_links.html.erb
|
368
369
|
- app/views/spree/admin/shared/_sidebar.html.erb
|