spree_delivery_time 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +4 -1
- data/app/models/order_decorator.rb +1 -1
- data/app/views/spree/admin/orders/_delivery_time_header.html.erb +1 -1
- data/app/views/spree/checkout/_delivery_time.html.erb +10 -5
- data/config/locales/spree_delivery_time.en.yml +24 -0
- data/config/locales/spree_delivery_time.es.yml +24 -0
- data/lib/spree_delivery_time/version.rb +1 -1
- metadata +5 -5
- data/app/overrides/admin/orders/admin_orders_delivery_time_filter.rb +0 -5
- data/app/views/spree/admin/orders/_delivery_time_filter.html.erb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e969bf6b90966fb66ca0988d3b12d4e7e98a10f3
|
4
|
+
data.tar.gz: 3f1105b2a913536c3f2038d927eb4275f250f122
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a661ccc91f633b724281ee608cefbfa54510644b209d8981c54fcf9ea2b62d8e2b113d34f1207db2f8589ff19a169c88bc31335072e48cd6948599dd25fe2fe3
|
7
|
+
data.tar.gz: 19b4e5e5644756017ba165f6618c971f87ab5c77187d8fd6e9ca64d004764983862ef7d5023f6030e52158db81a1a8673a44b1c0ba986a9e2fff81d760d58cdd
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@ Installing
|
|
15
15
|
|
16
16
|
Add the gem to your Gemfile
|
17
17
|
|
18
|
-
$ gem 'spree_delivery_date',
|
18
|
+
$ gem 'spree_delivery_date', branch: '1-3-stable'
|
19
19
|
|
20
20
|
bundle
|
21
21
|
|
@@ -27,3 +27,6 @@ and run
|
|
27
27
|
|
28
28
|
to install and run the migrations. This migration simply
|
29
29
|
adds the start_delivery_time and end_delivery_time columns to Spree::Order.
|
30
|
+
|
31
|
+
|
32
|
+
Code improvements are welcome!
|
@@ -14,7 +14,7 @@ Spree::Order.class_eval do
|
|
14
14
|
def delivery_time_specific_validation
|
15
15
|
if start_delivery_time && end_delivery_time && ['payment', 'confirm', 'complete'].include?(state)
|
16
16
|
if end_delivery_time <= start_delivery_time
|
17
|
-
self.errors.add(:start_delivery_time,
|
17
|
+
self.errors.add(:start_delivery_time, I18n.locale)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -1 +1 @@
|
|
1
|
-
<th><%= sort_link @search, :start_delivery_time, t(:
|
1
|
+
<th><%= sort_link @search, :start_delivery_time, t(:delivery_time, scope: 'activerecord.attributes.spree/order') %></th>
|
@@ -1,7 +1,12 @@
|
|
1
|
+
<br />
|
2
|
+
<legend><%= t('.spree_delivery_time.title') %></legend>
|
1
3
|
<p id="delivery_time">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
<div class="field">
|
5
|
+
<%= form.label :start_delivery_time %><br />
|
6
|
+
<%= form.time_select :start_delivery_time %>
|
7
|
+
</div>
|
8
|
+
<div class="field">
|
9
|
+
<%= form.label :end_delivery_time %><br />
|
10
|
+
<%= form.time_select :end_delivery_time %>
|
11
|
+
</div>
|
7
12
|
</p>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
en:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
spree/order:
|
5
|
+
delivery_time: Delivery Time
|
6
|
+
start_delivery_time: Start delivery time
|
7
|
+
end_delivery_time: End delivery time
|
8
|
+
errors:
|
9
|
+
models:
|
10
|
+
spree/order:
|
11
|
+
attributes:
|
12
|
+
start_delivery_time:
|
13
|
+
en: must be before end delivery time
|
14
|
+
helpers:
|
15
|
+
label:
|
16
|
+
order:
|
17
|
+
start_delivery_time: Start delivery time
|
18
|
+
end_delivery_time: End delivery time
|
19
|
+
spree:
|
20
|
+
checkout:
|
21
|
+
delivery:
|
22
|
+
spree_delivery_time:
|
23
|
+
title: Delivery Time Gap
|
24
|
+
delivery_time: Delivery Time
|
@@ -0,0 +1,24 @@
|
|
1
|
+
es:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
spree/order:
|
5
|
+
delivery_time: Horario de entrega
|
6
|
+
start_delivery_time: Horario inicial de entrega
|
7
|
+
end_delivery_time: Horario final de entrega
|
8
|
+
errors:
|
9
|
+
models:
|
10
|
+
spree/order:
|
11
|
+
attributes:
|
12
|
+
start_delivery_time:
|
13
|
+
es: debe ser antes del horario de entrega final
|
14
|
+
helpers:
|
15
|
+
label:
|
16
|
+
order:
|
17
|
+
start_delivery_time: Horario inicial de entrega
|
18
|
+
end_delivery_time: Horario final de entrega
|
19
|
+
spree:
|
20
|
+
checkout:
|
21
|
+
delivery:
|
22
|
+
spree_delivery_time:
|
23
|
+
title: Franja horario de entrega
|
24
|
+
delivery_time: Horario de entrega
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_delivery_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agustin Anfuso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -40,16 +40,16 @@ files:
|
|
40
40
|
- Rakefile
|
41
41
|
- app/models/order_decorator.rb
|
42
42
|
- app/overrides/admin/orders/admin_orders_delivery_time_column.rb
|
43
|
-
- app/overrides/admin/orders/admin_orders_delivery_time_filter.rb
|
44
43
|
- app/overrides/admin/shared/admin_order_information.rb
|
45
44
|
- app/overrides/checkout/delivery_time.rb
|
46
45
|
- app/overrides/orders/delivery_time_details.rb
|
47
46
|
- app/views/spree/admin/orders/_delivery_time_cell.html.erb
|
48
|
-
- app/views/spree/admin/orders/_delivery_time_filter.html.erb
|
49
47
|
- app/views/spree/admin/orders/_delivery_time_header.html.erb
|
50
48
|
- app/views/spree/admin/shared/_admin_order_information_delivery_time.html.erb
|
51
49
|
- app/views/spree/checkout/_delivery_time.html.erb
|
52
50
|
- app/views/spree/orders/_order_delivery_time_details.html.erb
|
51
|
+
- config/locales/spree_delivery_time.en.yml
|
52
|
+
- config/locales/spree_delivery_time.es.yml
|
53
53
|
- db/migrate/20130415025010_add_delivery_time_to_orders.rb
|
54
54
|
- lib/generators/spree_delivery_time/install/install_generator.rb
|
55
55
|
- lib/spree_delivery_time.rb
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.0.
|
80
|
+
rubygems_version: 2.0.0
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Adds a delivery time field in the delivery section of checkout.
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<div class="time-range-filter field">
|
2
|
-
<%= label_tag nil, t(:start_delivery_time) %>
|
3
|
-
<div class="time-range-fields">
|
4
|
-
<%= f.text_field :start_delivery_time_gt, class: 'datepicker datepicker-from', value: params[:q][:start_delivery_time_gt], placeholder: t(:start) %>
|
5
|
-
|
6
|
-
<span class="range-divider">
|
7
|
-
<i class="icon-arrow-right"></i>
|
8
|
-
</span>
|
9
|
-
|
10
|
-
<%= f.text_field :start_delivery_time_lt, class: 'datepicker datepicker-to', value: params[:q][:start_delivery_time_lt], placeholder: t(:stop) %>
|
11
|
-
</div>
|
12
|
-
</div>
|