spree_core 0.70.0.rc2 → 0.70.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/LICENSE +1 -1
  2. data/app/assets/javascripts/admin/taxonomy.js +1 -1
  3. data/app/controllers/admin/tax_rates_controller.rb +2 -2
  4. data/app/helpers/admin/base_helper.rb +1 -1
  5. data/app/helpers/spree/base_helper.rb +1 -1
  6. data/app/mailers/order_mailer.rb +5 -5
  7. data/app/mailers/shipment_mailer.rb +3 -3
  8. data/app/mailers/test_mailer.rb +1 -1
  9. data/app/models/calculator.rb +7 -9
  10. data/app/models/calculator/flat_percent_item_total.rb +0 -5
  11. data/app/models/calculator/flat_rate.rb +0 -5
  12. data/app/models/calculator/flexi_rate.rb +0 -5
  13. data/app/models/calculator/per_item.rb +0 -5
  14. data/app/models/calculator/price_bucket.rb +0 -6
  15. data/app/models/calculator/sales_tax.rb +1 -6
  16. data/app/models/calculator/vat.rb +6 -11
  17. data/app/models/creditcard.rb +12 -10
  18. data/app/models/order.rb +1 -1
  19. data/app/models/payment.rb +1 -1
  20. data/app/models/payment_method.rb +1 -7
  21. data/app/views/admin/adjustments/_adjustments_table.html.erb +3 -3
  22. data/app/views/admin/adjustments/_form.html.erb +4 -4
  23. data/app/views/admin/adjustments/edit.html.erb +7 -7
  24. data/app/views/admin/adjustments/index.html.erb +2 -2
  25. data/app/views/admin/adjustments/new.html.erb +6 -6
  26. data/app/views/admin/configurations/index.html.erb +29 -29
  27. data/app/views/admin/general_settings/edit.html.erb +5 -5
  28. data/app/views/admin/general_settings/show.html.erb +4 -5
  29. data/app/views/admin/images/_form.html.erb +2 -2
  30. data/app/views/admin/images/edit.html.erb +8 -8
  31. data/app/views/admin/images/index.html.erb +11 -11
  32. data/app/views/admin/images/new.html.erb +1 -1
  33. data/app/views/admin/inventory_settings/edit.html.erb +7 -7
  34. data/app/views/admin/inventory_settings/show.html.erb +4 -4
  35. data/app/views/admin/inventory_units/adjust.html.erb +11 -11
  36. data/app/views/admin/mail_methods/_form.html.erb +23 -26
  37. data/app/views/admin/mail_methods/edit.html.erb +4 -4
  38. data/app/views/admin/mail_methods/index.html.erb +6 -6
  39. data/app/views/admin/mail_methods/new.html.erb +4 -4
  40. data/app/views/admin/option_types/_available.html.erb +9 -9
  41. data/app/views/admin/option_types/_form.html.erb +2 -2
  42. data/app/views/admin/option_types/_option_value_fields.html.erb +3 -3
  43. data/app/views/admin/option_types/_selected.html.erb +4 -4
  44. data/app/views/admin/option_types/available.js.erb +1 -1
  45. data/app/views/admin/option_types/edit.html.erb +10 -10
  46. data/app/views/admin/option_types/index.html.erb +7 -7
  47. data/app/views/admin/option_types/new.html.erb +4 -4
  48. data/app/views/admin/option_types/selected.html.erb +1 -1
  49. data/app/views/admin/orders/_add_product.html.erb +6 -6
  50. data/app/views/admin/orders/_form.html.erb +15 -15
  51. data/app/views/admin/orders/_line_item.html.erb +4 -4
  52. data/app/views/admin/orders/_user_form.html.erb +11 -11
  53. data/app/views/admin/orders/edit.html.erb +8 -8
  54. data/app/views/admin/orders/history.html.erb +8 -8
  55. data/app/views/admin/orders/index.html.erb +28 -29
  56. data/app/views/admin/orders/new.html.erb +5 -5
  57. data/app/views/admin/orders/show.html.erb +7 -7
  58. data/app/views/admin/orders/user.html.erb +6 -6
  59. data/app/views/admin/payment_methods/_form.html.erb +15 -15
  60. data/app/views/admin/payment_methods/edit.html.erb +5 -5
  61. data/app/views/admin/payment_methods/index.html.erb +9 -10
  62. data/app/views/admin/payment_methods/new.html.erb +4 -4
  63. data/app/views/admin/payments/_bill_address_form.html.erb +1 -1
  64. data/app/views/admin/payments/_form.html.erb +5 -5
  65. data/app/views/admin/payments/_list.html.erb +5 -5
  66. data/app/views/admin/payments/_transaction_list.html.erb +6 -6
  67. data/app/views/admin/payments/credit.html.erb +5 -5
  68. data/app/views/admin/payments/index.html.erb +8 -8
  69. data/app/views/admin/payments/new.html.erb +6 -6
  70. data/app/views/admin/payments/show.html.erb +2 -2
  71. data/app/views/admin/payments/source_forms/_gateway.html.erb +8 -8
  72. data/app/views/admin/payments/source_views/_gateway.html.erb +7 -7
  73. data/app/views/admin/product_groups/_preview.html.erb +2 -2
  74. data/app/views/admin/product_groups/_product_scope.html.erb +3 -3
  75. data/app/views/admin/product_groups/edit.html.erb +9 -9
  76. data/app/views/admin/product_groups/index.html.erb +8 -8
  77. data/app/views/admin/product_groups/new.html.erb +3 -3
  78. data/app/views/admin/product_groups/show.html.erb +1 -1
  79. data/app/views/admin/product_groups/update.js.erb +3 -3
  80. data/app/views/admin/product_properties/_product_property_fields.html.erb +3 -3
  81. data/app/views/admin/product_properties/index.html.erb +15 -15
  82. data/app/views/admin/product_scopes/create.js.erb +3 -3
  83. data/app/views/admin/product_scopes/destroy.js.erb +3 -3
  84. data/app/views/admin/products/_form.html.erb +25 -25
  85. data/app/views/admin/products/_option_types.html.erb +14 -14
  86. data/app/views/admin/products/_properties_form.erb +1 -1
  87. data/app/views/admin/products/edit.html.erb +3 -3
  88. data/app/views/admin/products/index.html.erb +12 -12
  89. data/app/views/admin/products/new.html.erb +14 -14
  90. data/app/views/admin/products/show.html.erb +1 -1
  91. data/app/views/admin/properties/_form.html.erb +2 -2
  92. data/app/views/admin/properties/edit.html.erb +3 -3
  93. data/app/views/admin/properties/index.html.erb +6 -6
  94. data/app/views/admin/properties/new.html.erb +3 -3
  95. data/app/views/admin/prototypes/_form.html.erb +6 -6
  96. data/app/views/admin/prototypes/_prototypes.html.erb +3 -4
  97. data/app/views/admin/prototypes/edit.html.erb +4 -4
  98. data/app/views/admin/prototypes/index.html.erb +6 -6
  99. data/app/views/admin/prototypes/new.html.erb +3 -3
  100. data/app/views/admin/reports/index.html.erb +3 -3
  101. data/app/views/admin/reports/sales_total.html.erb +7 -7
  102. data/app/views/admin/return_authorizations/_form.html.erb +13 -14
  103. data/app/views/admin/return_authorizations/edit.html.erb +10 -10
  104. data/app/views/admin/return_authorizations/index.html.erb +9 -9
  105. data/app/views/admin/return_authorizations/new.html.erb +7 -7
  106. data/app/views/admin/shared/_additional_field.html.erb +1 -1
  107. data/app/views/admin/shared/_address_form.html.erb +24 -24
  108. data/app/views/admin/shared/_calculator_fields.html.erb +4 -4
  109. data/app/views/admin/shared/_configuration_menu.html.erb +12 -12
  110. data/app/views/admin/shared/_destroy.js.erb +1 -1
  111. data/app/views/admin/shared/_edit_resource_links.html.erb +2 -2
  112. data/app/views/admin/shared/_group_from_products_form.html.erb +6 -6
  113. data/app/views/admin/shared/_head.html.erb +5 -5
  114. data/app/views/admin/shared/_new_adjustment_button.html.erb +2 -2
  115. data/app/views/admin/shared/_new_resource_links.html.erb +2 -2
  116. data/app/views/admin/shared/_order_tabs.html.erb +25 -25
  117. data/app/views/admin/shared/_product_tabs.html.erb +14 -14
  118. data/app/views/admin/shared/_report_criteria.html.erb +4 -4
  119. data/app/views/admin/shared/_show_resource_links.html.erb +3 -3
  120. data/app/views/admin/shared/_update_order_state.js +4 -4
  121. data/app/views/admin/shipments/_form.html.erb +15 -15
  122. data/app/views/admin/shipments/edit.html.erb +11 -11
  123. data/app/views/admin/shipments/index.html.erb +11 -11
  124. data/app/views/admin/shipments/new.html.erb +6 -6
  125. data/app/views/admin/shipping_categories/_form.html.erb +2 -2
  126. data/app/views/admin/shipping_categories/edit.html.erb +4 -4
  127. data/app/views/admin/shipping_categories/index.html.erb +8 -8
  128. data/app/views/admin/shipping_categories/new.html.erb +4 -4
  129. data/app/views/admin/shipping_methods/_form.html.erb +5 -5
  130. data/app/views/admin/shipping_methods/edit.html.erb +5 -5
  131. data/app/views/admin/shipping_methods/index.html.erb +9 -10
  132. data/app/views/admin/shipping_methods/new.html.erb +4 -4
  133. data/app/views/admin/states/_form.html.erb +3 -3
  134. data/app/views/admin/states/_state_list.html.erb +6 -8
  135. data/app/views/admin/states/edit.html.erb +4 -4
  136. data/app/views/admin/states/index.html.erb +4 -4
  137. data/app/views/admin/states/new.html.erb +3 -3
  138. data/app/views/admin/states/new.js.erb +1 -1
  139. data/app/views/admin/tax_categories/_form.html.erb +6 -6
  140. data/app/views/admin/tax_categories/edit.html.erb +4 -4
  141. data/app/views/admin/tax_categories/index.html.erb +8 -9
  142. data/app/views/admin/tax_categories/new.html.erb +4 -4
  143. data/app/views/admin/tax_rates/_form.html.erb +5 -5
  144. data/app/views/admin/tax_rates/edit.html.erb +5 -5
  145. data/app/views/admin/tax_rates/index.html.erb +10 -10
  146. data/app/views/admin/tax_rates/new.html.erb +4 -4
  147. data/app/views/admin/tax_settings/edit.html.erb +10 -10
  148. data/app/views/admin/tax_settings/show.html.erb +6 -6
  149. data/app/views/admin/taxonomies/_form.html.erb +1 -1
  150. data/app/views/admin/taxonomies/_js_head.html.erb +4 -4
  151. data/app/views/admin/taxonomies/_list.html.erb +4 -4
  152. data/app/views/admin/taxonomies/_taxon.html.erb +2 -2
  153. data/app/views/admin/taxonomies/edit.erb +31 -32
  154. data/app/views/admin/taxonomies/get_children.json.erb +7 -7
  155. data/app/views/admin/taxonomies/index.html.erb +4 -4
  156. data/app/views/admin/taxonomies/new.html.erb +5 -5
  157. data/app/views/admin/taxons/_form.html.erb +3 -3
  158. data/app/views/admin/taxons/_taxon_table.html.erb +4 -4
  159. data/app/views/admin/taxons/edit.html.erb +3 -3
  160. data/app/views/admin/taxons/remove.html.erb +1 -1
  161. data/app/views/admin/taxons/select.js.erb +1 -1
  162. data/app/views/admin/taxons/selected.html.erb +5 -5
  163. data/app/views/admin/trackers/_form.html.erb +10 -10
  164. data/app/views/admin/trackers/edit.html.erb +5 -5
  165. data/app/views/admin/trackers/index.html.erb +8 -8
  166. data/app/views/admin/trackers/new.html.erb +4 -4
  167. data/app/views/admin/users/_form.html.erb +6 -6
  168. data/app/views/admin/users/edit.html.erb +4 -4
  169. data/app/views/admin/users/index.html.erb +8 -8
  170. data/app/views/admin/users/new.html.erb +4 -4
  171. data/app/views/admin/users/show.html.erb +5 -5
  172. data/app/views/admin/variants/_form.html.erb +5 -5
  173. data/app/views/admin/variants/edit.html.erb +3 -3
  174. data/app/views/admin/variants/index.html.erb +14 -18
  175. data/app/views/admin/variants/new.html.erb +3 -3
  176. data/app/views/admin/variants/new.js.erb +1 -1
  177. data/app/views/admin/zones/_country_member.html.erb +1 -1
  178. data/app/views/admin/zones/_form.html.erb +14 -14
  179. data/app/views/admin/zones/_state_member.html.erb +1 -1
  180. data/app/views/admin/zones/edit.html.erb +5 -5
  181. data/app/views/admin/zones/index.html.erb +5 -5
  182. data/app/views/admin/zones/new.html.erb +5 -5
  183. data/app/views/checkout/_address.html.erb +25 -25
  184. data/app/views/checkout/_confirm.html.erb +1 -1
  185. data/app/views/checkout/_delivery.html.erb +7 -7
  186. data/app/views/checkout/_payment.html.erb +3 -3
  187. data/app/views/checkout/_summary.html.erb +2 -2
  188. data/app/views/checkout/edit.html.erb +3 -3
  189. data/app/views/checkout/payment/_gateway.html.erb +9 -9
  190. data/app/views/checkout/registration.html.erb +6 -6
  191. data/app/views/content/cvv.html.erb +6 -6
  192. data/app/views/home/index.html.erb +2 -2
  193. data/app/views/layouts/admin.html.erb +9 -11
  194. data/app/views/layouts/spree_application.html.erb +3 -3
  195. data/app/views/order_mailer/cancel_email.text.erb +2 -2
  196. data/app/views/orders/_form.html.erb +5 -5
  197. data/app/views/orders/_line_item.html.erb +3 -3
  198. data/app/views/orders/edit.html.erb +11 -11
  199. data/app/views/orders/new.html.erb +3 -3
  200. data/app/views/orders/show.html.erb +3 -3
  201. data/app/views/products/_cart_form.html.erb +8 -8
  202. data/app/views/products/_taxons.html.erb +1 -1
  203. data/app/views/products/_thumbnails.html.erb +2 -2
  204. data/app/views/products/index.html.erb +4 -4
  205. data/app/views/products/show.html.erb +1 -1
  206. data/app/views/shared/_filters.html.erb +2 -3
  207. data/app/views/shared/_google_analytics.html.erb +6 -6
  208. data/app/views/shared/_head.html.erb +3 -3
  209. data/app/views/shared/_order_details.html.erb +12 -12
  210. data/app/views/shared/_store_menu.html.erb +1 -1
  211. data/app/views/shared/_taxonomies.html.erb +1 -1
  212. data/app/views/shipment_mailer/shipped_email.text.erb +2 -2
  213. data/app/views/taxons/_taxon.html.erb +1 -1
  214. data/app/views/taxons/show.html.erb +4 -4
  215. data/app/views/test_mailer/test_email.text.erb +2 -2
  216. data/config/locales/en.yml +4 -2
  217. data/lib/environment_extension.rb +26 -0
  218. data/lib/generators/spree/site/site_generator.rb +8 -0
  219. data/lib/product_filters.rb +8 -0
  220. data/lib/spree/calculated_adjustments.rb +8 -8
  221. data/lib/spree/environment.rb +12 -0
  222. data/lib/spree/environment/calculators.rb +10 -0
  223. data/lib/spree_core.rb +1 -1
  224. data/lib/spree_core/railtie.rb +36 -46
  225. data/lib/spree_core/ssl_requirement.rb +1 -1
  226. data/lib/spree_core/version.rb +1 -1
  227. metadata +13 -18
  228. data/config/initializers/sprockets_precompile_patch.rb +0 -16
  229. data/lib/subclass_registration.rb +0 -21
@@ -1,15 +1,15 @@
1
1
  <%= form_for @search, :url => sales_total_admin_reports_path do |s| %>
2
- <label><%= t("date_range") %></label><br />
2
+ <%= label_tag nil, t(:date_range) %><br />
3
3
  <div class="date-range-filter">
4
4
  <div class="left sub-field">
5
5
  <%= s.text_field :created_at_greater_than, :class => 'datepicker' %><br />
6
- <label class="sub"><%= t("start") %></label>
6
+ <%= label_tag nil, t(:start), :class => 'sub' %>
7
7
  </div>
8
8
  <div class="right sub-field">
9
9
  <%= s.text_field :created_at_less_than, :class => 'datepicker' %><br />
10
- <label><%= t("stop") %></label>
10
+ <%= label_tag nil, t(:stop) %>
11
11
  </div>
12
12
  </div>
13
13
 
14
- <p><%= button t("search") %></p>
14
+ <p><%= button t(:search) %></p>
15
15
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <p class="actions" data-hook="actions">
2
- <%= link_to t("edit"), edit_object_url %> |
3
- <%= link_to t("back"), collection_url %> |
4
- <%= link_to t("delete"), object_url, :confirm => t('are_you_sure_you_want_to_delete_this_record'), :method => :delete %>
2
+ <%= link_to t(:edit), edit_object_url %> |
3
+ <%= link_to t(:back), collection_url %> |
4
+ <%= link_to t(:delete), object_url, :confirm => t(:are_you_sure_you_want_to_delete_this_record), :method => :delete %>
5
5
  </p>
@@ -1,6 +1,6 @@
1
- $('#order_tab_summary h5#order_status').html('<%= "#{t('status')}: #{t("order_state.#{@order.state}")}" %>');
2
- $('#order_tab_summary h5#order_total').html('<%= "#{t('total')}: #{number_to_currency(@order.total)}" %>');
1
+ $('#order_tab_summary h5#order_status').html('<%= "#{t(:status)}: #{t("order_state.#{@order.state}")}" %>');
2
+ $('#order_tab_summary h5#order_total').html('<%= "#{t(:total)}: #{number_to_currency @order.total}" %>');
3
3
  <% if @order.completed? %>
4
- $('#order_tab_summary h5#payment_status').html('<%= "#{t('payment')}: #{t("payment_states.#{@order.payment_state}")}" %>');
5
- $('#order_tab_summary h5#shipment_status').html('<%= "#{t('shipment')}: #{t("shipment_states.#{@order.shipment_state}")}" %>');
4
+ $('#order_tab_summary h5#payment_status').html('<%= "#{t(:payment)}: #{t("payment_states.#{@order.payment_state}")}" %>');
5
+ $('#order_tab_summary h5#shipment_status').html('<%= "#{t(:shipment)}: #{t("shipment_states.#{@order.shipment_state}")}" %>');
6
6
  <% end %>
@@ -1,11 +1,11 @@
1
1
  <% unless @shipment.order.cart? %>
2
2
  <table class="index" style="width:100%;" data-hook="admin_shipment_form_inventory_units">
3
3
  <tr data-hook="shipments_header">
4
- <th width="130px"><%= t('include_in_shipment') %></th>
5
- <th><%= t('sku') %></th>
6
- <th><%= t('item_description') %></th>
7
- <th><%= t('status') %></th>
8
- <th><%= t('note') %></th>
4
+ <th style="width:130px;"><%= t(:include_in_shipment) %></th>
5
+ <th><%= t(:sku) %></th>
6
+ <th><%= t(:item_description) %></th>
7
+ <th><%= t(:status) %></th>
8
+ <th><%= t(:note) %></th>
9
9
  </tr>
10
10
 
11
11
  <% @shipment.order.inventory_units.each do |inventory_unit| %>
@@ -17,17 +17,17 @@
17
17
  { :disabled => %w(shipped backordered returned).include?(inventory_unit.state),
18
18
  :class => 'inventory_unit'} %>
19
19
  </td>
20
- <td valign="top" width="120px;"><%= inventory_unit.variant.sku %></td>
21
- <td width="300">
20
+ <td style="vertical-align:top; width:120px;"><%= inventory_unit.variant.sku %></td>
21
+ <td style="width:300px;">
22
22
  <%=inventory_unit.variant.product.name %>
23
- <%= "(" + variant_options(inventory_unit.variant) + ")" unless inventory_unit.variant.option_values.empty? %>
23
+ <%= '(' + variant_options(inventory_unit.variant) + ')' unless inventory_unit.variant.option_values.empty? %>
24
24
  </td>
25
25
  <td><%= t(inventory_unit.state) %></td>
26
26
  <td>
27
27
  <% if inventory_unit.shipment == @shipment %>
28
- <%= t('included_in_this_shipment') %>
28
+ <%= t(:included_in_this_shipment) %>
29
29
  <% elsif !inventory_unit.shipment.nil? %>
30
- <%= t('included_in_other_shipment') %> - <%= link_to inventory_unit.shipment.number, edit_admin_order_shipment_url(inventory_unit.order, inventory_unit.shipment) %>
30
+ <%= t(:included_in_other_shipment) %> - <%= link_to inventory_unit.shipment.number, edit_admin_order_shipment_url(inventory_unit.order, inventory_unit.shipment) %>
31
31
  <% end %>
32
32
  </td>
33
33
  </tr>
@@ -37,32 +37,32 @@
37
37
 
38
38
  <div data-hook="admin_shipment_form_address">
39
39
  <% shipment_form.fields_for 'address' do |sa_form| %>
40
- <%= render :partial => 'admin/shared/address_form', :locals => {:f => sa_form, :name => t("shipping_address"), :use_billing => false} %>
40
+ <%= render :partial => 'admin/shared/address_form', :locals => {:f => sa_form, :name => t(:shipping_address), :use_billing => false} %>
41
41
  <% end %>
42
42
  </div>
43
43
 
44
44
  <div data-hook="admin_shipment_form_details">
45
45
  <table class="index">
46
46
  <tr>
47
- <th colspan="8"><%= t("shipment_details") %></th>
47
+ <th colspan="8"><%= t(:shipment_details) %></th>
48
48
  </tr>
49
49
  <tr>
50
50
  <td>
51
- <%= shipment_form.label :shipping_method_id, t('shipping_method') + ":" %>
51
+ <%= shipment_form.label :shipping_method_id, t(:shipping_method) + ':' %>
52
52
  </td>
53
53
  <td>
54
54
  <%= shipment_form.select :shipping_method_id,
55
55
  @shipping_methods.map {|sm| ["#{sm.name} - #{sm.zone.name}", sm.id] } %>
56
56
  </td>
57
57
  <td>
58
- <%= shipment_form.label :tracking, t('tracking') + ":" %>
58
+ <%= shipment_form.label :tracking, t(:tracking) + ':' %>
59
59
  </td>
60
60
  <td><%= shipment_form.text_field :tracking %></td>
61
61
  </tr>
62
62
  <% if Spree::Config[:shipping_instructions] %>
63
63
  <tr>
64
64
  <td>
65
- <%= shipment_form.label :special_instructions, t('special_instructions') + ":" %>
65
+ <%= shipment_form.label :special_instructions, t(:special_instructions) + ':' %>
66
66
  </td>
67
67
  <td colspan="3">
68
68
  <%= shipment_form.text_area :special_instructions %>
@@ -2,35 +2,35 @@
2
2
  <ul class="actions" data-hook="admin_shipment_edit_buttons">
3
3
  <li>
4
4
  <% if @shipment.can_ship? %>
5
- <%= button_link_to(t('ship'), fire_admin_order_shipment_path(@order, @shipment, :e => 'ship'), :method => :put, :confirm => t("are_you_sure")) %>
5
+ <%= button_link_to t(:ship), fire_admin_order_shipment_path(@order, @shipment, :e => 'ship'), :method => :put, :confirm => t(:are_you_sure) %>
6
6
  <% end %>
7
7
  </li>
8
8
  </ul>
9
- <br class='clear' />
9
+ <br class="clear" />
10
10
  </div>
11
11
 
12
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Shipments"} %>
12
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Shipments'} %>
13
13
 
14
14
  <div data-hook="admin_shipment_edit_header">
15
- <h2><%= t('shipment') %> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :state_names, :default => @shipment.state.to_s.humanize) %>)</h2>
15
+ <h2><%= t(:shipment) %> #<%= @shipment.number%> (<%= t(@shipment.state.to_sym, :scope => :state_names, :default => @shipment.state.to_s.humanize) %>)</h2>
16
16
  <% if @shipment.cost %>
17
- <h3><%= t('charges') %> <%= number_to_currency @shipment.cost %></h3>
17
+ <h3><%= t(:charges) %> <%= number_to_currency @shipment.cost %></h3>
18
18
  <% end %>
19
19
 
20
- <%= render "shared/error_messages", :target => @shipment %>
20
+ <%= render 'shared/error_messages', :target => @shipment %>
21
21
  </div>
22
22
 
23
23
  <div data-hook="admin_shipment_edit_form">
24
- <%= form_for(@shipment, :url => admin_order_shipment_path(@order, @shipment), :html => { :method => :put }) do |shipment_form| %>
25
- <%= render :partial => "form", :locals => { :shipment_form => shipment_form } %>
24
+ <%= form_for @shipment, :url => admin_order_shipment_path(@order, @shipment), :html => { :method => :put } do |shipment_form| %>
25
+ <%= render :partial => 'form', :locals => { :shipment_form => shipment_form } %>
26
26
 
27
27
  <div data-hook="admin_shipment_edit_form_buttons">
28
28
  <p class="form-buttons">
29
29
  <% if self.respond_to?(:current_user) && @shipment.editable_by?(current_user) %>
30
- <%= button @order.cart? ? t('continue') : t('update') %>
31
- <%= t("or") %> <%= link_to t("cancel"), admin_order_shipments_path(@order) %>
30
+ <%= button @order.cart? ? t(:continue) : t(:update) %>
31
+ <%= t(:or) %> <%= link_to t(:cancel), admin_order_shipments_path(@order) %>
32
32
  <% else %>
33
- <%= link_to raw("&laquo; #{t("back")}"), edit_admin_order_shipment_path(@order) %>
33
+ <%= link_to raw("&laquo; #{t(:back)}"), edit_admin_order_shipment_path(@order) %>
34
34
  <% end %>
35
35
  </p>
36
36
  </div>
@@ -1,22 +1,22 @@
1
1
  <div class="toolbar" data-hook="toolbar">
2
2
  <ul class="actions">
3
3
  <li id='new_shipment_section'>
4
- <%= button_link_to t("new_shipment"), new_admin_order_shipment_url(@order), :icon => 'add' %>
4
+ <%= button_link_to t(:new_shipment), new_admin_order_shipment_url(@order), :icon => 'add' %>
5
5
  </li>
6
6
  </ul>
7
- <br class='clear' />
7
+ <br class="clear" />
8
8
  </div>
9
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Shipments"} %>
9
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Shipments'} %>
10
10
  <table class="index">
11
11
  <tr data-hook="admin_shipments_index_headers">
12
- <th><%= t("shipment_number") %></th>
13
- <th><%= t("shipping_method") %></th>
14
- <th><%= t("shipping_cost") %></th>
15
- <th><%= t("tracking") %></th>
16
- <th><%= t("status") %></th>
12
+ <th><%= t(:shipment_number) %></th>
13
+ <th><%= t(:shipping_method) %></th>
14
+ <th><%= t(:shipping_cost) %></th>
15
+ <th><%= t(:tracking) %></th>
16
+ <th><%= t(:status) %></th>
17
17
  <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
18
18
  <th data-hook="admin_shipments_index_header_actions">
19
- <%= t("action") %>
19
+ <%= t(:action) %>
20
20
  </th>
21
21
  </tr>
22
22
  <% @shipments.each do |shipment| %>
@@ -28,11 +28,11 @@
28
28
  <td><%= t(shipment.state.to_sym, :scope => :state_names, :default => shipment.state.to_s.humanize) %></td>
29
29
  <td><%= shipment.shipped_at.to_s(:date_time24) if shipment.shipped_at %></td>
30
30
  <td class="actions" data-hook="admin_shipments_index_row_actions">
31
- <%= link_to_with_icon 'edit', t('edit'), edit_admin_order_shipment_url(@order, shipment) %>
31
+ <%= link_to_with_icon 'edit', t(:edit), edit_admin_order_shipment_url(@order, shipment) %>
32
32
  <%= link_to_delete shipment, :url => admin_order_shipment_url(@order, shipment) %>
33
33
  </td>
34
34
  </tr>
35
35
  <% end %>
36
36
  </table>
37
37
 
38
- <%= button_link_to t('continue'), admin_orders_url %>
38
+ <%= button_link_to t(:continue), admin_orders_url %>
@@ -1,17 +1,17 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Shipments"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Shipments'} %>
2
2
 
3
3
  <div data-hook="admin_shipment_new_header">
4
- <h1><%= t('new_shipment')%></h1>
5
- <%= render "shared/error_messages", :target => @shipment %>
4
+ <h1><%= t(:new_shipment) %></h1>
5
+ <%= render 'shared/error_messages', :target => @shipment %>
6
6
  </div>
7
7
 
8
8
  <div data-hook="admin_shipment_new_form">
9
- <%= form_for(@shipment, :url => admin_order_shipments_path(@order)) do |shipment_form| %>
10
- <%= render :partial => "form", :locals => { :shipment_form => shipment_form } %>
9
+ <%= form_for @shipment, :url => admin_order_shipments_path(@order) do |shipment_form| %>
10
+ <%= render :partial => 'form', :locals => { :shipment_form => shipment_form } %>
11
11
 
12
12
  <div data-hook="admin_shipment_new_form_buttons">
13
13
  <p class="form-buttons">
14
- <%= button t('create') %>
14
+ <%= button t(:create) %>
15
15
  </p>
16
16
  </div>
17
17
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <table data-hook="name">
2
2
  <tr>
3
- <td><%=t("name")%>:</td>
4
- <td><%= f.text_field :name, {"style" => "width:200px"} %></td>
3
+ <td><%= t(:name) %>:</td>
4
+ <td><%= f.text_field :name, {'style' => 'width:200px'} %></td>
5
5
  </tr>
6
6
  </table>
@@ -1,6 +1,6 @@
1
- <h1><%= t("editing_shipping_category") %></h1>
1
+ <h1><%= t(:editing_shipping_category) %></h1>
2
2
  <%= render 'shared/error_messages', :target => @shipping_category %>
3
- <%= form_for([:admin, @shipping_category]) do |f| %>
4
- <%= render :partial => "form", :locals => { :f => f } %>
5
- <%= render :partial => "admin/shared/edit_resource_links" %>
3
+ <%= form_for [:admin, @shipping_category] do |f| %>
4
+ <%= render :partial => 'form', :locals => { :f => f } %>
5
+ <%= render :partial => 'admin/shared/edit_resource_links' %>
6
6
  <% end %>
@@ -1,27 +1,27 @@
1
1
  <div class="toolbar" data-hook="toolbar">
2
2
  <ul class="actions">
3
3
  <li>
4
- <%= button_link_to t("new_shipping_category"), new_object_url, :icon => 'add' %>
4
+ <%= button_link_to t(:new_shipping_category), new_object_url, :icon => 'add' %>
5
5
  </li>
6
6
  </ul>
7
- <br class="clear">
7
+ <br class="clear" />
8
8
  </div>
9
9
 
10
- <h1><%=t("shipping_categories") %></h1>
10
+ <h1><%= t(:shipping_categories) %></h1>
11
11
  <table class="index">
12
12
  <thead>
13
13
  <tr data-hook="categories_header">
14
- <th><%= t("name") %></th>
15
- <th><%= t("action") %></th>
14
+ <th><%= t(:name) %></th>
15
+ <th><%= t(:action) %></th>
16
16
  </tr>
17
17
  </thead>
18
18
  <tbody>
19
19
  <% @shipping_categories.each do |shipping_category|%>
20
20
  <tr id="<%= dom_id shipping_category %>" data-hook="category_row">
21
- <td width="350px"><%= shipping_category.name %></td>
21
+ <td style="width:350px;"><%= shipping_category.name %></td>
22
22
  <td>
23
- <%= link_to_edit shipping_category %> &nbsp;
24
- <%= link_to_delete shipping_category %>
23
+ <%= link_to_edit shipping_category %> &nbsp;
24
+ <%= link_to_delete shipping_category %>
25
25
  </td>
26
26
  </tr>
27
27
  <% end %>
@@ -1,8 +1,8 @@
1
- <h1><%= t("new_shipping_category") %></h1>
1
+ <h1><%= t(:new_shipping_category) %></h1>
2
2
 
3
3
  <%= render 'shared/error_messages', :target => @shipping_category %>
4
4
 
5
- <%= form_for([:admin, @shipping_category]) do |f| %>
6
- <%= render :partial => "form", :locals => { :f => f } %>
7
- <%= render :partial => "admin/shared/new_resource_links" %>
5
+ <%= form_for [:admin, @shipping_category] do |f| %>
6
+ <%= render :partial => 'form', :locals => { :f => f } %>
7
+ <%= render :partial => 'admin/shared/new_resource_links' %>
8
8
  <% end %>
@@ -1,18 +1,18 @@
1
1
  <div data-hook="admin_shipping_method_form_fields">
2
2
  <%= f.field_container :name do %>
3
- <%= f.label :name, t("name") %><br />
3
+ <%= f.label :name, t(:name) %><br />
4
4
  <%= f.text_field :name %>
5
5
  <%= error_message_on :shipping_method, :name %>
6
6
  <% end %>
7
7
 
8
8
  <%= f.field_container :zone_id do %>
9
- <%= f.label :zone_id, t("zone") %><br />
10
- <%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {"style" => "width:200px"}) %>
9
+ <%= f.label :zone_id, t(:zone) %><br />
10
+ <%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {'style' => 'width:200px;'}) %>
11
11
  <%= error_message_on :shipping_method, :zone_id %>
12
12
  <% end %>
13
13
 
14
14
  <%= f.field_container :display_on do %>
15
- <%= f.label :display_on, t("display") %><br />
15
+ <%= f.label :display_on, t(:display) %><br />
16
16
  <%= select(:shipping_method, :display_on, ShippingMethod::DISPLAY.collect {|display| [t(display), display == :both ? nil : display.to_s]}) %>
17
17
  <%= error_message_on :shipping_method, :display_on %>
18
18
  <% end %>
@@ -20,6 +20,6 @@
20
20
  </div>
21
21
 
22
22
  <div data-hook="admin_shipping_method_form_calculator_fields">
23
- <%= render "admin/shared/calculator_fields", :f => f %>
23
+ <%= render 'admin/shared/calculator_fields', :f => f %>
24
24
  </div>
25
25
 
@@ -1,16 +1,16 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
3
  <div data-hook="admin_shipping_method_edit_form_header">
4
- <h1><%= t("editing_shipping_method") %></h1>
5
- <%= render "shared/error_messages", :target => @shipping_method %>
4
+ <h1><%= t(:editing_shipping_method) %></h1>
5
+ <%= render 'shared/error_messages', :target => @shipping_method %>
6
6
  </div>
7
7
 
8
8
  <div data-hook="admin_shipping_method_edit_form">
9
- <%= form_for([:admin, @shipping_method]) do |f| %>
10
- <%= render :partial => "form", :locals => { :f => f } %>
9
+ <%= form_for [:admin, @shipping_method] do |f| %>
10
+ <%= render :partial => 'form', :locals => { :f => f } %>
11
11
 
12
12
  <div data-hook="admin_shipping_method_edit_form_buttons">
13
- <%= render :partial => "admin/shared/edit_resource_links" %>
13
+ <%= render :partial => 'admin/shared/edit_resource_links' %>
14
14
  </div>
15
15
  <% end %>
16
16
  </div>
@@ -3,22 +3,21 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li>
6
- <%= button_link_to t("new_shipping_method"), new_object_url, :icon => 'add',
7
- :id => 'admin_new_shipping_method_link' %>
6
+ <%= button_link_to t(:new_shipping_method), new_object_url, :icon => 'add', :id => 'admin_new_shipping_method_link' %>
8
7
  </li>
9
8
  </ul>
10
- <br class="clear">
9
+ <br class="clear" />
11
10
  </div>
12
11
 
13
- <h1><%= t("shipping_methods") %></h1>
12
+ <h1><%= t(:shipping_methods) %></h1>
14
13
 
15
14
  <table class="index" id='listing_shipping_methods'>
16
15
  <thead>
17
16
  <tr data-hook="admin_shipping_methods_index_headers">
18
- <th><%= t("name") %></th>
19
- <th><%= t("zone") %></th>
20
- <th><%= t("calculator") %></th>
21
- <th><%= t("display") %></th>
17
+ <th><%= t(:name) %></th>
18
+ <th><%= t(:zone) %></th>
19
+ <th><%= t(:calculator) %></th>
20
+ <th><%= t(:display) %></th>
22
21
  <th data-hook="admin_shipping_methods_index_header_actions"></th>
23
22
  </tr>
24
23
  </thead>
@@ -28,8 +27,8 @@
28
27
  <td><%= shipping_method.name %></td>
29
28
  <td><%= shipping_method.zone.name if shipping_method.zone %></td>
30
29
  <td><%= shipping_method.calculator.description %></td>
31
- <td><%= shipping_method.display_on.blank? ? t('both') : t(shipping_method.display_on) %></td>
32
- <td width="140px" data-hook="admin_shipping_methods_index_row_actions">
30
+ <td><%= shipping_method.display_on.blank? ? t(:both) : t(shipping_method.display_on) %></td>
31
+ <td style="width:140px;" data-hook="admin_shipping_methods_index_row_actions">
33
32
  <%= link_to_edit shipping_method %> &nbsp;
34
33
  <%= link_to_delete shipping_method %>
35
34
  </td>
@@ -1,17 +1,17 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
3
  <div data-hook="admin_shipping_method_new_form_header">
4
- <h1><%= t("new_shipping_method") %></h1>
4
+ <h1><%= t(:new_shipping_method) %></h1>
5
5
 
6
6
  <%= render 'shared/error_messages', :target => @shipping_method %>
7
7
  </div>
8
8
 
9
9
  <div data-hook="admin_shipping_method_new_form">
10
- <%= form_for([:admin, @shipping_method]) do |f| %>
11
- <%= render :partial => "form", :locals => { :f => f } %>
10
+ <%= form_for [:admin, @shipping_method] do |f| %>
11
+ <%= render :partial => 'form', :locals => { :f => f } %>
12
12
 
13
13
  <div data-hook="admin_shipping_method_new_form_buttons">
14
- <%= render :partial => "admin/shared/new_resource_links" %>
14
+ <%= render :partial => 'admin/shared/new_resource_links' %>
15
15
  </div>
16
16
  <% end %>
17
17
  </div>
@@ -1,9 +1,9 @@
1
1
  <%= f.field_container :name do %>
2
- <%= f.label :name, t("name") %><br />
3
- <%=f.text_field :name %>
2
+ <%= f.label :name, t(:name) %><br />
3
+ <%= f.text_field :name %>
4
4
  <% end %>
5
5
 
6
6
  <%= f.field_container :abbr do %>
7
- <%= f.label :abbr, t("abbreviation") %><br />
7
+ <%= f.label :abbr, t(:abbreviation) %><br />
8
8
  <%= f.text_field :abbr %>
9
9
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <table class="index" id='listing_states' data-hook>
2
2
  <thead>
3
3
  <tr data-hook="states_header">
4
- <th><%= t("name") %></th>
5
- <th><%= t("abbreviation") %></th>
4
+ <th><%= t(:name) %></th>
5
+ <th><%= t(:abbreviation) %></th>
6
6
  <th></th>
7
7
  </tr>
8
8
  </thead>
@@ -12,10 +12,10 @@
12
12
  @delete_url = admin_country_state_path(@country, state)
13
13
  %>
14
14
  <tr id="<%= dom_id state %>" data-hook="states_row">
15
- <td><%=state.name %></td>
16
- <td><%=state.abbr %></td>
15
+ <td><%= state.name %></td>
16
+ <td><%= state.abbr %></td>
17
17
  <td class="actions">
18
- <%= link_to_with_icon 'edit', t("edit"), edit_admin_country_state_url(@country, state), :class => 'edit' %>
18
+ <%= link_to_with_icon 'edit', t(:edit), edit_admin_country_state_url(@country, state), :class => 'edit' %>
19
19
  &nbsp;
20
20
  <%= link_to_delete state %>
21
21
  </td>
@@ -28,7 +28,5 @@
28
28
  </table>
29
29
  <div id="new_state" data-hook></div>
30
30
  <p data-hook="buttons">
31
- <%= button_link_to t("new_state"), new_admin_country_state_url(@country), {:remote => true,
32
- :icon => 'add',
33
- :id => 'new_state_link'} %>
31
+ <%= button_link_to t(:new_state), new_admin_country_state_url(@country), {:remote => true, :icon => 'add', :id => 'new_state_link'} %>
34
32
  </p>