spree_core 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
  3. data/app/assets/javascripts/admin/address_states.js +1 -1
  4. data/app/assets/javascripts/admin/admin.js.erb +18 -13
  5. data/app/assets/javascripts/admin/calculator.js +2 -2
  6. data/app/assets/javascripts/admin/checkouts/edit.js +3 -1
  7. data/app/assets/javascripts/admin/image_settings.js.erb +5 -5
  8. data/app/assets/javascripts/admin/orders/edit.js +1 -1
  9. data/app/assets/javascripts/admin/payments/new.js +9 -2
  10. data/app/assets/javascripts/admin/spree_core.js +13 -1
  11. data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +2 -1
  12. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +23 -19
  13. data/app/assets/javascripts/spree.js.coffee +37 -0
  14. data/app/assets/javascripts/store/checkout.js.coffee +8 -0
  15. data/app/assets/javascripts/store/product.js.coffee +1 -1
  16. data/app/assets/javascripts/store/spree_core.js +1 -0
  17. data/app/assets/stylesheets/admin/components/_sidebar.scss +7 -6
  18. data/app/assets/stylesheets/admin/components/_states.scss +16 -12
  19. data/app/assets/stylesheets/admin/globals/_variables.scss +102 -96
  20. data/app/assets/stylesheets/admin/shared/_forms.scss +2 -1
  21. data/app/assets/stylesheets/admin/shared/_icons.scss +2 -1
  22. data/app/assets/stylesheets/admin/shared/_layout.scss +4 -1
  23. data/app/assets/stylesheets/admin/shared/_tables.scss +8 -0
  24. data/app/assets/stylesheets/store/screen.css.scss +28 -16
  25. data/app/assets/stylesheets/store/variables.css.scss +4 -2
  26. data/app/controllers/spree/admin/adjustments_controller.rb +7 -3
  27. data/app/controllers/spree/admin/base_controller.rb +10 -5
  28. data/app/controllers/spree/admin/line_items_controller.rb +3 -2
  29. data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -2
  30. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  31. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  32. data/app/controllers/spree/admin/resource_controller.rb +5 -5
  33. data/app/controllers/spree/admin/shipments_controller.rb +1 -1
  34. data/app/controllers/spree/admin/taxons_controller.rb +1 -1
  35. data/app/controllers/spree/admin/users_controller.rb +96 -0
  36. data/app/controllers/spree/checkout_controller.rb +18 -7
  37. data/app/controllers/spree/locale_controller.rb +1 -1
  38. data/app/controllers/spree/orders_controller.rb +20 -2
  39. data/app/controllers/spree/taxons_controller.rb +8 -2
  40. data/app/helpers/spree/admin/images_helper.rb +6 -2
  41. data/app/helpers/spree/admin/navigation_helper.rb +23 -3
  42. data/app/helpers/spree/base_helper.rb +9 -5
  43. data/app/helpers/spree/orders_helper.rb +13 -0
  44. data/app/helpers/spree/products_helper.rb +9 -4
  45. data/app/mailers/spree/base_mailer.rb +16 -0
  46. data/app/mailers/spree/order_mailer.rb +12 -11
  47. data/app/mailers/spree/shipment_mailer.rb +4 -7
  48. data/app/mailers/spree/test_mailer.rb +2 -3
  49. data/app/models/spree/adjustment.rb +1 -1
  50. data/app/models/spree/app_configuration.rb +9 -3
  51. data/app/models/spree/calculator/default_tax.rb +5 -1
  52. data/app/models/spree/calculator/per_item.rb +1 -1
  53. data/app/models/spree/classification.rb +7 -0
  54. data/app/models/spree/credit_card.rb +1 -5
  55. data/app/models/spree/gateway.rb +10 -2
  56. data/app/models/spree/gateway/bogus.rb +5 -5
  57. data/app/models/spree/inventory_unit.rb +4 -4
  58. data/app/models/spree/line_item.rb +1 -1
  59. data/app/models/spree/order.rb +15 -35
  60. data/app/models/spree/order/checkout.rb +52 -0
  61. data/app/models/spree/order_populator.rb +11 -3
  62. data/app/models/spree/order_updater.rb +3 -4
  63. data/app/models/spree/payment.rb +23 -1
  64. data/app/models/spree/payment/processing.rb +18 -5
  65. data/app/models/spree/payment_method.rb +4 -0
  66. data/app/models/spree/price.rb +2 -3
  67. data/app/models/spree/product.rb +12 -4
  68. data/app/models/spree/product/scopes.rb +29 -16
  69. data/app/models/spree/return_authorization.rb +1 -1
  70. data/app/models/spree/shipment.rb +1 -1
  71. data/app/models/spree/taxon.rb +21 -6
  72. data/app/models/spree/variant.rb +7 -2
  73. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
  74. data/app/views/spree/admin/countries/index.html.erb +1 -0
  75. data/app/views/spree/admin/general_settings/edit.html.erb +10 -2
  76. data/app/views/spree/admin/images/index.html.erb +7 -3
  77. data/app/views/spree/admin/mail_methods/index.html.erb +2 -2
  78. data/app/views/spree/admin/orders/_form.html.erb +3 -3
  79. data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
  80. data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
  81. data/app/views/spree/admin/orders/index.html.erb +60 -52
  82. data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
  83. data/app/views/spree/admin/payment_methods/index.html.erb +39 -35
  84. data/app/views/spree/admin/payments/_list.html.erb +1 -1
  85. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +10 -10
  86. data/app/views/spree/admin/products/_form.html.erb +7 -12
  87. data/app/views/spree/admin/products/index.html.erb +13 -15
  88. data/app/views/spree/admin/products/new.html.erb +3 -1
  89. data/app/views/spree/admin/return_authorizations/_form.html.erb +7 -7
  90. data/app/views/spree/admin/return_authorizations/edit.html.erb +17 -11
  91. data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
  92. data/app/views/spree/admin/return_authorizations/new.html.erb +13 -6
  93. data/app/views/spree/admin/shared/_alert.html.erb +1 -1
  94. data/app/views/spree/admin/shared/_configuration_menu.html.erb +6 -2
  95. data/app/views/spree/admin/shared/_order_details.html.erb +6 -6
  96. data/app/views/spree/admin/shared/_order_tabs.html.erb +20 -37
  97. data/app/views/spree/admin/shared/_routes.html.erb +1 -1
  98. data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
  99. data/app/views/spree/admin/shared/_update_order_state.js +1 -1
  100. data/app/views/spree/admin/shipments/_form.html.erb +24 -24
  101. data/app/views/spree/admin/shipments/edit.html.erb +13 -13
  102. data/app/views/spree/admin/shipments/index.html.erb +35 -31
  103. data/app/views/spree/admin/shipping_methods/index.html.erb +35 -32
  104. data/app/views/spree/admin/tax_rates/_form.html.erb +2 -1
  105. data/app/views/spree/admin/taxons/_form.html.erb +17 -0
  106. data/app/views/spree/admin/taxons/edit.html.erb +3 -1
  107. data/app/views/spree/admin/trackers/_form.html.erb +2 -2
  108. data/app/views/spree/admin/trackers/index.html.erb +2 -2
  109. data/app/views/spree/admin/users/_form.html.erb +37 -0
  110. data/app/views/spree/admin/users/edit.html.erb +28 -0
  111. data/app/views/spree/admin/users/index.html.erb +53 -0
  112. data/app/views/spree/admin/users/new.html.erb +23 -0
  113. data/app/views/spree/admin/users/show.html.erb +21 -0
  114. data/app/views/spree/admin/variants/edit.html.erb +6 -4
  115. data/app/views/spree/admin/variants/index.html.erb +1 -1
  116. data/app/views/spree/admin/zones/_form.html.erb +4 -4
  117. data/app/views/spree/admin/zones/index.html.erb +3 -1
  118. data/app/views/spree/checkout/_delivery.html.erb +1 -1
  119. data/app/views/spree/checkout/_payment.html.erb +1 -1
  120. data/app/views/spree/checkout/_summary.html.erb +2 -2
  121. data/app/views/spree/checkout/payment/_gateway.html.erb +6 -6
  122. data/app/views/spree/layouts/spree_application.html.erb +0 -1
  123. data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
  124. data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
  125. data/app/views/spree/orders/_adjustments.html.erb +1 -1
  126. data/app/views/spree/orders/_line_item.html.erb +2 -2
  127. data/app/views/spree/orders/edit.html.erb +1 -1
  128. data/app/views/spree/payments/_payment.html.erb +16 -0
  129. data/app/views/spree/products/_cart_form.html.erb +2 -2
  130. data/app/views/spree/products/_thumbnails.html.erb +3 -3
  131. data/app/views/spree/products/index.html.erb +1 -1
  132. data/app/views/spree/shared/_google_analytics.html.erb +1 -1
  133. data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
  134. data/app/views/spree/shared/_order_details.html.erb +10 -24
  135. data/app/views/spree/shared/_products.html.erb +1 -1
  136. data/app/views/spree/shared/_search.html.erb +1 -1
  137. data/app/views/spree/taxons/show.html.erb +1 -1
  138. data/config/initializers/check_for_orphaned_preferences.rb +5 -2
  139. data/config/locales/en.yml +24 -5
  140. data/config/routes.rb +4 -3
  141. data/db/default/spree/countries.rb +229 -0
  142. data/db/default/spree/roles.rb +2 -0
  143. data/db/default/spree/states.rb +57 -0
  144. data/db/default/spree/zones.rb +17 -0
  145. data/db/migrate/20130207155350_add_order_id_index_to_payments.rb +9 -0
  146. data/db/migrate/20130208032954_add_primary_to_spree_products_taxons.rb +5 -0
  147. data/db/migrate/20130222032153_add_order_id_index_to_shipments.rb +5 -0
  148. data/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb +5 -0
  149. data/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb +5 -0
  150. data/db/migrate/20130319062004_change_orders_total_precision.rb +8 -0
  151. data/db/migrate/20130319063911_change_spree_payments_amount_precision.rb +7 -0
  152. data/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb +7 -0
  153. data/db/migrate/20130319082943_change_adjustments_amount_precision.rb +7 -0
  154. data/db/migrate/20130328195253_add_seo_metas_to_taxons.rb +9 -0
  155. data/lib/generators/spree/dummy/templates/rails/database.yml +9 -6
  156. data/lib/spree/core/calculated_adjustments.rb +1 -1
  157. data/lib/spree/core/controller_helpers/auth.rb +3 -3
  158. data/lib/spree/core/controller_helpers/common.rb +1 -11
  159. data/lib/spree/core/controller_helpers/order.rb +15 -12
  160. data/lib/spree/core/engine.rb +5 -1
  161. data/lib/spree/core/mail_interceptor.rb +4 -6
  162. data/lib/spree/core/mail_settings.rb +52 -23
  163. data/lib/spree/core/permalinks.rb +1 -3
  164. data/lib/spree/core/testing_support/authorization_helpers.rb +1 -1
  165. data/lib/spree/core/testing_support/capybara_ext.rb +30 -0
  166. data/lib/spree/core/testing_support/common_rake.rb +8 -0
  167. data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
  168. data/lib/spree/core/testing_support/factories/product_factory.rb +7 -2
  169. data/lib/spree/core/testing_support/factories/variant_factory.rb +4 -2
  170. data/lib/spree/core/validators/email.rb +1 -1
  171. data/lib/spree/core/version.rb +1 -1
  172. data/lib/spree/money.rb +14 -3
  173. data/lib/spree/product_filters.rb +1 -1
  174. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +3 -2
  175. data/vendor/assets/javascripts/jsuri.js +2 -0
  176. data/vendor/assets/javascripts/modernizr.js +3 -3
  177. metadata +78 -69
  178. data/db/default/spree/countries.yml +0 -1589
  179. data/db/default/spree/roles.yml +0 -5
  180. data/db/default/spree/states.yml +0 -256
  181. data/db/default/spree/zone_members.yml +0 -169
  182. data/db/default/spree/zones.yml +0 -13
@@ -8,10 +8,10 @@
8
8
  </tr>
9
9
  </thead>
10
10
  <tbody>
11
- <% @order.line_items.each do |item| %>
11
+ <% order.line_items.each do |item| %>
12
12
  <tr data-hook="order_details_line_item_row" class="<%= cycle('odd', 'even')%>">
13
13
  <td width="300"><%= item.variant.product.name %> <%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %></td>
14
- <td class="price"><%= item.variant.display_amount %></td>
14
+ <td class="price"><%= item.single_money %></td>
15
15
  <td class="qty"><%= item.quantity %></td>
16
16
  <td class="total"><span><%= item.display_amount %></span></td>
17
17
  </tr>
@@ -20,11 +20,11 @@
20
20
  <tbody id="subtotal" data-hook="order_details_subtotal" class="with-border">
21
21
  <tr class="total" id="subtotal-row">
22
22
  <td colspan="3"><b><%= t(:subtotal) %>:</b></td>
23
- <td class="total"><span><%= @order.display_item_total %></span></td>
23
+ <td class="total"><span><%= order.display_item_total %></span></td>
24
24
  </tr>
25
25
  </tbody>
26
26
  <tbody id="order-charges" data-hook="order_details_adjustments" class="with-border">
27
- <% @order.adjustments.eligible.each do |adjustment| %>
27
+ <% order.adjustments.eligible.each do |adjustment| %>
28
28
  <% next if (adjustment.originator_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
29
29
  <tr class="total">
30
30
  <td colspan="3"><strong><%= adjustment.label %>:</strong></td>
@@ -35,12 +35,12 @@
35
35
  <tbody id="order-total" data-hook="order_details_total" class="with-border grand-total">
36
36
  <tr>
37
37
  <td colspan="3" ><%= t(:order_total) %>:</td>
38
- <td class="total" id="order-total"><span id="order_total"><%= @order.display_total %></span></td>
38
+ <td class="total" id="order-total"><span id="order_display_total"><%= order.display_total %></span></td>
39
39
  </tr>
40
40
  </tbody>
41
41
  <% if order.price_adjustment_totals.present? %>
42
42
  <tbody id="price-adjustments" data-hook="order_details_price_adjustments">
43
- <% @order.price_adjustment_totals.each do |label, total| %>
43
+ <% order.price_adjustment_totals.each do |label, total| %>
44
44
  <tr>
45
45
  <td colspan="3"><strong><%= label %></strong></td>
46
46
  <td class="total"><span><%= total %></span></td>
@@ -12,7 +12,7 @@
12
12
  <dt id="order_status" data-hook><%= t(:status) %>:</dt>
13
13
  <dd><span class="state <%= @order.state %>"><%= t(@order.state, :scope => :order_state) %></span></dd>
14
14
  <dt data-hook><%= t(:total) %>:</dt>
15
- <dd id='order_total'><%= @order.display_total %></dd>
15
+ <dd id='order_total'><%= @order.display_total.to_html %></dd>
16
16
 
17
17
  <% if @order.completed? %>
18
18
  <dt><%= t(:shipment) %>: </dt>
@@ -20,51 +20,34 @@
20
20
  <dt><%= t(:payment) %>: </dt>
21
21
  <dd id='payment_status'><span class="state <%= @order.payment_state %>"><%= t(@order.payment_state, :scope => :payment_states, :default => [:missing, "none"]) %></span></dd>
22
22
  <dt data-hook><%= t(:date_completed) %>:</dt>
23
- <dd id='date_complete'><%= pretty_time(@order.completed? ? @order.completed_at : @order.created_at) %></dd>
23
+ <dd id='date_complete'><%= pretty_time(@order.completed_at) %></dd>
24
24
  <% end %>
25
25
  </dl>
26
26
  </header>
27
27
 
28
28
  <nav class="menu">
29
29
  <ul data-hook="admin_order_tabs">
30
- <% unless @order.completed? %>
31
- <li<%== ' class="active"' if current == 'Order Details' %>>
32
- <%= link_to_with_icon 'icon-edit', t(:order_details), edit_admin_order_url(@order) %>
33
- </li>
34
- <li<%== ' class="active"' if current == 'Customer Details' %>>
35
- <%= link_to_with_icon 'icon-user', t(:customer_details), admin_order_customer_url(@order) %>
36
- </li>
37
- <li<%== ' class="active"' if current == 'Shipments' %>>
38
- <%=link_to_with_icon 'icon-road', t(:shipments), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : edit_admin_order_shipment_url(@order, @order.shipment) %>
39
- </li>
40
- <li<%== ' class="active"' if current == 'Adjustments' %>>
41
- <%= link_to_with_icon 'icon-cogs', t(:adjustments), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : admin_order_adjustments_url(@order) %>
42
- </li>
43
- <li<%== ' class="active"' if current == 'Payments' %>>
44
- <%= link_to_with_icon 'icon-credit-card', t(:payments), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : new_admin_order_payment_url(@order) %>
45
- </li>
46
-
47
- <% else %>
48
- <li<%== ' class="active"' if current == 'Order Details' %>>
49
- <%= link_to_with_icon 'icon-edit', t(:order_details), edit_admin_order_url(@order) %>
50
- </li>
51
- <li<%== ' class="active"' if current == 'Customer Details' %>>
52
- <%= link_to_with_icon 'icon-user', t(:customer_details), admin_order_customer_url(@order) %>
53
- </li>
54
- <li<%== ' class="active"' if current == 'Adjustments' %>>
55
- <%= link_to_with_icon 'icon-cogs', t(:adjustments), admin_order_adjustments_url(@order) %>
56
- </li>
57
- <li<%== ' class="active"' if current == 'Payments' %>>
58
- <%= link_to_with_icon 'icon-credit-card', t(:payments), admin_order_payments_url(@order) %>
59
- </li>
60
- <li<%== ' class="active"' if current == 'Shipments' %>>
61
- <%= link_to_with_icon 'icon-road', t(:shipments), admin_order_shipments_url(@order) %>
62
- </li>
63
- <li<%== ' class="active"' if current == 'Return Authorizations' %>>
30
+ <li<%== ' class="active"' if current == 'Order Details' %>>
31
+ <%= link_to_with_icon 'icon-edit', t(:order_details), edit_admin_order_url(@order) %>
32
+ </li>
33
+ <li<%== ' class="active"' if current == 'Customer Details' %>>
34
+ <%= link_to_with_icon 'icon-user', t(:customer_details), admin_order_customer_url(@order) %>
35
+ </li>
36
+ <li<%== ' class="active"' if current == 'Adjustments' %>>
37
+ <%= link_to_with_icon 'icon-cogs', t(:adjustments), admin_order_adjustments_url(@order) %>
38
+ </li>
39
+ <li<%== ' class="active"' if current == 'Payments' %>>
40
+ <%= link_to_with_icon 'icon-credit-card', t(:payments), admin_order_payments_url(@order) %>
41
+ </li>
42
+ <li<%== ' class="active"' if current == 'Shipments' %>>
43
+ <%= link_to_with_icon 'icon-road', t(:shipments), admin_order_shipments_url(@order) %>
44
+ </li>
45
+ <% if @order.completed? %>
46
+ <li<%== ' class="active"' if current == 'Return Authorizations' %>>
64
47
  <%= link_to_with_icon 'icon-share-alt', t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
65
48
  </li>
66
49
  <% end %>
67
- </ul>
50
+ </ul>
68
51
  </nav>
69
52
 
70
53
 
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  Spree.routes = <%== {
3
3
  :variants_search => spree.admin_search_variants_path(:format => 'json'),
4
- :taxon_search => spree.search_admin_taxons_path(:format => 'json'),
4
+ :taxon_search => spree.search_admin_taxons_url(:format => 'json'),
5
5
  :user_search => spree.admin_search_users_path(:format => 'json'),
6
6
  :product_search => spree.search_admin_products_path(:format => 'json')
7
7
  }.to_json %>;
@@ -1,5 +1,4 @@
1
- <%= tab :overview, :route => :admin, :icon => 'icon-dashboard' %>
2
1
  <%= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations, :icon => 'icon-shopping-cart' %>
3
- <%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons, :icon => 'icon-th-large' %>
2
+ <%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :icon => 'icon-th-large' %>
4
3
  <%= tab :reports, :icon => 'icon-file' %>
5
4
  <%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration', :icon => 'icon-wrench', :url => spree.edit_admin_general_settings_path %>
@@ -1,5 +1,5 @@
1
1
  $('#order_tab_summary h5#order_status').html('<%= j t(:status) %>: <%= j t(@order.state, :scope => :order_state) %>');
2
- $('#order_tab_summary h5#order_total').html('<%= j t(:total) %>: <%= j @order.display_total.to_s %>');
2
+ $('#order_tab_summary h5#order_total').html('<%= j t(:total) %>: <%= j @order.display_total.to_html %>');
3
3
 
4
4
  <% if @order.completed? %>
5
5
  $('#order_tab_summary h5#payment_status').html('<%= j t(:payment) %>: <%= j t(@order.payment_state, :scope => :payment_states, :default => [:missing, "none"]) %>');
@@ -8,24 +8,24 @@
8
8
  <th><%= t(:item_description) %></th>
9
9
  <th><%= t(:status) %></th>
10
10
  <th><%= t(:note) %></th>
11
- </tr>
11
+ </tr>
12
12
  </thead>
13
13
  <tbody>
14
14
  <% @shipment.order.inventory_units.each do |inventory_unit| %>
15
15
  <tr data-hook="shipments_row" class="<%= cycle('odd', 'even')%>">
16
- <td style="text-align:center;">
16
+ <td class="align-center">
17
17
  <%= check_box_tag "inventory_units[#{inventory_unit.id}]",
18
18
  :true,
19
19
  (inventory_unit.shipment == @shipment),
20
- { :disabled => %w(shipped backordered).include?(inventory_unit.state),
20
+ { :disabled => %w(shipped backordered returned).include?(inventory_unit.state),
21
21
  :class => 'inventory_unit'} %>
22
22
  </td>
23
- <td style="vertical-align:top; width:120px;"><%= inventory_unit.variant.sku %></td>
24
- <td style="width:300px;">
23
+ <td><%= inventory_unit.variant.sku %></td>
24
+ <td>
25
25
  <%=inventory_unit.variant.product.name %>
26
26
  <%= '(' + variant_options(inventory_unit.variant) + ')' unless inventory_unit.variant.option_values.empty? %>
27
27
  </td>
28
- <td><%= t(inventory_unit.state) %></td>
28
+ <td class="align-center"><span class="state <%= inventory_unit.state %>"><%= t(inventory_unit.state) %></span></td>
29
29
  <td>
30
30
  <% if inventory_unit.shipment == @shipment %>
31
31
  <%= t(:included_in_this_shipment) %>
@@ -46,26 +46,26 @@
46
46
  </div>
47
47
 
48
48
  <fieldset data-hook="admin_shipment_form_details" class="no-border-bottom">
49
- <legend><%= t(:shipment_details) %></legend>
49
+ <legend><%= t(:shipment_details) %></legend>
50
50
 
51
- <div class="block-table">
52
- <div class="field table-cell">
53
- <%= shipment_form.label :shipping_method_id, t(:shipping_method) + ':' %>
54
- <%= shipment_form.select :shipping_method_id, @shipping_methods.map {|sm| ["#{sm.name} - #{sm.zone.name}", sm.id] }, {}, {:class => 'select2 fullwidth'} %>
55
- </div>
51
+ <div class="block-table">
52
+ <div class="field table-cell">
53
+ <%= shipment_form.label :shipping_method_id, t(:shipping_method) + ':' %>
54
+ <%= shipment_form.select :shipping_method_id, @shipping_methods.map {|sm| ["#{sm.name} - #{sm.zone.name}", sm.id] }, {}, {:class => 'select2 fullwidth'} %>
55
+ </div>
56
+
57
+ <div class="field table-cell">
58
+ <%= shipment_form.label :tracking, t(:tracking) + ':' %>
59
+ <%= shipment_form.text_field :tracking, :class => 'fullwidth' %>
60
+ </div>
56
61
 
62
+ <% if Spree::Config[:shipping_instructions] %>
57
63
  <div class="field table-cell">
58
- <%= shipment_form.label :tracking, t(:tracking) + ':' %>
59
- <%= shipment_form.text_field :tracking, :class => 'fullwidth' %>
64
+ <%= shipment_form.label :special_instructions, t(:special_instructions) + ':' %>
65
+ <%= shipment_form.text_area :special_instructions, :class => 'fullwidth' %>
60
66
  </div>
61
-
62
- <% if Spree::Config[:shipping_instructions] %>
63
- <div class="field table-cell">
64
- <%= shipment_form.label :special_instructions, t(:special_instructions) + ':' %>
65
- <%= shipment_form.text_area :special_instructions, :class => 'fullwidth' %>
66
- </div>
67
- <% end %>
68
- </div>
69
-
70
- </div>
67
+ <% end %>
68
+ </div>
69
+
70
+ </fieldset>
71
71
  </div>
@@ -3,18 +3,18 @@
3
3
  <li>
4
4
  <%= button_link_to t(:ship), fire_admin_order_shipment_path(@order, @shipment, :e => 'ship'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
5
5
  </li>
6
- <% end %>
6
+ <% end %>
7
7
  <li><%= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left' %></li>
8
8
  <% end %>
9
9
 
10
10
  <%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Shipments' } %>
11
11
 
12
12
  <% content_for :page_title do %>
13
- <i class="icon-arrow-right"></i> <%= t(:shipments) %> <i class="icon-arrow-right"></i> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :state_names, :default => @shipment.state.to_s.humanize) %>)
13
+ <i class="icon-arrow-right"></i> <%= t(:shipments) %> <i class="icon-arrow-right"></i> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :shipment_states, :default => @shipment.state.to_s.humanize) %>)
14
14
  <% end %>
15
15
 
16
16
  <div data-hook="admin_shipment_edit_header">
17
-
17
+
18
18
  <% if @shipment.cost %>
19
19
  <h5 class="outstanding-balance"><%= t(:charges) %> <span class="green"><%= @shipment.display_cost %></span></h5>
20
20
  <% end %>
@@ -27,17 +27,17 @@
27
27
  <fieldset class="no-border-top">
28
28
  <%= render :partial => 'form', :locals => { :shipment_form => shipment_form } %>
29
29
 
30
- <div data-hook="admin_shipment_edit_form_buttons">
31
- <div class="filter-actions actions">
32
- <% if @shipment.editable_by?(try_spree_current_user) %>
33
- <%= button @order.cart? ? t(:continue) : t(:update), @order.cart? ? 'icon-arrow-right' : 'icon-refresh' %>
34
- <span class="or"><%= t(:or) %></span>
35
- <%= button_link_to t(:cancel), admin_order_shipments_path(@order), :icon => 'icon-remove' %>
36
- <% else %>
37
- <%= button_link_to t(:back), edit_admin_order_shipment_path(@order), :icon => 'icon-arrow-left' %>
38
- <% end %>
39
- </div>
30
+
31
+ <div class="form-buttons filter-actions actions" data-hook="admin_shipment_edit_form_buttons">
32
+ <% if @shipment.editable_by?(try_spree_current_user) %>
33
+ <%= button @order.cart? ? t(:continue) : t(:update), @order.cart? ? 'icon-arrow-right' : 'icon-refresh' %>
34
+ <span class="or"><%= t(:or) %></span>
35
+ <%= button_link_to t(:cancel), admin_order_shipments_path(@order), :icon => 'icon-remove' %>
36
+ <% else %>
37
+ <%= button_link_to t(:back), edit_admin_order_shipment_path(@order), :icon => 'icon-arrow-left' %>
38
+ <% end %>
40
39
  </div>
40
+
41
41
  </fieldset>
42
42
  <% end %>
43
43
  </div>
@@ -11,35 +11,39 @@
11
11
  <i class="icon-arrow-right"></i> <%= t(:shipments) %>
12
12
  <% end %>
13
13
 
14
- <table class="index">
15
- <thead>
16
- <tr data-hook="admin_shipments_index_headers">
17
- <th><%= t(:shipment_number) %></th>
18
- <th><%= t(:shipping_method) %></th>
19
- <th><%= t(:shipping_cost) %></th>
20
- <th><%= t(:tracking) %></th>
21
- <th><%= t(:status) %></th>
22
- <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
23
- <th data-hook="admin_shipments_index_header_actions" class="actions"></th>
24
- </tr>
25
- </thead>
26
- <tbody>
27
- <% @shipments.each do |shipment| %>
28
- <tr id="<%= spree_dom_id shipment %>" data-hook="admin_shipments_index_rows" class="<%= cycle('odd', 'even') %>">
29
- <td><%= shipment.number %></td>
30
- <td><%= shipment.shipping_method.name if shipment.shipping_method %></td>
31
- <td><%= shipment.display_cost %></td>
32
- <td><%= shipment.tracking %></td>
33
- <td><%= t(shipment.state.to_sym, :scope => :state_names, :default => shipment.state.to_s.humanize) %></td>
34
- <td><%= shipment.shipped_at.to_s(:date_time24) if shipment.shipped_at %></td>
35
- <td class="actions" data-hook="admin_shipments_index_row_actions">
36
- <%= link_to_with_icon 'icon-edit', t(:edit), edit_admin_order_shipment_url(@order, shipment), :no_text => true, :data => {:action => 'edit'} %>
37
- <%= link_to_delete shipment, :url => admin_order_shipment_url(@order, shipment), :no_text => true %>
38
- </td>
14
+ <% if @shipments.any? %>
15
+ <table class="index">
16
+ <thead>
17
+ <tr data-hook="admin_shipments_index_headers">
18
+ <th><%= t(:shipment_number) %></th>
19
+ <th><%= t(:shipping_method) %></th>
20
+ <th><%= t(:shipping_cost) %></th>
21
+ <th><%= t(:tracking) %></th>
22
+ <th><%= t(:status) %></th>
23
+ <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
24
+ <th data-hook="admin_shipments_index_header_actions" class="actions"></th>
39
25
  </tr>
40
- <% end %>
41
- </tbody>
42
- </table>
43
- <div class="form-actions">
44
- <%= button_link_to t(:continue), admin_orders_url, :icon => 'icon-arrow-right' %>
45
- </div>
26
+ </thead>
27
+ <tbody>
28
+ <% @shipments.each do |shipment| %>
29
+ <tr id="<%= spree_dom_id shipment %>" data-hook="admin_shipments_index_rows" class="<%= cycle('odd', 'even') %>">
30
+ <td><%= shipment.number %></td>
31
+ <td><%= shipment.shipping_method.name if shipment.shipping_method %></td>
32
+ <td><%= shipment.display_cost %></td>
33
+ <td><%= shipment.tracking %></td>
34
+ <td><%= t(shipment.state.to_sym, :scope => :shipment_states, :default => shipment.state.to_s.humanize) %></td>
35
+ <td><%= shipment.shipped_at.to_s(:date_time24) if shipment.shipped_at %></td>
36
+ <td class="actions" data-hook="admin_shipments_index_row_actions">
37
+ <%= link_to_with_icon 'icon-edit', t(:edit), edit_admin_order_shipment_url(@order, shipment), :no_text => true, :data => {:action => 'edit'} %>
38
+ <%= link_to_delete shipment, :url => admin_order_shipment_url(@order, shipment), :no_text => true %>
39
+ </td>
40
+ </tr>
41
+ <% end %>
42
+ </tbody>
43
+ </table>
44
+ <div class="form-actions">
45
+ <%= button_link_to t(:continue), admin_orders_url, :icon => 'icon-arrow-right' %>
46
+ </div>
47
+ <% else %>
48
+ <div class="alpha twelve columns no-objects-found"><%= t(:no_shipments_for_this_order)%></div>
49
+ <% end %>
@@ -10,36 +10,39 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <table class="index" id='listing_shipping_methods'>
14
- <colgroup>
15
- <col style="width: 20%">
16
- <col style="width: 15%">
17
- <col style="width: 40%">
18
- <col style="width: 10%">
19
- <col style="width: 15%">
20
- </colgroup>
21
- <thead>
22
- <tr data-hook="admin_shipping_methods_index_headers">
23
- <th><%= t(:name) %></th>
24
- <th><%= t(:zone) %></th>
25
- <th><%= t(:calculator) %></th>
26
- <th><%= t(:display) %></th>
27
- <th data-hook="admin_shipping_methods_index_header_actions" class="actions"></th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- <% @shipping_methods.each do |shipping_method|%>
32
- <tr id="<%= spree_dom_id shipping_method %>" data-hook="admin_shipping_methods_index_rows" class="<%= cycle('odd', 'even')%>">
33
- <td><%= shipping_method.name %></td>
34
- <td><%= shipping_method.zone.name if shipping_method.zone %></td>
35
- <td><%= shipping_method.calculator.description %></td>
36
- <td class="align-center"><%= shipping_method.display_on.blank? ? t(:both) : t(shipping_method.display_on) %></td>
37
- <td data-hook="admin_shipping_methods_index_row_actions" class="actions">
38
- <%= link_to_edit shipping_method, :no_text => true %>
39
- <%= link_to_delete shipping_method, :no_text => true %>
40
- </td>
13
+ <% if @shipping_methods.any? %>
14
+ <table class="index" id='listing_shipping_methods'>
15
+ <colgroup>
16
+ <col style="width: 20%">
17
+ <col style="width: 15%">
18
+ <col style="width: 40%">
19
+ <col style="width: 10%">
20
+ <col style="width: 15%">
21
+ </colgroup>
22
+ <thead>
23
+ <tr data-hook="admin_shipping_methods_index_headers">
24
+ <th><%= t(:name) %></th>
25
+ <th><%= t(:zone) %></th>
26
+ <th><%= t(:calculator) %></th>
27
+ <th><%= t(:display) %></th>
28
+ <th data-hook="admin_shipping_methods_index_header_actions" class="actions"></th>
41
29
  </tr>
42
- <% end %>
43
- </tbody>
44
- </table>
45
-
30
+ </thead>
31
+ <tbody>
32
+ <% @shipping_methods.each do |shipping_method|%>
33
+ <tr id="<%= spree_dom_id shipping_method %>" data-hook="admin_shipping_methods_index_rows" class="<%= cycle('odd', 'even')%>">
34
+ <td><%= shipping_method.name %></td>
35
+ <td><%= shipping_method.zone.name if shipping_method.zone %></td>
36
+ <td><%= shipping_method.calculator.description %></td>
37
+ <td class="align-center"><%= shipping_method.display_on.blank? ? t(:both) : t(shipping_method.display_on) %></td>
38
+ <td data-hook="admin_shipping_methods_index_row_actions" class="actions">
39
+ <%= link_to_edit shipping_method, :no_text => true %>
40
+ <%= link_to_delete shipping_method, :no_text => true %>
41
+ </td>
42
+ </tr>
43
+ <% end %>
44
+ </tbody>
45
+ </table>
46
+ <% else %>
47
+ <div class="alpha twelve columns no-objects-found"><%= t(:no_shipping_methods_found) %></div>
48
+ <% end %>
@@ -11,6 +11,7 @@
11
11
  <div data-hook="rate" class="field">
12
12
  <%= f.label :amount, t(:rate) %>
13
13
  <%= f.text_field :amount, :class => 'fullwidth' %>
14
+ <p><em><%= t(:tax_rate_amount_explanation) %></em></p>
14
15
  </div>
15
16
  <div data-hook="included" class="field">
16
17
  <%= f.check_box :included_in_price %>
@@ -38,4 +39,4 @@
38
39
  <div class="clear"></div>
39
40
 
40
41
  <%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>
41
- </div>
42
+ </div>
@@ -16,6 +16,22 @@
16
16
  <%= f.label :icon, t(:icon) %><br />
17
17
  <%= f.file_field :icon %>
18
18
  <% end %>
19
+
20
+ <%= f.field_container :meta_title do %>
21
+ <%= f.label :meta_title, t(:meta_title) %><br />
22
+ <%= f.text_field :meta_title, :class => 'fullwidth', :rows => 6 %>
23
+ <% end %>
24
+
25
+ <%= f.field_container :meta_description do %>
26
+ <%= f.label :meta_description, t(:meta_description) %><br />
27
+ <%= f.text_field :meta_description, :class => 'fullwidth', :rows => 6 %>
28
+ <% end %>
29
+
30
+ <%= f.field_container :meta_description do %>
31
+ <%= f.label :meta_keywords, t(:meta_keywords) %><br />
32
+ <%= f.text_field :meta_keywords, :class => 'fullwidth', :rows => 6 %>
33
+ <% end %>
34
+
19
35
  </div>
20
36
 
21
37
  <div class="omega seven columns">
@@ -24,4 +40,5 @@
24
40
  <%= f.text_area :description, :class => 'fullwidth', :rows => 6 %>
25
41
  <% end %>
26
42
  </div>
43
+
27
44
  </div>