piggybak 0.6.19 → 0.6.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- piggybak (0.6.19)
4
+ piggybak (0.6.20)
5
5
  activemerchant
6
6
  countries
7
7
  devise
@@ -0,0 +1,6 @@
1
+ <div id="billing_address">
2
+ <h3>Billing Address</h3>
3
+ <%= f.fields_for :billing_address do |billing_address| %>
4
+ <%= render "address_form", :address => billing_address, :type => "billing" %>
5
+ <% end -%>
6
+ </div>
@@ -0,0 +1,42 @@
1
+ <div id="payment">
2
+ <h3>Payment</h3>
3
+ <%= f.fields_for :line_items, @order.line_items.detect { |li| li.line_item_type == "payment" } do |line_item_f| %>
4
+ <%= line_item_f.hidden_field :line_item_type, { :value => "payment" } %>
5
+ <%= line_item_f.fields_for :payment do |payment| %>
6
+ <div class="item">
7
+ <%= payment.label :number %>
8
+ <% if @order.errors.keys.include?("payments.number".to_sym) %>
9
+ <span class="field_with_errors">
10
+ <%= payment.text_field :number, :class => "required" %>
11
+ </span>
12
+ <% else -%>
13
+ <%= payment.text_field :number, :class => "required" %>
14
+ <% end -%>
15
+ </div>
16
+
17
+ <div class="item">
18
+ <%= payment.label :verification_value %>
19
+ <% if @order.errors.keys.include?("payments.verification_value".to_sym) %>
20
+ <span class="field_with_errors">
21
+ <%= payment.text_field :verification_value, :class => "required" %>
22
+ </span>
23
+ <% else -%>
24
+ <%= payment.text_field :verification_value, :class => "required" %>
25
+ <% end -%>
26
+ </div>
27
+
28
+ <div class="item">
29
+ <%= payment.label :month %>
30
+ <% if @order.errors.keys.include?("payments.verification_value".to_sym) %>
31
+ <span class="field_with_errors">
32
+ <%= payment.select :month, 1.upto(12).to_a %> /
33
+ <%= payment.select :year, Time.now.year.upto(Time.now.year + 10).to_a %>
34
+ </span>
35
+ <% else -%>
36
+ <%= payment.select :month, 1.upto(12).to_a %> /
37
+ <%= payment.select :year, Time.now.year.upto(Time.now.year + 10).to_a %>
38
+ <% end -%>
39
+ </div>
40
+ <% end -%>
41
+ <% end -%>
42
+ </div>
@@ -0,0 +1,21 @@
1
+ <div id="shipping">
2
+ <h3>Shipping Option</h3>
3
+ <%= f.fields_for :line_items, @order.line_items.detect { |li| li.line_item_type == "shipment" } do |line_item_f| %>
4
+ <%= line_item_f.hidden_field :line_item_type, { :value => "shipment" } %>
5
+ <%= line_item_f.fields_for :shipment do |shipment| %>
6
+ <div class="item">
7
+ <%= shipment.label :shipping_method_id %>
8
+ <%= shipment.select :shipping_method_id, [] %>
9
+ <div id="shipping_spinner" style="display:none;">
10
+ <%= image_tag "ajax-loader.gif" %>
11
+ </div>
12
+ <div id="shipping_default" style="display:none;">
13
+ Please enter a shipping address.
14
+ </div>
15
+ <div id="shipping_empty" style="display:none;">
16
+ No shipping methods found.
17
+ </div>
18
+ </div>
19
+ <% end -%>
20
+ <% end -%>
21
+ </div>
@@ -0,0 +1,10 @@
1
+ <div id="shipping_address">
2
+ <h3>
3
+ Shipping Address
4
+ <a href="#" id="copy">copy from billing</a>
5
+ </h3>
6
+
7
+ <%= f.fields_for :shipping_address do |shipping_address| %>
8
+ <%= render "address_form", :address => shipping_address, :type => "shipping" %>
9
+ <% end -%>
10
+ </div>
@@ -0,0 +1,18 @@
1
+ <div id="user_details">
2
+ <h3>User Details</h3>
3
+ <div class="item">
4
+ <% if current_user -%>
5
+ <%= f.label :email %>
6
+ <%= f.text_field :email, { :readonly => true, :class => "readonly required" } %>
7
+ <span>or <%= link_to 'LOGOUT', destroy_user_session_path, :method => :delete, :class => "last" %></span>
8
+ <% else -%>
9
+ <%= f.label :email %>
10
+ <%= f.text_field :email, :class => "required" %><br />
11
+ <span>or <%= link_to 'LOG IN', new_user_session_path %></span>
12
+ <% end -%>
13
+ </div>
14
+ <div class="item">
15
+ <%= f.label :phone %>
16
+ <%= f.text_field :phone, :class => "required" %>
17
+ </div>
18
+ </div>
@@ -1,127 +1,31 @@
1
1
  <div id="checkout">
2
-
3
- <h1>Checkout</h1>
4
- <%= form_for @order, :url => piggybak.orders_url, :method => "POST" do |f| %>
5
-
6
- <% if @order.errors.any? -%>
7
- <div id="checkout_error">
8
- <b>You have errors with your submission:</b><br />
9
- <%= raw @order.errors.full_messages.collect { |b| b.gsub(/^Line items payment/, 'Payment').gsub(/^Line items shipment shipping/, 'Shipping') }.join("<br />") %>
10
- </div>
11
- <% end -%>
12
- <div class="clear"></div>
13
-
14
- <div id="user_details">
15
- <h3>User Details</h3>
16
- <div class="item">
17
- <% if current_user -%>
18
- <%= f.label :email %>
19
- <%= f.text_field :email, { :readonly => true, :class => "readonly required" } %>
20
- <span>or <%= link_to 'LOGOUT', destroy_user_session_path, :method => :delete, :class => "last" %></span>
21
- <% else -%>
22
- <%= f.label :email %>
23
- <%= f.text_field :email, :class =-> "required" %><br />
24
- <span>or <%= link_to 'LOG IN', new_user_session_path %></span>
25
- <% end -%>
26
- </div>
27
- <div class="item">
28
- <%= f.label :phone %>
29
- <%= f.text_field :phone, :class => "required" %>
2
+ <h1>Checkout</h1>
3
+ <%= form_for @order, :url => piggybak.orders_url, :method => "POST" do |f| %>
4
+ <% if @order.errors.any? -%>
5
+ <div id="checkout_error">
6
+ <b>You have errors with your submission:</b><br />
7
+ <%= raw @order.errors.full_messages.collect { |b| b.gsub(/^Line items payment/, 'Payment').gsub(/^Line items shipment shipping/, 'Shipping') }.join("<br />") %>
30
8
  </div>
31
- </div>
32
-
33
- <div id="billing_address">
34
- <h3>Billing Address</h3>
35
- <%= f.fields_for :billing_address do |billing_address| %>
36
- <%= render "address_form", :address => billing_address, :type => "billing" %>
37
- <% end -%>
38
- </div>
39
- <div id="shipping_address">
40
- <h3>
41
- Shipping Address
42
- <a href="#" id="copy">copy from billing</a>
43
- </h3>
44
-
45
- <%= f.fields_for :shipping_address do |shipping_address| %>
46
- <%= render "address_form", :address => shipping_address, :type => "shipping" %>
47
- <% end -%>
48
- </div>
49
-
50
- <div id="add_details">
51
- <div id="shipping">
52
- <h3>Shipping Option</h3>
53
- <%= f.fields_for :line_items, @order.line_items.detect { |li| li.line_item_type == "shipment" } do |line_item_f| %>
54
- <%= line_item_f.hidden_field :line_item_type, { :value => "shipment" } %>
55
- <%= line_item_f.fields_for :shipment do |shipment| %>
56
- <div class="item">
57
- <%= shipment.label :shipping_method_id %>
58
- <%= shipment.select :shipping_method_id, [] %>
59
- <div id="shipping_spinner" style="display:none;">
60
- <%= image_tag "ajax-loader.gif" %>
61
- </div>
62
- <div id="shipping_default" style="display:none;">
63
- Please enter a shipping address.
64
- </div>
65
- <div id="shipping_empty" style="display:none;">
66
- No shipping methods found.
67
- </div>
68
- </div>
69
- <% end -%>
70
9
  <% end -%>
10
+ <div class="clear"></div>
11
+
12
+ <%= render "user_details", :f => f %>
13
+ <%= render "billing_address", :f => f %>
14
+ <%= render "shipping_address", :f => f %>
15
+
16
+ <div id="add_details">
17
+ <%= render "shipping", :f => f %>
18
+ <%= render "payment", :f => f %>
19
+ <div id="submit">
20
+ <%= f.submit %>
21
+ </div>
71
22
  </div>
72
- <div id="payment">
73
- <h3>Payment</h3>
74
- <%= f.fields_for :line_items, @order.line_items.detect { |li| li.line_item_type == "payment" } do |line_item_f| %>
75
- <%= line_item_f.hidden_field :line_item_type, { :value => "payment" } %>
76
- <%= line_item_f.fields_for :payment do |payment| %>
77
- <div class="item">
78
- <%= payment.label :number %>
79
- <% if @order.errors.keys.include?("payments.number".to_sym) %>
80
- <span class="field_with_errors">
81
- <%= payment.text_field :number, :class => "required" %>
82
- </span>
83
- <% else -%>
84
- <%= payment.text_field :number, :class => "required" %>
85
- <% end -%>
86
- </div>
87
-
88
- <div class="item">
89
- <%= payment.label :verification_value %>
90
- <% if @order.errors.keys.include?("payments.verification_value".to_sym) %>
91
- <span class="field_with_errors">
92
- <%= payment.text_field :verification_value, :class => "required" %>
93
- </span>
94
- <% else -%>
95
- <%= payment.text_field :verification_value, :class => "required" %>
96
- <% end -%>
97
- </div>
98
-
99
- <div class="item">
100
- <%= payment.label :month %>
101
- <% if @order.errors.keys.include?("payments.verification_value".to_sym) %>
102
- <span class="field_with_errors">
103
- <%= payment.select :month, 1.upto(12).to_a %> /
104
- <%= payment.select :year, Time.now.year.upto(Time.now.year + 10).to_a %>
105
- </span>
106
- <% else -%>
107
- <%= payment.select :month, 1.upto(12).to_a %> /
108
- <%= payment.select :year, Time.now.year.upto(Time.now.year + 10).to_a %>
109
- <% end -%>
110
- </div>
111
- <% end -%>
112
23
  <% end -%>
113
- </div>
114
- <div id="submit">
115
- <%= f.submit %>
116
- </div>
117
- </div>
118
- <% end -%>
119
-
120
- <div id="totals_section">
121
- <h3>Totals</h3>
122
- <%= render "piggybak/cart/items", :page => "checkout" %>
123
- </div>
124
24
 
25
+ <div id="totals_section">
26
+ <h3>Totals</h3>
27
+ <%= render "piggybak/cart/items", :page => "checkout" %>
28
+ </div>
125
29
  </div>
126
30
 
127
31
  <script type="text/javascript">
@@ -15,8 +15,19 @@ module Piggybak
15
15
  attr_accessor :secure_checkout
16
16
  attr_accessor :secure_prefix
17
17
  attr_accessor :extra_secure_paths
18
+ attr_accessor :manage_classes
19
+ attr_accessor :extra_abilities
18
20
 
19
21
  def reset
22
+ @manage_classes = ["::Piggybak::Sellable",
23
+ "::Piggybak::ShippingMethod",
24
+ "::Piggybak::PaymentMethod",
25
+ "::Piggybak::TaxMethod",
26
+ "::Piggybak::State",
27
+ "::Piggybak::Country",
28
+ "::Piggybak::Order"]
29
+ @extra_abilities = []
30
+
20
31
  @email_sender = "support@piggybak.org"
21
32
  @order_cc = nil
22
33
 
@@ -1,3 +1,3 @@
1
1
  module Piggybak
2
- VERSION = "0.6.19"
2
+ VERSION = "0.6.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.19
4
+ version: 0.6.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-14 00:00:00.000000000 Z
14
+ date: 2012-11-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -159,10 +159,15 @@ files:
159
159
  - app/views/piggybak/orders/list.html.erb
160
160
  - app/views/piggybak/orders/submit.html.erb
161
161
  - app/views/piggybak/orders/no_access.text.erb
162
+ - app/views/piggybak/orders/_billing_address.html.erb
162
163
  - app/views/piggybak/orders/receipt.html.erb
164
+ - app/views/piggybak/orders/_user_details.html.erb
163
165
  - app/views/piggybak/orders/_details.html.erb
166
+ - app/views/piggybak/orders/_payment.html.erb
164
167
  - app/views/piggybak/orders/_address_form.html.erb
168
+ - app/views/piggybak/orders/_shipping_address.html.erb
165
169
  - app/views/piggybak/orders/download.text.erb
170
+ - app/views/piggybak/orders/_shipping.html.erb
166
171
  - app/views/piggybak/orders/_google_analytics.html.erb
167
172
  - app/views/piggybak/cart/_items.html.erb
168
173
  - app/views/piggybak/cart/_form.html.erb
@@ -229,7 +234,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
229
234
  version: '0'
230
235
  segments:
231
236
  - 0
232
- hash: -3807440579532118395
237
+ hash: 1267569878513795550
233
238
  required_rubygems_version: !ruby/object:Gem::Requirement
234
239
  none: false
235
240
  requirements:
@@ -238,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
243
  version: '0'
239
244
  segments:
240
245
  - 0
241
- hash: -3807440579532118395
246
+ hash: 1267569878513795550
242
247
  requirements: []
243
248
  rubyforge_project:
244
249
  rubygems_version: 1.8.23