nimbleshop_simply 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,5 +53,15 @@ $bottomColorLight: opacify($bottomColor, 0.5);
53
53
  }
54
54
 
55
55
  .light-link {
56
- color: #999;
56
+ color: #cfcfcf;
57
+ }
58
+
59
+ .purchase-success {
60
+ ul {
61
+ padding-top: 10px;
62
+ }
63
+ li {
64
+ font-size: 16px;
65
+ line-height: 28px;
66
+ }
57
67
  }
@@ -1,7 +1,7 @@
1
1
  module NimbleshopSimply
2
2
  class Checkout::PaymentsController < SimplyController
3
3
 
4
- before_filter :verify_current_order
4
+ before_filter :verify_current_order, :set_show_shipping_billing_address, :set_contact_email
5
5
 
6
6
  force_ssl if: :ssl_configured?
7
7
 
@@ -17,5 +17,15 @@ module NimbleshopSimply
17
17
  PaymentMethod.all.find { |i| i.use_ssl? }
18
18
  end
19
19
 
20
+ private
21
+
22
+ def set_show_shipping_billing_address
23
+ @show_shipping_billing_address = true
24
+ end
25
+
26
+ def set_contact_email
27
+ @show_contact_email = true
28
+ end
29
+
20
30
  end
21
31
  end
@@ -1,7 +1,7 @@
1
1
  module NimbleshopSimply
2
2
  class Checkout::ShippingAddressesController < SimplyController
3
3
 
4
- before_filter :verify_current_order
4
+ before_filter :verify_current_order, :unset_show_shipping_billing_address, :unset_contact_email
5
5
 
6
6
  def new
7
7
  current_order.initialize_addresses
@@ -27,5 +27,15 @@ module NimbleshopSimply
27
27
  end
28
28
  end
29
29
 
30
+ private
31
+
32
+ def unset_show_shipping_billing_address
33
+ @show_shipping_billing_address = false
34
+ end
35
+
36
+ def unset_contact_email
37
+ @show_contact_email = false
38
+ end
39
+
30
40
  end
31
41
  end
@@ -1,7 +1,7 @@
1
1
  module NimbleshopSimply
2
2
  class Checkout::ShippingMethodsController < SimplyController
3
3
 
4
- before_filter :verify_current_order, :load_shipping_methods
4
+ before_filter :verify_current_order, :load_shipping_methods, :set_show_shipping_billing_address, :set_contact_email
5
5
 
6
6
  def new
7
7
  render
@@ -21,5 +21,15 @@ module NimbleshopSimply
21
21
  @shipping_methods = Array.wrap(current_order.available_shipping_methods)
22
22
  end
23
23
 
24
+ private
25
+
26
+ def set_show_shipping_billing_address
27
+ @show_shipping_billing_address = true
28
+ end
29
+
30
+ def set_contact_email
31
+ @show_contact_email = true
32
+ end
33
+
24
34
  end
25
35
  end
@@ -1,7 +1,7 @@
1
1
  <br />
2
2
 
3
- <div class='alert alert-success'>
4
- <p><strong> You have successfully completed the purchase. </strong> </p>
3
+ <div class='alert alert-success purchase-success'>
4
+ <h3><strong> You have successfully completed the purchase. </strong> </h3>
5
5
  <ul>
6
6
  <li>
7
7
  An email is being sent to <strong><%= @order.email %></strong> with full information regarding
@@ -1,30 +1,36 @@
1
- <% if current_order.shipping_address.persisted? && params[:controller] != "checkout/shipping_addresses" %>
1
+ <% if @show_shipping_billing_address || @show_contact_email %>
2
2
  <div class='row'>
3
3
  <div class='span4' style='min-height:150px;'>
4
- <h3>
5
- Shipping address
6
- <small>
7
- <%= link_to 'change', new_checkout_shipping_address_path, title: 'Edit Shipping Address', id: 'edit_shipping_address', class: 'light-link' %>
8
- </small>
9
- </h3>
10
- <address class='shipping-address'>
11
- <%= display_address(current_order.shipping_address) %>
12
- </address>
13
4
 
14
- <h3> Billing address </h3>
5
+ <% if @show_shipping_billing_address %>
6
+ <h3>
7
+ Shipping address
8
+ <small>
9
+ <%= link_to 'change', new_checkout_shipping_address_path, title: 'Edit Shipping Address', id: 'edit_shipping_address', class: 'light-link' %>
10
+ </small>
11
+ </h3>
12
+ <address class='shipping-address'>
13
+ <%= display_address(current_order.shipping_address) %>
14
+ </address>
15
15
 
16
- <address class='billing-address'>
17
- <% if current_order.shipping_address.use_for_billing %>
18
- <i>Same as shipping address</i>
19
- <% else %>
20
- <%= display_address(current_order.billing_address) %>
16
+ <h3> Billing address </h3>
17
+
18
+ <address class='billing-address'>
19
+ <% if current_order.shipping_address.use_for_billing %>
20
+ <i>Same as shipping address</i>
21
+ <% else %>
22
+ <%= display_address(current_order.billing_address) %>
23
+ <% end %>
24
+ </address>
25
+ <% end %>
26
+
27
+ <% if @show_contact_email %>
28
+ <h3>Contact email</h3>
29
+ <address>
30
+ <%= current_order.email %>
31
+ </address>
21
32
  <% end %>
22
- </address>
23
33
 
24
- <h3>Contact email</h3>
25
- <address>
26
- <%= current_order.email %>
27
- </address>
28
34
  </div>
29
35
  </div>
30
36
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nimbleshop_simply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-07 00:00:00.000000000 Z
13
+ date: 2012-12-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jquery-rails
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  segments:
201
201
  - 0
202
- hash: 2582335854368255739
202
+ hash: -257683429584870324
203
203
  required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  none: false
205
205
  requirements:
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  segments:
210
210
  - 0
211
- hash: 2582335854368255739
211
+ hash: -257683429584870324
212
212
  requirements: []
213
213
  rubyforge_project:
214
214
  rubygems_version: 1.8.24