spree_core 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/app/assets/images/creditcards/icons/american_express.png +0 -0
  2. data/app/assets/images/creditcards/icons/cirrus.png +0 -0
  3. data/app/assets/images/creditcards/icons/delta.png +0 -0
  4. data/app/assets/images/creditcards/icons/dinersclub.png +0 -0
  5. data/app/assets/images/creditcards/icons/directdebit.png +0 -0
  6. data/app/assets/images/creditcards/icons/discover.png +0 -0
  7. data/app/assets/images/creditcards/icons/egold.png +0 -0
  8. data/app/assets/images/creditcards/icons/maestro.png +0 -0
  9. data/app/assets/images/creditcards/icons/master.png +0 -0
  10. data/app/assets/images/creditcards/icons/paypal.png +0 -0
  11. data/app/assets/images/creditcards/icons/solo.png +0 -0
  12. data/app/assets/images/creditcards/icons/switch.png +0 -0
  13. data/app/assets/images/creditcards/icons/visa.png +0 -0
  14. data/app/assets/images/creditcards/icons/visaelectron.png +0 -0
  15. data/app/assets/images/creditcards/icons/westernunion.png +0 -0
  16. data/app/assets/images/creditcards/icons/wirecard.png +0 -0
  17. data/app/assets/images/creditcards/icons/worldpay.png +0 -0
  18. data/app/assets/images/store/cart.png +0 -0
  19. data/app/assets/images/store/select_arrow.gif +0 -0
  20. data/app/assets/javascripts/admin/admin.js.erb +42 -40
  21. data/app/assets/javascripts/admin/orders/edit.js +1 -6
  22. data/app/assets/javascripts/admin/spree_core.js +1 -0
  23. data/app/assets/javascripts/store/cart.js +2 -2
  24. data/app/assets/javascripts/store/helpers.js.erb +2 -0
  25. data/app/assets/javascripts/store/spree_core.js +2 -0
  26. data/app/assets/stylesheets/store/base.css +387 -0
  27. data/app/assets/stylesheets/store/screen.css.scss +988 -0
  28. data/app/assets/stylesheets/store/spree_core.css +3 -2
  29. data/app/controllers/spree/admin/general_settings_controller.rb +2 -1
  30. data/app/controllers/spree/admin/orders_controller.rb +1 -1
  31. data/app/helpers/spree/base_helper.rb +9 -6
  32. data/app/models/spree/activator.rb +0 -1
  33. data/app/models/spree/adjustment.rb +7 -3
  34. data/app/models/spree/app_configuration.rb +34 -33
  35. data/app/models/spree/calculator/flexi_rate.rb +4 -4
  36. data/app/models/spree/order.rb +6 -1
  37. data/app/models/spree/payment.rb +7 -4
  38. data/app/models/spree/preferences/store.rb +3 -0
  39. data/app/models/spree/product.rb +8 -2
  40. data/app/views/spree/admin/general_settings/edit.html.erb +1 -1
  41. data/app/views/spree/admin/option_types/index.html.erb +1 -1
  42. data/app/views/spree/admin/shared/_order_details.html.erb +50 -2
  43. data/app/views/spree/admin/shared/_product_tabs.html.erb +1 -1
  44. data/app/views/spree/checkout/_address.html.erb +15 -13
  45. data/app/views/spree/checkout/_confirm.html.erb +1 -1
  46. data/app/views/spree/checkout/_delivery.html.erb +3 -1
  47. data/app/views/spree/checkout/_payment.html.erb +2 -1
  48. data/app/views/spree/checkout/_summary.html.erb +1 -0
  49. data/app/views/spree/checkout/edit.html.erb +22 -12
  50. data/app/views/spree/checkout/payment/_gateway.html.erb +1 -3
  51. data/app/views/spree/checkout/registration.html.erb +2 -2
  52. data/app/views/spree/layouts/spree_application.html.erb +57 -26
  53. data/app/views/spree/orders/_line_item.html.erb +1 -1
  54. data/app/views/spree/orders/edit.html.erb +8 -8
  55. data/app/views/spree/orders/show.html.erb +11 -3
  56. data/app/views/spree/products/_cart_form.html.erb +27 -22
  57. data/app/views/spree/products/_image.html.erb +2 -2
  58. data/app/views/spree/products/_properties.html.erb +13 -8
  59. data/app/views/spree/products/_taxons.html.erb +2 -2
  60. data/app/views/spree/products/_thumbnails.html.erb +1 -1
  61. data/app/views/spree/products/index.html.erb +1 -1
  62. data/app/views/spree/products/show.html.erb +38 -17
  63. data/app/views/spree/shared/_head.html.erb +17 -1
  64. data/app/views/spree/shared/_nav_bar.html.erb +1 -4
  65. data/app/views/spree/shared/_order_details.html.erb +85 -26
  66. data/app/views/spree/shared/_products.html.erb +10 -9
  67. data/app/views/spree/shared/_store_menu.html.erb +1 -2
  68. data/app/views/spree/shared/_taxonomies.html.erb +3 -3
  69. data/app/views/spree/taxons/_taxon.html.erb +1 -1
  70. data/app/views/spree/taxons/show.html.erb +1 -1
  71. data/config/locales/en.yml +2 -0
  72. data/config/routes.rb +2 -1
  73. data/db/migrate/{20111128153359_new_preferences.rb → 20120119024710_new_preferences.rb} +11 -9
  74. data/lib/generators/spree/install/install_generator.rb +13 -3
  75. data/lib/generators/spree/install/templates/config/initializers/spree.rb +5 -2
  76. data/lib/spree/core/controller_helpers.rb +3 -2
  77. data/lib/spree/core/engine.rb +1 -0
  78. data/lib/spree/core/permalinks.rb +4 -1
  79. data/lib/spree/core/testing_support/common_rake.rb +1 -1
  80. data/lib/spree/core/version.rb +1 -1
  81. data/vendor/assets/javascripts/jquery.formalize.min.js +1 -0
  82. data/vendor/assets/stylesheets/jquery.formalize.css +364 -0
  83. metadata +54 -32
  84. data/app/assets/stylesheets/store/reset.css +0 -175
  85. data/app/assets/stylesheets/store/screen.css +0 -127
@@ -1,5 +1,6 @@
1
1
  /*
2
- * This is a manifest file that includes stylesheets for spree_core
3
- *= require store/reset
2
+ * This is a manifest file that includes stylesheets for spree_core
3
+ *= require store/base
4
+ *= require jquery.formalize.css
4
5
  *= require store/screen
5
6
  */
@@ -9,7 +9,8 @@ module Spree
9
9
  def edit
10
10
  @preferences = [:site_name, :default_seo_title, :default_meta_keywords,
11
11
  :default_meta_description, :site_url, :allow_ssl_in_production,
12
- :allow_ssl_in_development_and_test, :check_for_spree_alerts]
12
+ :allow_ssl_in_staging, :allow_ssl_in_development_and_test,
13
+ :check_for_spree_alerts]
13
14
  end
14
15
 
15
16
  def update
@@ -1,6 +1,6 @@
1
1
  module Spree
2
2
  module Admin
3
- class OrdersController < BaseController
3
+ class OrdersController < Spree::Admin::BaseController
4
4
  require 'spree/core/gateway_error'
5
5
  before_filter :initialize_txn_partials
6
6
  before_filter :initialize_order_events
@@ -10,7 +10,7 @@ module Spree
10
10
  text = "#{text}: (#{t('empty')})"
11
11
  css_class = 'empty'
12
12
  else
13
- text = "#{text}: (#{current_order.item_count}) #{order_subtotal(current_order)}".html_safe
13
+ text = "#{text}: (#{current_order.item_count}) <span class='amount'>#{order_subtotal(current_order)}</span>".html_safe
14
14
  css_class = 'full'
15
15
  end
16
16
 
@@ -105,12 +105,12 @@ module Spree
105
105
  if taxon
106
106
  crumbs << content_tag(:li, link_to(t(:products) , products_path) + separator)
107
107
  crumbs << taxon.ancestors.collect { |ancestor| content_tag(:li, link_to(ancestor.name , seo_url(ancestor)) + separator) } unless taxon.ancestors.empty?
108
- crumbs << content_tag(:li, content_tag(:span, taxon.name))
108
+ crumbs << content_tag(:li, content_tag(:span, link_to(taxon.name , seo_url(taxon))))
109
109
  else
110
110
  crumbs << content_tag(:li, content_tag(:span, t(:products)))
111
111
  end
112
- crumb_list = content_tag(:ul, raw(crumbs.flatten.map{|li| li.mb_chars}.join))
113
- content_tag(:div, crumb_list + tag(:br, {:class => 'clear'}, false, true), :id => 'breadcrumbs')
112
+ crumb_list = content_tag(:ul, raw(crumbs.flatten.map{|li| li.mb_chars}.join), :class => 'inline')
113
+ content_tag(:div, crumb_list, :id => 'breadcrumbs')
114
114
  end
115
115
 
116
116
  def taxons_tree(root_taxon, current_taxon, max_level = 1)
@@ -127,8 +127,11 @@ module Spree
127
127
  end
128
128
 
129
129
  def available_countries
130
- return Country.all unless zone = Zone.find_by_name(Spree::Config[:checkout_zone])
131
- zone.country_list
130
+ countries = Zone.find_by_name(Spree::Config[:checkout_zone]).try(:country_list) || Country.all
131
+ countries.collect do |c|
132
+ c.name = I18n.t(c.name, :scope => 'countries', :default => c.name)
133
+ c
134
+ end.sort{ |a,b| a.name <=> b.name }
132
135
  end
133
136
 
134
137
  def format_price(price, options={})
@@ -4,7 +4,6 @@ module Spree
4
4
 
5
5
  self.event_names = [
6
6
  'spree.cart.add',
7
- 'spree.checkout.coupon_code_added',
8
7
  'spree.order.contents_changed',
9
8
  'spree.user.signup'
10
9
  ]
@@ -59,12 +59,16 @@ module Spree
59
59
  # when present, but only if +locked+ is false. Adjustments that are +locked+ will never change their amount.
60
60
  # The new adjustment amount will be set by by the +originator+ and is not automatically saved. This makes it save
61
61
  # to use this method in an after_save hook for other models without causing an infinite recursion problem.
62
- def update!
62
+ #
63
+ # order#update_adjustments passes self as the src, this is so calculations can be performed on the
64
+ # current values. If we used source it would load the old record from db for the association
65
+ def update!(src = nil)
66
+ src ||= source
63
67
  return if locked?
64
- set_eligibility
65
68
  if originator.present?
66
- originator.update_adjustment(self, source)
69
+ originator.update_adjustment(self, src)
67
70
  end
71
+ set_eligibility
68
72
  end
69
73
 
70
74
  private
@@ -18,50 +18,51 @@
18
18
  module Spree
19
19
  class AppConfiguration < Preferences::Configuration
20
20
 
21
- preference :site_name, :string, :default => 'Spree Demo Site'
22
- preference :default_seo_title, :string, :default => ''
23
- preference :default_meta_description, :string, :default => 'Spree demo site'
24
- preference :default_meta_keywords, :string, :default => 'spree, demo'
25
- preference :site_url, :string, :default => 'demo.spreecommerce.com'
26
- preference :default_locale, :string, :default => 'en'
27
- preference :allow_locale_switching, :boolean, :default => true
28
- preference :default_country_id, :integer, :default => 214
29
- preference :allow_backorders, :boolean, :default => true
30
- preference :allow_backorder_shipping, :boolean, :default => false # should only be true if you don't need to track inventory
31
- preference :track_inventory_levels, :boolean, :default => true # will not track on_hand values for variants /products
32
- preference :create_inventory_units, :boolean, :default => true # should only be false when track_inventory_levels is false, also disables RMA's
33
- preference :show_descendents, :boolean, :default => true
34
- preference :show_zero_stock_products, :boolean, :default => true
35
- preference :orders_per_page, :integer, :default => 15
36
- preference :show_only_complete_orders_by_default, :boolean, :default => true
37
- preference :admin_products_per_page, :integer, :default => 10
38
- preference :admin_pgroup_preview_size, :integer, :default => 10
39
- preference :admin_pgroup_per_page, :integer, :default => 10
40
- preference :products_per_page, :integer, :default => 12
41
- preference :logo, :string, :default => 'admin/bg/spree_50.png'
21
+ # Alphabetized to more easily lookup particular preferences
22
+ preference :address_requires_state, :boolean, :default => true # should state/state_name be required
42
23
  preference :admin_interface_logo, :string, :default => 'admin/bg/spree_50.png'
24
+ preference :admin_pgroup_per_page, :integer, :default => 10
25
+ preference :admin_pgroup_preview_size, :integer, :default => 10
26
+ preference :admin_products_per_page, :integer, :default => 10
27
+ preference :allow_backorder_shipping, :boolean, :default => false # should only be true if you don't need to track inventory
28
+ preference :allow_backorders, :boolean, :default => true
29
+ preference :allow_checkout_on_gateway_error, :boolean, :default => false
30
+ preference :allow_guest_checkout, :boolean, :default => true
31
+ preference :allow_locale_switching, :boolean, :default => true
32
+ preference :allow_ssl_in_development_and_test, :boolean, :default => false
43
33
  preference :allow_ssl_in_production, :boolean, :default => true
44
34
  preference :allow_ssl_in_staging, :boolean, :default => true
45
- preference :allow_ssl_in_development_and_test, :boolean, :default => false
46
- preference :allow_guest_checkout, :boolean, :default => true
47
35
  preference :alternative_billing_phone, :boolean, :default => false # Request extra phone for bill addr
48
36
  preference :alternative_shipping_phone, :boolean, :default => false # Request extra phone for ship addr
49
- preference :company, :boolean, :default => false # Request company field for billing and shipping addr
50
- preference :shipping_instructions, :boolean, :default => false # Request instructions/info for shipping
51
- preference :shipment_inc_vat, :boolean, :default => false
52
- preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)
53
- preference :address_requires_state, :boolean, :default => true # should state/state_name be required
54
- preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
55
37
  preference :always_put_site_name_in_title, :boolean, :default => true
38
+ preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)
56
39
  preference :cache_static_content, :boolean, :default => true
57
- preference :allow_checkout_on_gateway_error, :boolean, :default => false
58
- preference :select_taxons_from_tree, :boolean, :default => false # provide opportunity to select taxons from tree instead of search with autocomplete
59
- preference :max_level_in_taxons_menu, :integer, :default => 1 # maximum nesting level in taxons menu
60
40
  preference :check_for_spree_alerts, :boolean, :default => true
41
+ preference :checkout_zone, :string, :default => nil # replace with the name of a zone if you would like to limit the countries
42
+ preference :company, :boolean, :default => false # Request company field for billing and shipping addr
43
+ preference :create_inventory_units, :boolean, :default => true # should only be false when track_inventory_levels is false, also disables RMA's
44
+ preference :default_country_id, :integer, :default => 214
45
+ preference :default_locale, :string, :default => 'en'
46
+ preference :default_meta_description, :string, :default => 'Spree demo site'
47
+ preference :default_meta_keywords, :string, :default => 'spree, demo'
48
+ preference :default_seo_title, :string, :default => ''
61
49
  preference :dismissed_spree_alerts, :string, :default => ''
62
50
  preference :last_check_for_spree_alerts, :string, :default => nil
63
- preference :tax_using_ship_address, :boolean, :default => true
51
+ preference :logo, :string, :default => 'admin/bg/spree_50.png'
52
+ preference :max_level_in_taxons_menu, :integer, :default => 1 # maximum nesting level in taxons menu
53
+ preference :orders_per_page, :integer, :default => 15
64
54
  preference :prices_inc_tax, :boolean, :default => false
55
+ preference :products_per_page, :integer, :default => 12
56
+ preference :select_taxons_from_tree, :boolean, :default => false # provide opportunity to select taxons from tree instead of search with autocomplete
57
+ preference :shipment_inc_vat, :boolean, :default => false
58
+ preference :shipping_instructions, :boolean, :default => false # Request instructions/info for shipping
59
+ preference :show_descendents, :boolean, :default => true
60
+ preference :show_only_complete_orders_by_default, :boolean, :default => true
61
+ preference :show_zero_stock_products, :boolean, :default => true
62
+ preference :site_name, :string, :default => 'Spree Demo Site'
63
+ preference :site_url, :string, :default => 'demo.spreecommerce.com'
64
+ preference :tax_using_ship_address, :boolean, :default => true
65
+ preference :track_inventory_levels, :boolean, :default => true # will not track on_hand values for variants /products
65
66
 
66
67
  # searcher_class allows spree extension writers to provide their own Search class
67
68
  def searcher_class
@@ -2,7 +2,7 @@ module Spree
2
2
  class Calculator::FlexiRate < Calculator
3
3
  preference :first_item, :decimal, :default => 0.0
4
4
  preference :additional_item, :decimal, :default => 0.0
5
- preference :max_items, :decimal, :default => 0.0
5
+ preference :max_items, :integer, :default => 0
6
6
 
7
7
  def self.description
8
8
  I18n.t(:flexible_rate)
@@ -14,14 +14,14 @@ module Spree
14
14
 
15
15
  def compute(object)
16
16
  sum = 0
17
- max = self.preferred_max_items
17
+ max = self.preferred_max_items.to_i
18
18
  items_count = object.line_items.map(&:quantity).sum
19
19
  items_count.times do |i|
20
20
  # check max value to avoid divide by 0 errors
21
21
  if (max == 0 && i == 0) || (max > 0) && (i % max == 0)
22
- sum += self.preferred_first_item
22
+ sum += self.preferred_first_item.to_f
23
23
  else
24
- sum += self.preferred_additional_item
24
+ sum += self.preferred_additional_item.to_f
25
25
  end
26
26
  end
27
27
 
@@ -298,6 +298,11 @@ module Spree
298
298
  line_items.detect { |line_item| line_item.variant_id == variant.id }
299
299
  end
300
300
 
301
+ def quantity_of(variant)
302
+ line_item = line_items.find { |line_item| line_item.variant_id == variant.id }
303
+ line_item ? line_item.quantity : 0
304
+ end
305
+
301
306
  def ship_total
302
307
  adjustments.shipping.map(&:amount).sum
303
308
  end
@@ -517,7 +522,7 @@ module Spree
517
522
  # Adjustments will check if they are still eligible. Ineligible adjustments are preserved but not counted
518
523
  # towards adjustment_total.
519
524
  def update_adjustments
520
- self.adjustments.reload.each(&:update!)
525
+ self.adjustments.reload.each { |adjustment| adjustment.update!(self) }
521
526
  end
522
527
 
523
528
  # Determine if email is required (we don't want validation errors before we hit the checkout)
@@ -12,7 +12,8 @@ module Spree
12
12
  # update the order totals, etc.
13
13
  after_save :update_order
14
14
 
15
- accepts_nested_attributes_for :source
15
+ attr_accessor :source_attributes
16
+ after_initialize :build_source
16
17
 
17
18
  scope :from_creditcard, where(:source_type => 'Spree::Creditcard')
18
19
  scope :with_state, lambda { |s| where(:state => s) }
@@ -60,11 +61,13 @@ module Spree
60
61
  started_processing!
61
62
  source.credit(self, amount)
62
63
  end
64
+
65
+ # see https://github.com/spree/spree/issues/981
66
+ def build_source
67
+ return if source_attributes.nil?
63
68
 
64
- # With nested attributes, Rails calls build_[association_name] for the nested model which won't work for a polymorphic association
65
- def build_source(params, opts)
66
69
  if payment_method and payment_method.payment_source_class
67
- self.source = payment_method.payment_source_class.new(params)
70
+ self.source = payment_method.payment_source_class.new(source_attributes)
68
71
  end
69
72
  end
70
73
 
@@ -3,6 +3,9 @@
3
3
  # StoreInstance has a persistence flag that is on by default,
4
4
  # but we disable database persistence in testing to speed up tests
5
5
  #
6
+
7
+ require 'singleton'
8
+
6
9
  module Spree::Preferences
7
10
 
8
11
  class StoreInstance
@@ -70,6 +70,13 @@ module Spree
70
70
 
71
71
  alias :options :product_option_types
72
72
 
73
+ after_initialize :ensure_master
74
+
75
+ def ensure_master
76
+ return unless self.new_record?
77
+ self.master ||= Variant.new
78
+ end
79
+
73
80
  def to_param
74
81
  return permalink if permalink.present?
75
82
  name.to_url
@@ -180,8 +187,7 @@ module Spree
180
187
  private
181
188
  def recalculate_count_on_hand
182
189
  product_count_on_hand = has_variants? ?
183
- variants.inject(0) { |acc, v| acc + v.count_on_hand } :
184
- (master ? master.count_on_hand : 0)
190
+ variants.sum(:count_on_hand) : (master ? master.count_on_hand : 0)
185
191
  self.count_on_hand = product_count_on_hand
186
192
  end
187
193
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h1><%= t(:edit_general_settings) %></h1>
4
4
 
5
- <%= form_tag admin_general_settings_path, :method => :put do |form| %>
5
+ <%= form_tag admin_general_settings_path, :method => :put do %>
6
6
  <fieldset id="preferences" data-hook>
7
7
  <% @preferences.each do |key|
8
8
  type = Spree::Config.preference_type(key) %>
@@ -20,7 +20,7 @@
20
20
  <th></th>
21
21
  </tr>
22
22
  <% @option_types.each do |option_type| %>
23
- <tr id="<%= dom_id option_type %>" data-hook="option_row">
23
+ <tr class="spree_option_type" id="<%= dom_id option_type %>" data-hook="option_row">
24
24
  <td><span class="handle"></span> <%= option_type.name %></td>
25
25
  <td class="presentation"><%= option_type.presentation %></td>
26
26
  <td class="actions">
@@ -1,2 +1,50 @@
1
- <%# This redirection is present ONLY to simplify overloading of the admin order summary format %>
2
- <%= render :partial => 'spree/shared/order_details', :locals => { :order => order } %>
1
+ <table class="index" data-hook="order_details">
2
+ <tbody id="line-items" data-hook>
3
+ <tr data-hook="order_details_line_items_headers">
4
+ <th><%= t(:item_description) %></th>
5
+ <th class="price"><%= t(:price) %></th>
6
+ <th class="qty"><%= t(:qty) %></th>
7
+ <th class="total"><span><%= t(:total) %></span></th>
8
+ </tr>
9
+
10
+ <% @order.line_items.each do |item| %>
11
+ <tr data-hook="order_details_line_item_row">
12
+ <td width="300"><%= item.variant.product.name %> <%= "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? %></td>
13
+ <td class="price"><%= number_to_currency item.price %></td>
14
+ <td class="qty"><%= item.quantity %></td>
15
+ <td class="total"><span><%= number_to_currency (item.price * item.quantity) %></span></td>
16
+ </tr>
17
+ <% end %>
18
+ </tbody>
19
+ <tbody id="subtotal" data-hook="order_details_subtotal">
20
+ <tr class="total" id="subtotal-row">
21
+ <td colspan="3"><b><%= t(:subtotal) %>:</b></td>
22
+ <td class="total"><span><%= number_to_currency @order.item_total %></span></td>
23
+ </tr>
24
+ </tbody>
25
+ <tbody id="order-charges" data-hook="order_details_adjustments">
26
+ <% @order.adjustments.eligible.each do |adjustment| %>
27
+ <% next if (adjustment.originator_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
28
+ <tr class="total">
29
+ <td colspan="3"><strong><%= adjustment.label %></strong></td>
30
+ <td class="total"><span><%= number_to_currency adjustment.amount %></span></td>
31
+ </tr>
32
+ <% end %>
33
+ </tbody>
34
+ <tbody id="order-total" data-hook="order_details_total">
35
+ <tr class="total">
36
+ <td colspan="3"><b><%= t(:order_total) %>:</b></td>
37
+ <td class="total"><span id="order_total"><%= number_to_currency @order.total %></span></td>
38
+ </tr>
39
+ </tbody>
40
+ <% if order.price_adjustment_totals.present? %>
41
+ <tbody id="price-adjustments" data-hook="order_details_price_adjustments">
42
+ <% @order.price_adjustment_totals.keys.each do |key| %>
43
+ <tr class="total">
44
+ <td colspan="3"><strong><%= key %></strong></td>
45
+ <td class="total"><span><%= number_to_currency @order.price_adjustment_totals[key] %></span></td>
46
+ </tr>
47
+ <% end %>
48
+ </tbody>
49
+ <% end %>
50
+ </table>
@@ -1,4 +1,4 @@
1
- <h1><%== t(:editing_product) + " &ldquo;#{@product.name}&rdquo;" %></h1>
1
+ <h1><%= t(:editing_product) %> &ldquo;<%= @product.name %>&rdquo;</h1>
2
2
 
3
3
  <% content_for :sidebar do %>
4
4
 
@@ -1,3 +1,4 @@
1
+ <div class="columns alpha six">
1
2
  <fieldset id="billing" data-hook>
2
3
  <%= form.fields_for :bill_address do |bill_form| %>
3
4
  <legend><%= t(:billing_address) %></legend>
@@ -25,6 +26,11 @@
25
26
  <%= bill_form.text_field :address2 %>
26
27
  </p>
27
28
 
29
+ <p class="field" id="bcity">
30
+ <%= bill_form.label :city, t(:city) %><span class="req">*</span><br />
31
+ <%= bill_form.text_field :city, :class => 'required' %>
32
+ </p>
33
+
28
34
  <p class="field" id="bcountry">
29
35
  <%= bill_form.label :country_id, t(:country) %><span class="req">*</span><br />
30
36
  <span id="bcountry">
@@ -56,11 +62,6 @@
56
62
  </p>
57
63
  <% end %>
58
64
 
59
- <p class="field" id="bcity">
60
- <%= bill_form.label :city, t(:city) %><span class="req">*</span><br />
61
- <%= bill_form.text_field :city, :class => 'required' %>
62
- </p>
63
-
64
65
  <p class="field" id="bzipcode">
65
66
  <%= bill_form.label :zipcode, t(:zip) %><span class="req">*</span><br />
66
67
  <%= bill_form.text_field :zipcode, :class => 'required' %>
@@ -78,7 +79,9 @@
78
79
  </div>
79
80
  <% end %>
80
81
  </fieldset>
82
+ </div>
81
83
 
84
+ <div class="columns omega six">
82
85
  <fieldset id="shipping" data-hook>
83
86
  <%= form.fields_for :ship_address do |ship_form| %>
84
87
  <legend><%= t(:shipping_address) %></legend>
@@ -110,6 +113,11 @@
110
113
  <%= ship_form.text_field :address2 %>
111
114
  </p>
112
115
 
116
+ <p class="field" id="scity">
117
+ <%= ship_form.label :city, t(:city) %><span class="req">*</span><br />
118
+ <%= ship_form.text_field :city, :class => 'required' %>
119
+ </p>
120
+
113
121
  <p class="field" id="scountry">
114
122
  <%= ship_form.label :country_id, t(:country) %><span class="req">*</span><br />
115
123
  <span id="scountry">
@@ -141,12 +149,6 @@
141
149
  </p>
142
150
  <% end %>
143
151
 
144
- <p class="field" id="scity">
145
- <%= ship_form.label :city, t(:city) %><span class="req">*</span><br />
146
- <%= ship_form.text_field :city, :class => 'required' %>
147
- </p>
148
-
149
-
150
152
  <p class="field" id="szipcode">
151
153
  <%= ship_form.label :zipcode, t(:zip) %><span class="req">*</span><br />
152
154
  <%= ship_form.text_field :zipcode, :class => 'required' %>
@@ -164,8 +166,8 @@
164
166
  </div>
165
167
  <% end %>
166
168
  </fieldset>
167
-
168
- <hr class="space" />
169
+ </div>
170
+ <hr class="clear" />
169
171
  <div class="form-buttons" data-hook="buttons">
170
172
  <%= submit_tag t(:save_and_continue), :class => 'continue button primary' %>
171
173
  </div>