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
@@ -2,26 +2,26 @@
2
2
  <ul class="actions">
3
3
  <li>
4
4
  <% if @return_authorization.can_receive? %>
5
- <%= button_link_to(t('receive'), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :confirm => t("are_you_sure")) %>
5
+ <%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :confirm => t(:are_you_sure) %>
6
6
  <% end %>
7
7
  <% if @return_authorization.can_cancel? %>
8
- <%= button_link_to(t('cancel'), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :confirm => t("are_you_sure")) %>
8
+ <%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :confirm => t(:are_you_sure) %>
9
9
  <% end %>
10
10
  </li>
11
11
  </ul>
12
- <br class='clear' />
12
+ <br class="clear" />
13
13
  </div>
14
14
 
15
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Return Authorizations"} %>
15
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
16
16
 
17
- <h2><%= t("return_authorization")%> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)</h2>
17
+ <h2><%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)</h2>
18
18
 
19
- <%= render "shared/error_messages", :target => @return_authorization %>
20
- <%= form_for([:admin, @order, @return_authorization]) do |f| %>
21
- <%= render :partial => "form", :locals => {:f => f} %>
19
+ <%= render 'shared/error_messages', :target => @return_authorization %>
20
+ <%= form_for [:admin, @order, @return_authorization] do |f| %>
21
+ <%= render :partial => 'form', :locals => {:f => f} %>
22
22
 
23
23
  <p class="form-buttons" data-hook="buttons">
24
- <%= button t('update') %>
25
- <%= t("or") %> <%= link_to t("actions.cancel"), admin_order_return_authorizations_url(@order) %>
24
+ <%= button t(:update) %>
25
+ <%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
26
26
  </p>
27
27
  <% end %>
@@ -2,20 +2,20 @@
2
2
  <div class="toolbar" data-hook="toolbar">
3
3
  <ul class="actions">
4
4
  <li>
5
- <%= button_link_to t("new_return_authorization"), new_admin_order_return_authorization_url(@order), :icon => 'add' %>
5
+ <%= button_link_to t(:new_return_authorization), new_admin_order_return_authorization_url(@order), :icon => 'add' %>
6
6
  </li>
7
7
  </ul>
8
- <br class='clear' />
8
+ <br class="clear" />
9
9
  </div>
10
10
  <% end %>
11
11
 
12
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Return Authorizations"} %>
12
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
13
13
 
14
14
  <table class="index">
15
15
  <tr data-hook="rma_header">
16
- <th><%= t("rma_number") %></th>
17
- <th><%= t("status") %></th>
18
- <th><%= t("amount") %></th>
16
+ <th><%= t(:rma_number) %></th>
17
+ <th><%= t(:status) %></th>
18
+ <th><%= t(:amount) %></th>
19
19
  <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
20
20
  <th></th>
21
21
  </tr>
@@ -23,7 +23,7 @@
23
23
  <tr id="<%= dom_id(return_authorization) %>" data-hook="rma_row">
24
24
  <td><%= return_authorization.number %></td>
25
25
  <td><%= t(return_authorization.state.downcase) %></td>
26
- <td><%= number_to_currency(return_authorization.amount) %></td>
26
+ <td><%= number_to_currency return_authorization.amount %></td>
27
27
  <td><%= return_authorization.created_at.to_s(:date_time24) %></td>
28
28
  <td>
29
29
  <%= link_to_edit return_authorization %>
@@ -37,9 +37,9 @@
37
37
  <% end %>
38
38
  <% unless @order.inventory_units.any? &:shipped? %>
39
39
  <tr data-hook="rma_cannont_create">
40
- <td colspan="5"><%= t("cannot_create_returns") %></td>
40
+ <td colspan="5"><%= t(:cannot_create_returns) %></td>
41
41
  </tr>
42
42
  <% end %>
43
43
  </table>
44
44
 
45
- <%= button_link_to t('continue'), admin_orders_url %>
45
+ <%= button_link_to t(:continue), admin_orders_url %>
@@ -1,13 +1,13 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Return Authorizations"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
2
2
 
3
- <h2><%= t("new_return_authorization")%></h2>
3
+ <h2><%= t(:new_return_authorization) %></h2>
4
4
 
5
- <%= render "shared/error_messages", :target => @return_authorization %>
6
- <%= form_for([:admin, @order, @return_authorization]) do |f| %>
7
- <%= render :partial => "form", :locals => {:f => f} %>
5
+ <%= render 'shared/error_messages', :target => @return_authorization %>
6
+ <%= form_for [:admin, @order, @return_authorization] do |f| %>
7
+ <%= render :partial => 'form', :locals => {:f => f} %>
8
8
 
9
9
  <p class="form-buttons" data-hook="buttons">
10
- <%= button t('continue') %>
11
- <%= t("or") %> <%= link_to t("actions.cancel"), admin_order_return_authorizations_url(@order) %>
10
+ <%= button t(:continue) %>
11
+ <%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
12
12
  </p>
13
13
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <p>
2
- <%= label controller.controller_name.singularize, field[:name], t("activerecord.attributes.variant." + field[:name].downcase, :default => field[:name].titleize)%><br />
2
+ <%= label controller.controller_name.singularize, field[:name], t('activerecord.attributes.variant.' + field[:name].downcase, :default => field[:name].titleize)%><br />
3
3
  <%= additional_field_for(controller, field) %>
4
4
  <%= error_message_on controller.controller_name.singularize, attribute_name_for(field[:name]) %>
5
5
  </p>
@@ -5,64 +5,64 @@
5
5
  <%= name %>
6
6
  <span class="right">
7
7
  <% if use_billing %>
8
- <%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address)) %> <%= t("use_billing_address") %>
8
+ <%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address)) %> <%= t(:use_billing_address) %>
9
9
  <% end %>
10
10
  </span>
11
11
  </th>
12
12
  </tr>
13
13
  </thead>
14
- <tbody id="<%= name == t('shipping_address') ? "shipping" : "billing" %>" style="display:<%= (use_billing && (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address))) ? "none" : "" %>" data-hook="address_fields">
15
- <tr class="<%= name == t('shipping_address') ? "shipping-row" : "billing-row" %>">
14
+ <tbody id="<%= name == t(:shipping_address) ? 'shipping' : 'billing' %>" style="display: <%= (use_billing && (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address))) ? 'none' : '' %>" data-hook="address_fields">
15
+ <tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
16
16
  <td class="lbl-col">
17
- <%= f.label :firstname, t(:first_name)+':' %>
17
+ <%= f.label :firstname, t(:first_name) + ':' %>
18
18
  </td>
19
19
  <td class="val-col" colspan="3"><%= f.text_field :firstname %></td>
20
20
  <td class="lbl-col">
21
- <%= f.label :lastname, t(:last_name)+':' %>
21
+ <%= f.label :lastname, t(:last_name) + ':' %>
22
22
  </td>
23
23
  <td class="val-col" colspan="3"><%= f.text_field :lastname %></td>
24
24
  </tr>
25
- <tr class="<%= name == t('shipping_address') ? "shipping-row" : "billing-row" %>">
25
+ <tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
26
26
  <td class="lbl-col">
27
- <%= f.label :address1, t(:street_address)+':' %>
27
+ <%= f.label :address1, t(:street_address) + ':' %>
28
28
  </td>
29
29
  <td colspan="3"><%= f.text_field :address1, :class => "fullwidth" %></td>
30
30
  <td class="lbl-col">
31
- <%= f.label :address2, t(:street_address_2)+':' %>
31
+ <%= f.label :address2, t(:street_address_2) + ':' %>
32
32
  </td>
33
33
  <td colspan="3"><%= f.text_field :address2, :class => "fullwidth" %></td>
34
34
  </tr>
35
- <tr class="<%= name == t('shipping_address') ? "shipping-row" : "billing-row" %>">
35
+ <tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
36
36
  <td class="lbl-col">
37
- <%= f.label :city, t(:city)+':' %>
37
+ <%= f.label :city, t(:city) + ':' %>
38
38
  </td>
39
39
  <td colspan="3"><%= f.text_field :city %></td>
40
40
  <td class="lbl-col">
41
- <%= f.label :zipcode, t(:zip)+':' %>
41
+ <%= f.label :zipcode, t(:zip) + ':' %>
42
42
  </td>
43
- <td colspan="3"><%= f.text_field :zipcode, :style => "width:100px;" %></td>
43
+ <td colspan="3"><%= f.text_field :zipcode, :style => 'width: 100px;' %></td>
44
44
  </tr>
45
- <tr class="<%= name == t('shipping_address') ? "shipping-row" : "billing-row" %>">
45
+ <tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
46
46
  <td class="lbl-col">
47
- <%= f.label :state_id, t(:state)+':' %>
47
+ <%= f.label :state_id, t(:state) + ':' %>
48
48
  </td>
49
49
  <td colspan="3">
50
- <span id="<%= name==t('shipping_address') ? "s" : "b" %>state">
50
+ <span id="<%= name == t(:shipping_address) ? 's' : 'b' %>state">
51
51
 
52
- <%= f.text_field :state_name, :style => "width:150px;display:#{f.object.country.states.empty? ? 'block' : 'none' };", :disabled => !f.object.country.states.empty? %>
53
- <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:style=> "width:150px;display:#{f.object.country.states.empty? ? 'none' : 'block' };", :disabled => f.object.country.states.empty?} %>
52
+ <%= f.text_field :state_name, :style => "width:150px; display: #{f.object.country.states.empty? ? 'block' : 'none' };", :disabled => !f.object.country.states.empty? %>
53
+ <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:style => "width:150px; display: #{f.object.country.states.empty? ? 'none' : 'block' };", :disabled => f.object.country.states.empty?} %>
54
54
  </span>
55
55
  </td>
56
56
  <td class="lbl-col">
57
- <%= f.label :country_id, t(:country)+':' %>
57
+ <%= f.label :country_id, t(:country) + ':' %>
58
58
  </td>
59
59
  <td colspan="3">
60
- <span id="<%= name==t('shipping_address') ? "s" : "b" %>country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, {:style => 'width:150px;'} %></span>
60
+ <span id="<%= name == t(:shipping_address) ? 's' : 'b' %>country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, {:style => 'width: 150px;'} %></span>
61
61
  </td>
62
62
  </tr>
63
- <tr class="<%= name == t('shipping_address') ? "shipping-row" : "billing-row" %>">
63
+ <tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
64
64
  <td class="lbl-col">
65
- <%= f.label :phone, t(:phone)+':' %>
65
+ <%= f.label :phone, t(:phone) + ':' %>
66
66
  </td>
67
67
  <td colspan="7"><%= f.text_field :phone %></td>
68
68
  </tr>
@@ -70,9 +70,9 @@
70
70
  </table>
71
71
 
72
72
  <% content_for :head do %>
73
- <script type="text/javascript">
73
+ <%= javascript_tag do -%>
74
74
  $(document).ready(function(){
75
- $('span#<%= name==t('shipping_address') ? "s" : "b" %>country select').change(function() { update_state('<%= name==t('shipping_address') ? "s" : "b" %>'); });
75
+ $('span#<%= name == t(:shipping_address) ? 's' : 'b' %>country select').change(function() { update_state('<%= name == t(:shipping_address) ? 's' : 'b' %>'); });
76
76
  });
77
- </script>
77
+ <% end -%>
78
78
  <% end %>
@@ -1,9 +1,9 @@
1
1
  <fieldset id="calculator_fields" data-hook>
2
- <legend><%= t('calculator') %></legend>
2
+ <legend><%= t(:calculator) %></legend>
3
3
  <div id="preference-settings" data-hook>
4
4
  <p>
5
- <%= f.label(:calc_type, t("calculator"), :for => "calc-type") %>
6
- <%= f.collection_select(:calculator_type, @calculators, :to_s, :description, {}, {:id => "calc-type"}) %>
5
+ <%= f.label(:calc_type, t(:calculator), :for => 'calc-type') %>
6
+ <%= f.collection_select(:calculator_type, @calculators, :to_s, :description, {}, {:id => 'calc-type'}) %>
7
7
  </p>
8
8
  <% if !@object.new_record? %>
9
9
  <div class="calculator-settings">
@@ -12,7 +12,7 @@
12
12
  <% end %>
13
13
  </div>
14
14
  <% if @object.calculator.respond_to?(:preferences) %>
15
- <div class="calculator-settings-warning"><%= t('calculator_settings_warning')%></div>
15
+ <div class="calculator-settings-warning"><%= t(:calculator_settings_warning)%></div>
16
16
  <% end %>
17
17
  <% end %>
18
18
  </div>
@@ -1,21 +1,21 @@
1
1
  <% content_for :sidebar do %>
2
2
 
3
- <h3><%= t("configurations") %></h3>
3
+ <h3><%= t(:configurations) %></h3>
4
4
  <br class="clear" />
5
5
 
6
6
  <ul class="sidebar" data-hook="admin_configurations_sidebar_menu">
7
- <%= configurations_sidebar_menu_item t("general_settings"), admin_general_settings_path %>
8
- <%= configurations_sidebar_menu_item t("mail_methods"), admin_mail_methods_path %>
9
- <%= configurations_sidebar_menu_item t("tax_categories"), admin_tax_categories_path %>
10
- <%= configurations_sidebar_menu_item t("zones"), admin_zones_path %>
11
- <%= configurations_sidebar_menu_item t("states"), admin_country_states_path(Spree::Config[:default_country_id]) %>
12
- <%= configurations_sidebar_menu_item t("payment_methods"), admin_payment_methods_path %>
13
- <%= configurations_sidebar_menu_item t("taxonomies"), admin_taxonomies_path %>
14
- <%= configurations_sidebar_menu_item t("shipping_methods"), admin_shipping_methods_path %>
15
- <%= configurations_sidebar_menu_item t("inventory_settings"), admin_inventory_settings_path %>
16
- <%= configurations_sidebar_menu_item t("analytics_trackers"), admin_trackers_path %>
7
+ <%= configurations_sidebar_menu_item t(:general_settings), admin_general_settings_path %>
8
+ <%= configurations_sidebar_menu_item t(:mail_methods), admin_mail_methods_path %>
9
+ <%= configurations_sidebar_menu_item t(:tax_categories), admin_tax_categories_path %>
10
+ <%= configurations_sidebar_menu_item t(:zones), admin_zones_path %>
11
+ <%= configurations_sidebar_menu_item t(:states), admin_country_states_path(Spree::Config[:default_country_id]) %>
12
+ <%= configurations_sidebar_menu_item t(:payment_methods), admin_payment_methods_path %>
13
+ <%= configurations_sidebar_menu_item t(:taxonomies), admin_taxonomies_path %>
14
+ <%= configurations_sidebar_menu_item t(:shipping_methods), admin_shipping_methods_path %>
15
+ <%= configurations_sidebar_menu_item t(:inventory_settings), admin_inventory_settings_path %>
16
+ <%= configurations_sidebar_menu_item t(:analytics_trackers), admin_trackers_path %>
17
17
  </ul>
18
18
  <ul class="sidebar">
19
- <li id="complete_settings_list"><%= link_to t("complete_list"), admin_configurations_path %>
19
+ <li id="complete_settings_list"><%= link_to t(:complete_list), admin_configurations_path %>
20
20
  </ul>
21
21
  <% end %>
@@ -13,4 +13,4 @@ if notice %>
13
13
  } <%
14
14
  end %>
15
15
 
16
- <%= render(:partial => "/admin/shared/update_order_state") if @order %>
16
+ <%= render :partial => '/admin/shared/update_order_state' if @order %>
@@ -1,4 +1,4 @@
1
1
  <p class="form-buttons" data-hook="buttons">
2
- <%= button t("update") %>
3
- <%= t("or") %> <%= link_to t("cancel"), collection_url %>
2
+ <%= button t(:update) %>
3
+ <%= t(:or) %> <%= link_to t(:cancel), collection_url %>
4
4
  </p>
@@ -1,12 +1,12 @@
1
1
  <% if products.any? %>
2
2
  <% form_tag admin_product_groups_path do %>
3
- <%= hidden_field_tag "product_group[product_scopes_attributes][][name]", 'with_ids' %>
4
- <%= hidden_field_tag "product_group[product_scopes_attributes][][arguments][]", products.map(&:id).join(',') %>
3
+ <%= hidden_field_tag 'product_group[product_scopes_attributes][][name]', 'with_ids' %>
4
+ <%= hidden_field_tag 'product_group[product_scopes_attributes][][arguments][]', products.map(&:id).join(',') %>
5
5
  <fieldset data-hook="create_group">
6
- <legend><%= t('create_product_group_from_products') %></legend>
7
- <label><%= t('name') %></label>
8
- <%= text_field_tag "product_group[name]", 'New group' %>
9
- <input type="submit" value="<%= t('create') %>">
6
+ <legend><%= t(:create_product_group_from_products) %></legend>
7
+ <%= label_tag nil, t(:name) %>
8
+ <%= text_field_tag 'product_group[name]', t(:new_group) %>
9
+ <%= submit_tag t(:create) %>
10
10
  </fieldset>
11
11
  <% end %>
12
12
  <% end %>
@@ -1,4 +1,4 @@
1
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
1
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
2
2
  <%= csrf_meta_tags %>
3
3
  <title><%= "Spree #{t('administration')}: " %>
4
4
  <%= t(controller.controller_name, :default => controller.controller_name.titleize) %></title>
@@ -16,11 +16,11 @@
16
16
  %>
17
17
  <% end %>
18
18
 
19
- <%= stylesheet_link_tag "admin/all" %>
20
- <%= javascript_include_tag "admin/all" %>
21
- <%= javascript_tag do %>
19
+ <%= stylesheet_link_tag 'admin/all' %>
20
+ <%= javascript_include_tag 'admin/all' %>
21
+ <%= javascript_tag do -%>
22
22
  jQuery.alerts.dialogClass = 'spree';
23
23
  <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
24
- <% end %>
24
+ <% end -%>
25
25
 
26
26
  <%= yield :head %>
@@ -1,8 +1,8 @@
1
1
  <div class="toolbar" data-hook="toolbar">
2
2
  <ul class="actions">
3
3
  <li>
4
- <%= button_link_to t("new_adjustment"), new_admin_order_adjustment_url(@order), :icon => 'add' %>
4
+ <%= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'add' %>
5
5
  </li>
6
6
  </ul>
7
- <br class="clear">
7
+ <br class="clear" />
8
8
  </div>
@@ -1,4 +1,4 @@
1
1
  <p class="form-buttons" data-hook="buttons">
2
- <%= button t("actions.create") %>
3
- <%= t("or") %> <%= link_to t("actions.cancel"), collection_url %>
2
+ <%= button t('actions.create') %>
3
+ <%= t(:or) %> <%= link_to t('actions.cancel'), collection_url %>
4
4
  </p>
@@ -4,7 +4,7 @@
4
4
  <div id="order_tab_summary" data-hook>
5
5
  <h3 id="order_number" data-hook><%= "#{t(:order)} ##{@order.number} " %></h3>
6
6
  <h5 id="order_status" data-hook><%= "#{t(:status)}: #{t("order_state.#{@order.state}")}" %></h5>
7
- <h5 id="order_total" data-hook><%= "#{t(:total)}: #{number_to_currency(@order.total)}" %></h5>
7
+ <h5 id="order_total" data-hook><%= "#{t(:total)}: #{number_to_currency @order.total}" %></h5>
8
8
  <% if @order.completed? %>
9
9
  <h5 id="shipment_status"><%= "#{t(:shipment)}: #{t("shipment_states.#{@order.shipment_state}")}" %></h5>
10
10
  <h5 id="payment_status"><%= "#{t(:payment)}: #{t("payment_states.#{@order.payment_state}")}" %></h5>
@@ -15,43 +15,43 @@
15
15
 
16
16
  <ul class="sidebar" data-hook="admin_order_tabs">
17
17
  <% unless @order.completed? %>
18
- <li<%== ' class="active"' if current == "Order Details" %>>
19
- <%= link_to t("order_details"), edit_admin_order_url(@order) %>
18
+ <li<%== ' class="active"' if current == 'Order Details' %>>
19
+ <%= link_to t(:order_details), edit_admin_order_url(@order) %>
20
20
  </li>
21
- <li<%== ' class="active"' if current == "Customer Details" %>>
22
- <%= link_to t("customer_details"), user_admin_order_url(@order) %>
21
+ <li<%== ' class="active"' if current == 'Customer Details' %>>
22
+ <%= link_to t(:customer_details), user_admin_order_url(@order) %>
23
23
  </li>
24
- <li<%== ' class="active"' if current == "Shipments" %>>
25
- <%= link_to t("shipment"), @order.line_items.empty? || !@order.completed? ? "javascript:$('form').submit();" : edit_admin_order_shipment_url(@order, @order.shipment) %>
24
+ <li<%== ' class="active"' if current == 'Shipments' %>>
25
+ <%= link_to t(:shipment), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : edit_admin_order_shipment_url(@order, @order.shipment) %>
26
26
  </li>
27
- <li<%== ' class="active"' if current == "Adjustments" %>>
28
- <%= link_to t("adjustments"), @order.line_items.empty? || !@order.completed? ? "javascript:$('form').submit();" : admin_order_adjustments_url(@order) %>
27
+ <li<%== ' class="active"' if current == 'Adjustments' %>>
28
+ <%= link_to t(:adjustments), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : admin_order_adjustments_url(@order) %>
29
29
  </li>
30
- <li<%== ' class="active"' if current == "Payments" %>>
31
- <%= link_to t("payment"), @order.line_items.empty? || !@order.completed? ? "javascript:$('form').submit();" : new_admin_order_payment_url(@order) %>
30
+ <li<%== ' class="active"' if current == 'Payments' %>>
31
+ <%= link_to t(:payment), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : new_admin_order_payment_url(@order) %>
32
32
  </li>
33
33
 
34
34
  <% else %>
35
- <li<%== ' class="active"' if current == "Order Details" %>>
36
- <%= link_to t("order_details"), admin_order_url(@order) %>
35
+ <li<%== ' class="active"' if current == 'Order Details' %>>
36
+ <%= link_to t(:order_details), admin_order_url(@order) %>
37
37
  </li>
38
- <li<%== ' class="active"' if current == "Customer Details" %>>
39
- <%= link_to t("customer_details"), user_admin_order_url(@order) %>
38
+ <li<%== ' class="active"' if current == 'Customer Details' %>>
39
+ <%= link_to t(:customer_details), user_admin_order_url(@order) %>
40
40
  </li>
41
- <li<%== ' class="active"' if current == "Adjustments" %>>
42
- <%= link_to t("adjustments"), admin_order_adjustments_url(@order) %>
41
+ <li<%== ' class="active"' if current == 'Adjustments' %>>
42
+ <%= link_to t(:adjustments), admin_order_adjustments_url(@order) %>
43
43
  </li>
44
- <li<%== ' class="active"' if current == "Payments" %>>
45
- <%= link_to t("payments"), admin_order_payments_url(@order) %>
44
+ <li<%== ' class="active"' if current == 'Payments' %>>
45
+ <%= link_to t(:payments), admin_order_payments_url(@order) %>
46
46
  </li>
47
- <li<%== ' class="active"' if current == "Shipments" %>>
48
- <%= link_to t("shipments"), admin_order_shipments_url(@order) %>
47
+ <li<%== ' class="active"' if current == 'Shipments' %>>
48
+ <%= link_to t(:shipments), admin_order_shipments_url(@order) %>
49
49
  </li>
50
- <li<%== ' class="active"' if current == "Return Authorizations" %>>
51
- <%= link_to t("return_authorizations"), admin_order_return_authorizations_url(@order) %>
50
+ <li<%== ' class="active"' if current == 'Return Authorizations' %>>
51
+ <%= link_to t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
52
52
  </li>
53
- <li<%== ' class="active"' if current == "History" %>>
54
- <%= link_to t("history"), history_admin_order_url(@order) %>
53
+ <li<%== ' class="active"' if current == 'History' %>>
54
+ <%= link_to t(:history), history_admin_order_url(@order) %>
55
55
  </li>
56
56
  <% end %>
57
57
  </ul>
@@ -1,28 +1,28 @@
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
 
5
- <h3><%= @product.name %><span class='sku'><%= @product.sku %></span></h3>
5
+ <h3><%= @product.name %><span class="sku"><%= @product.sku %></span></h3>
6
6
  <br class="clear" />
7
7
 
8
8
  <ul class="sidebar product-menu" data-hook="admin_product_tabs">
9
- <li<%== ' class="active"' if current == "Product Details" %>>
10
- <%= link_to t("product_details"), edit_admin_product_url(@product) %>
9
+ <li<%== ' class="active"' if current == 'Product Details' %>>
10
+ <%= link_to t(:product_details), edit_admin_product_url(@product) %>
11
11
  </li>
12
- <li<%== ' class="active"' if current == "Images" %>>
13
- <%= link_to t("images"), admin_product_images_url(@product) %>
12
+ <li<%== ' class="active"' if current == 'Images' %>>
13
+ <%= link_to t(:images), admin_product_images_url(@product) %>
14
14
  </li>
15
- <li<%== ' class="active"' if current == "Variants" %>>
16
- <%= link_to t("variants"), admin_product_variants_url(@product) %>
15
+ <li<%== ' class="active"' if current == 'Variants' %>>
16
+ <%= link_to t(:variants), admin_product_variants_url(@product) %>
17
17
  </li>
18
- <li<%== ' class="active"' if current == "Option Types" %>>
19
- <%= link_to t("option_types"), selected_admin_product_option_types_url(@product) %>
18
+ <li<%== ' class="active"' if current == 'Option Types' %>>
19
+ <%= link_to t(:option_types), selected_admin_product_option_types_url(@product) %>
20
20
  </li>
21
- <li<%== ' class="active"' if current == "Product Properties" %>>
22
- <%= link_to t("product_properties"), admin_product_product_properties_url(@product) %>
21
+ <li<%== ' class="active"' if current == 'Product Properties' %>>
22
+ <%= link_to t(:product_properties), admin_product_product_properties_url(@product) %>
23
23
  </li>
24
- <li<%== ' class="active"' if current == "Taxons" %>>
25
- <%= link_to t("taxons"), selected_admin_product_taxons_url(@product) %>
24
+ <li<%== ' class="active"' if current == 'Taxons' %>>
25
+ <%= link_to t(:taxons), selected_admin_product_taxons_url(@product) %>
26
26
  </li>
27
27
  </ul>
28
28
  <br class="clear" />