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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1908c445dc0c42082dfcd10a1709be58b16cb9a
4
- data.tar.gz: d5c328c967880c75b467552a588f8a19984cfd21
3
+ metadata.gz: e969bf6b90966fb66ca0988d3b12d4e7e98a10f3
4
+ data.tar.gz: 3f1105b2a913536c3f2038d927eb4275f250f122
5
5
  SHA512:
6
- metadata.gz: d2411f972721ef86ddf895ce16987d707d63119cb7212f9e65645bf6a3c20732c76cbeaba098d3462d5f7c6bbf3a0ea15fe5cef7f38ebaf27a62e2c721cffdb1
7
- data.tar.gz: 3f9b9fc3bc8622c55f5a55684299f511eac7d219bae6ccfcf16131db6015551665af2796574dd9d96cfc89381a8b6b7f8b50be57e28a2aa801e29f2290095270
6
+ metadata.gz: a661ccc91f633b724281ee608cefbfa54510644b209d8981c54fcf9ea2b62d8e2b113d34f1207db2f8589ff19a169c88bc31335072e48cd6948599dd25fe2fe3
7
+ data.tar.gz: 19b4e5e5644756017ba165f6618c971f87ab5c77187d8fd6e9ca64d004764983862ef7d5023f6030e52158db81a1a8673a44b1c0ba986a9e2fff81d760d58cdd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
1
  ## v0.1.0
2
2
 
3
3
  * Initial release
4
+
5
+ ## v0.2.0
6
+
7
+ * en and es locales
8
+ * Views cleanup
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', github: 'aanfuso/spree_delivery_time', branch: '1-3-stable'
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, "Tiene que ser anterior a la hora final de entrega.")
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(:start_delivery_time, scope: 'activerecord.attributes.spree/order') %></th>
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
- <%= form.label :start_delivery_time, "Start Delivery Time" %><br />
3
- <%= form.time_select :start_delivery_time %>
4
- <br/>
5
- <%= form.label :end_delivery_time, "End Delivery Time" %><br />
6
- <%= form.time_select :end_delivery_time %>
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
@@ -1,3 +1,3 @@
1
1
  module SpreeDeliveryTime
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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-12 00:00:00.000000000 Z
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.14
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,5 +0,0 @@
1
- Deface::Override.new(virtual_path: "spree/admin/orders/index",
2
- name: "add_delivery_time_filter_to_orders_index",
3
- insert_after: ".date-range-filter",
4
- partial: "spree/admin/orders/delivery_time_filter",
5
- disabled: false)
@@ -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>