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,10 +1,10 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t("editing_state") %></h1>
3
+ <h1><%= t(:editing_state) %></h1>
4
4
 
5
5
  <%= render 'shared/error_messages', :target => @state %>
6
6
 
7
- <%= form_for([:admin, @country, @state]) do |f| %>
8
- <%= render :partial => "form", :locals => { :f => f } %>
9
- <%= render :partial => "admin/shared/edit_resource_links" %>
7
+ <%= form_for [:admin, @country, @state] do |f| %>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
+ <%= render :partial => 'admin/shared/edit_resource_links' %>
10
10
  <% end %>
@@ -1,16 +1,16 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t("states") %></h1>
3
+ <h1><%= t(:states) %></h1>
4
4
 
5
5
  <p data-hook="country">
6
- <label for="country"><%= t('country') %></label>
6
+ <%= label_tag :country, t(:country) %>
7
7
  <select id="country" class='observe_field' data-base-url="<%=admin_states_path(:format => :js)%>?country_id=" data-update="#state-list">
8
8
  <%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
9
9
  </select>
10
10
  </p>
11
11
 
12
- <%= image_tag "spinner.gif", :plugin => "spree", :style => "display:none", :id => 'busy_indicator' %>
12
+ <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
13
13
 
14
14
  <div id="state-list" data-hook>
15
- <%=render :partial => 'state_list'%>
15
+ <%= render :partial => 'state_list'%>
16
16
  </div>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%= render 'shared/error_messages', :target => @state %>
4
4
 
5
- <%= form_for([:admin, @country, @state]) do |f| %>
6
- <%= render :partial => "form", :locals => { :f => f } %>
7
- <%= render :partial => "admin/shared/new_resource_links" %>
5
+ <%= form_for [:admin, @country, @state] do |f| %>
6
+ <%= render :partial => 'form', :locals => { :f => f } %>
7
+ <%= render :partial => 'admin/shared/new_resource_links' %>
8
8
  <% end %>
@@ -1,2 +1,2 @@
1
- $("#new_state").html('<%= escape_javascript(render :template => "admin/states/new.html.erb") %>');
1
+ $("#new_state").html("<%= escape_javascript(render :template => 'admin/states/new.html.erb') %>");
2
2
  $("#new_state_link").parent().hide();
@@ -1,12 +1,12 @@
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
  <%= f.field_container :description do %>
6
- <%= f.label :description, t("description")%><br />
7
- <%=f.text_field :description %>
6
+ <%= f.label :description, t(:description) %><br />
7
+ <%= f.text_field :description %>
8
8
  <% end %>
9
9
  <%= f.field_container :is_default do %>
10
- <%= f.label :is_default, t("default")%><br />
11
- <%=f.check_box :is_default %>
10
+ <%= f.label :is_default, t(:default) %><br />
11
+ <%= f.check_box :is_default %>
12
12
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%=t("editing_tax_category")%></h1>
3
+ <h1><%= t(:editing_tax_category) %></h1>
4
4
 
5
5
  <%= render 'shared/error_messages', :target => @tax_category %>
6
6
 
7
- <%= form_for([:admin, @tax_category]) do |f| %>
8
- <%= render :partial => "form", :locals => { :f => f } %>
9
- <%= render :partial => "admin/shared/edit_resource_links" %>
7
+ <%= form_for [:admin, @tax_category] do |f| %>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
+ <%= render :partial => 'admin/shared/edit_resource_links' %>
10
10
  <% end %>
@@ -3,22 +3,21 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li>
6
- <p><%= button_link_to t("new_tax_category"), new_object_url, :icon => 'add',
7
- :id => 'admin_new_tax_categories_link' %>
6
+ <p><%= button_link_to t(:new_tax_category), new_object_url, :icon => 'add', :id => 'admin_new_tax_categories_link' %>
8
7
  </p>
9
8
  </li>
10
9
  </ul>
11
- <br class="clear">
10
+ <br class="clear" />
12
11
  </div>
13
12
 
14
13
 
15
- <h1><%=t("listing_tax_categories")%></h1>
14
+ <h1><%= t(:listing_tax_categories) %></h1>
16
15
  <table class="index" id='listing_tax_categories' data-hook>
17
16
  <thead>
18
17
  <tr data-hook="tax_header">
19
- <th><%= t("name") %></th>
20
- <th><%= t("description") %></th>
21
- <th><%= t("default") %></th>
18
+ <th><%= t(:name) %></th>
19
+ <th><%= t(:description) %></th>
20
+ <th><%= t(:default) %></th>
22
21
  <th></th>
23
22
  </tr>
24
23
  </thead>
@@ -32,8 +31,8 @@
32
31
  <td><%= tax_category.description %></td>
33
32
  <td><%= tax_category.is_default.to_s.titleize %></td>
34
33
  <td class="actions">
35
- <%=link_to_edit tax_category, :class => 'edit' %> &nbsp;
36
- <%=link_to_delete tax_category %>
34
+ <%= link_to_edit tax_category, :class => 'edit' %> &nbsp;
35
+ <%= link_to_delete tax_category %>
37
36
  </tr>
38
37
  <% end %>
39
38
  <% if @tax_categories.empty? %>
@@ -1,10 +1,10 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%=t("new_tax_category")%></h1>
3
+ <h1><%= t(:new_tax_category) %></h1>
4
4
 
5
5
  <%= render 'shared/error_messages', :target => @tax_category %>
6
6
 
7
- <%= form_for([:admin, @tax_category]) do |f| %>
8
- <%= render :partial => "form", :locals => { :f => f } %>
9
- <%= render :partial => "admin/shared/new_resource_links" %>
7
+ <%= form_for [:admin, @tax_category] do |f| %>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
+ <%= render :partial => 'admin/shared/new_resource_links' %>
10
10
  <% end %>
@@ -1,16 +1,16 @@
1
1
  <table data-hook="tax_rates">
2
2
  <tr data-hook="zone">
3
- <td><%=t("zone")%>:</td>
3
+ <td><%= t(:zone) %>:</td>
4
4
  <td><%= f.collection_select(:zone_id, @available_zones, :id, :name) %></td>
5
5
  </tr>
6
6
  <tr data-hook="category">
7
- <td><%=t("tax_category")%>:</td>
7
+ <td><%= t(:tax_category) %>:</td>
8
8
  <td><%= f.collection_select(:tax_category_id, @available_categories,:id, :name) %></td>
9
9
  </tr>
10
10
  <tr="rate">
11
- <td><%=t("rate")%>:</td>
11
+ <td><%= t(:rate) %>:</td>
12
12
  <td><%= f.text_field :amount %></td>
13
- </tr>
13
+ </tr>
14
14
  </table>
15
15
 
16
- <%= render "admin/shared/calculator_fields", :f => f %>
16
+ <%= render 'admin/shared/calculator_fields', :f => f %>
@@ -1,6 +1,6 @@
1
- <h1><%= t("editing_tax_rate") %></h1>
2
- <%= render "shared/error_messages", :target => @tax_rate %>
3
- <%= form_for([:admin, @tax_rate]) do |f| %>
4
- <%= render :partial => "form", :locals => { :f => f } %>
5
- <%= render :partial => "admin/shared/edit_resource_links" %>
1
+ <h1><%= t(:editing_tax_rate) %></h1>
2
+ <%= render 'shared/error_messages', :target => @tax_rate %>
3
+ <%= form_for [:admin, @tax_rate] do |f| %>
4
+ <%= render :partial => 'form', :locals => { :f => f } %>
5
+ <%= render :partial => 'admin/shared/edit_resource_links' %>
6
6
  <% end %>
@@ -1,20 +1,20 @@
1
1
  <div class="toolbar" data-hook="toolbar">
2
2
  <ul class="actions">
3
3
  <li>
4
- <%= button_link_to t("new_tax_rate"), new_object_url, :icon => 'add' %>
4
+ <%= button_link_to t(:new_tax_rate), new_object_url, :icon => 'add' %>
5
5
  </li>
6
6
  </ul>
7
- <br class="clear">
7
+ <br class="clear" />
8
8
  </div>
9
- <h1><%=t("tax_rates") %></h1>
9
+ <h1><%= t(:tax_rates) %></h1>
10
10
  <table class="index">
11
11
  <thead>
12
12
  <tr data-hook="rate_header">
13
- <th><%=t("zone")%></th>
14
- <th><%=t("category")%></th>
15
- <th><%=t("amount")%></th>
16
- <th><%=t("calculator")%></th>
17
- <th><%=t("action")%></th>
13
+ <th><%= t(:zone) %></th>
14
+ <th><%= t(:category) %></th>
15
+ <th><%= t(:amount) %></th>
16
+ <th><%= t(:calculator) %></th>
17
+ <th><%= t(:action) %></th>
18
18
  </tr>
19
19
  </thead>
20
20
  <tbody>
@@ -25,8 +25,8 @@
25
25
  <td><%=tax_rate.amount %></td>
26
26
  <td><%=tax_rate.calculator.to_s %></td>
27
27
  <td>
28
- <%= link_to_edit tax_rate %> &nbsp;
29
- <%= link_to_delete tax_rate %>
28
+ <%= link_to_edit tax_rate %> &nbsp;
29
+ <%= link_to_delete tax_rate %>
30
30
  </td>
31
31
  </tr>
32
32
  <% end %>
@@ -1,8 +1,8 @@
1
- <h1><%= t("new_tax_rate") %></h1>
1
+ <h1><%= t(:new_tax_rate) %></h1>
2
2
 
3
3
  <%= render 'shared/error_messages', :target => @tax_rate %>
4
4
 
5
- <%= form_for([:admin, @tax_rate]) do |f| %>
6
- <%= render :partial => "form", :locals => { :f => f } %>
7
- <%= render :partial => "admin/shared/new_resource_links" %>
5
+ <%= form_for [:admin, @tax_rate] do |f| %>
6
+ <%= render :partial => 'form', :locals => { :f => f } %>
7
+ <%= render :partial => 'admin/shared/new_resource_links' %>
8
8
  <% end %>
@@ -1,23 +1,23 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t('tax_settings') %></h1>
3
+ <h1><%= t(:tax_settings) %></h1>
4
4
 
5
- <%= form_tag(admin_tax_settings_path, :method => :put) do %>
5
+ <%= form_tag admin_tax_settings_path, :method => :put do %>
6
6
 
7
7
  <p data-hook="show_vat">
8
- <label><%= t("show_price_inc_vat") %></label>
9
- <input name="preferences[show_price_inc_vat]" type="hidden" value="0" />
10
- <%= check_box_tag('preferences[show_price_inc_vat]', "1", Spree::Config[:show_price_inc_vat]) %>
8
+ <%= label_tag nil, t(:show_price_inc_vat) %>
9
+ <%= hidden_field_tag 'preferences[show_price_inc_vat]', '0' %>
10
+ <%= check_box_tag 'preferences[show_price_inc_vat]', '1', Spree::Config[:show_price_inc_vat] %>
11
11
  </p>
12
12
 
13
13
  <p data-hook="shipment_vat">
14
- <label><%= t("shipment_inc_vat") %></label>
15
- <input name="preferences[shipment_inc_vat]" type="hidden" value="0" />
16
- <%= check_box_tag('preferences[shipment_inc_vat]', "1", Spree::Config[:shipment_inc_vat]) %>
14
+ <%= label_tag nil, t(:shipment_inc_vat) %>
15
+ <%= hidden_field_tag 'preferences[shipment_inc_vat]', '0' %>
16
+ <%= check_box_tag 'preferences[shipment_inc_vat]', '1', Spree::Config[:shipment_inc_vat] %>
17
17
  </p>
18
18
 
19
19
  <p class="form-buttons" data-hook="buttons">
20
- <%= button t('update') %>
21
- <%= t("or") %> <%= link_to t("cancel"), admin_tax_settings_url %>
20
+ <%= button t(:update) %>
21
+ <%= t(:or) %> <%= link_to t(:cancel), admin_tax_settings_url %>
22
22
  </p>
23
23
  <% end %>
@@ -1,18 +1,18 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t("tax_settings") %></h1>
3
+ <h1><%= t(:tax_settings) %></h1>
4
4
 
5
5
  <table id='listing_tax_settings' data-hook>
6
6
  <tr>
7
- <th scope="row"><%= t("show_price_inc_vat") %>:</th>
8
- <td><%= Spree::Config[:show_price_inc_vat] %></td>
7
+ <th scope="row"><%= t(:show_price_inc_vat) %>:</th>
8
+ <td><%= Spree::Config[:show_price_inc_vat] %></td>
9
9
  </tr>
10
10
  <tr>
11
- <th scope="row"><%= t("shipment_inc_vat") %>:</th>
12
- <td><%= Spree::Config[:shipment_inc_vat] %></td>
11
+ <th scope="row"><%= t(:shipment_inc_vat) %>:</th>
12
+ <td><%= Spree::Config[:shipment_inc_vat] %></td>
13
13
  </tr>
14
14
  </table>
15
15
 
16
16
  <p data-hook="buttons">
17
- <%= link_to_with_icon 'edit', t("edit"), edit_admin_tax_settings_path %>
17
+ <%= link_to_with_icon 'edit', t(:edit), edit_admin_tax_settings_path %>
18
18
  </p>
@@ -1,6 +1,6 @@
1
1
  <div data-hook="admin_inside_taxonomy_form">
2
2
  <%= f.field_container :name do %>
3
- <%= f.label :name, t("name") %> <span class="required">*</span><br />
3
+ <%= f.label :name, t(:name) %> <span class="required">*</span><br />
4
4
  <%= error_message_on :taxonomy, :name, :class => 'fullwidth title' %>
5
5
  <%= text_field :taxonomy, :name %>
6
6
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <% content_for :head do %>
2
2
  <%= javascript_tag "var taxonomy_id = #{@taxonomy.id};
3
- var loading = '#{escape_javascript t('loading')}';
4
- var new_taxon = '#{escape_javascript t('new_taxon')}';
5
- var server_error = '#{escape_javascript t('server_error')}';
6
- var taxonomy_tree_error = '#{escape_javascript t('taxonomy_tree_error')}';"
3
+ var loading = '#{escape_javascript t(:loading)}';
4
+ var new_taxon = '#{escape_javascript t(:new_taxon)}';
5
+ var server_error = '#{escape_javascript t(:server_error)}';
6
+ var taxonomy_tree_error = '#{escape_javascript t(:taxonomy_tree_error)}';"
7
7
  %>
8
8
  <% end %>
@@ -1,12 +1,12 @@
1
1
  <table class="index" id='listing_taxonomies' data-hook>
2
2
  <tr data-hook="taxonomies_header">
3
- <th><%= t("name") %></th>
3
+ <th><%= t(:name) %></th>
4
4
  <th></th>
5
5
  </tr>
6
- <% for taxonomy in @taxonomies %>
6
+ <% @taxonomies.each do |taxonomy| %>
7
7
  <tr id="<%= dom_id taxonomy %>" data-hook="taxonomies_row">
8
- <td>
9
- <%= taxonomy.name %>
8
+ <td>
9
+ <%= taxonomy.name %>
10
10
  </td>
11
11
  <td class="actions">
12
12
  <%= link_to_edit taxonomy.id, :class => 'edit' %>
@@ -2,9 +2,9 @@
2
2
  <ul>
3
3
  <% taxon.children.each do |child| %>
4
4
  <li id="<%= child.id %>" rel="taxon">
5
- <a style="background-image: url(<%=child.icon.url%>)" href="#"><%= child.name %></a>
5
+ <a style="background-image: url(<%= child.icon.url %>);" href="#"><%= child.name %></a>
6
6
  <% if child.children.length > 0 %>
7
- <%= render :partial => "taxon", :locals => {:taxon => child} %>
7
+ <%= render :partial => 'taxon', :locals => {:taxon => child} %>
8
8
  <% end %>
9
9
  </li>
10
10
  <% end %>
@@ -1,49 +1,48 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <%= render :partial => "js_head" %>
3
+ <%= render :partial => 'js_head' %>
4
4
 
5
- <h1><%= t("taxonomy_edit")%></h1>
5
+ <h1><%= t(:taxonomy_edit) %></h1>
6
6
 
7
7
  <p id="ajax_error" class="errorExplanation" style="display:none;"></p>
8
8
 
9
- <%= form_for([:admin, @taxonomy]) do |f| %>
9
+ <%= form_for [:admin, @taxonomy] do |f| %>
10
10
  <%= render :partial => 'form', :locals => {:f => f} %>
11
- <div>
12
- <label><%= t("tree")%></label><br />
11
+ <div>
12
+ <%= label_tag nil, t(:tree) %><br />
13
13
  <div id="taxonomy_tree" class="tree"></div>
14
- </div>
15
- <p id="progress" style="display:none;">
16
- <img src="/assets/spinner.gif?1234540747" alt="Spinner" style="vertical-align:bottom;"/> <%= t('updating') %>..
14
+ </div>
15
+ <p id="progress" style="display:none;">
16
+ <%= image_tag 'spinner.gif', :title => 'Spinner', :style => "vertical-align:bottom;" %> <%= t(:updating) %>..
17
17
  </p>
18
- <p><br/><small><%= t("taxonomy_tree_instruction")%></small></p>
18
+ <p><br /><small><%= t(:taxonomy_tree_instruction) %></small></p>
19
19
 
20
- <p class="form-buttons">
21
- <%= button t("update") %> <%= t("or") %> <%= link_to t("cancel"), admin_taxonomies_path %>
22
- </p>
20
+ <p class="form-buttons">
21
+ <%= button t(:update) %> <%= t(:or) %> <%= link_to t(:cancel), admin_taxonomies_path %>
22
+ </p>
23
23
  <% end %>
24
24
 
25
25
 
26
26
  <% content_for :head do %>
27
- <script type="text/javascript">
27
+ <%= javascript_tag do -%>
28
28
  var initial = [
29
- { "attr" :
30
- { "id" : "<%= @taxonomy.root.id %>", "rel" : "root" },
31
- "data" : "<%= @taxonomy.root.name %>",
32
- "state" : "open",
33
- "children" : [
34
- <% @taxonomy.root.children.each_with_index do |taxon,i| %>
35
- {
36
- "attr" :
37
- { "id" : "<%= taxon.id %>"},
38
- "data" : "<%= taxon.name %>"
39
- <% unless taxon.children.empty? %>
40
- ,"state" : "closed"
41
- <% end %>
42
- }<%= "," if i < (@taxonomy.root.children.size - 1) %>
43
- <% end %>
44
- ]
45
- }
29
+ { "attr" :
30
+ { "id" : "<%= @taxonomy.root.id %>", "rel" : "root" },
31
+ "data" : "<%= @taxonomy.root.name %>",
32
+ "state" : "open",
33
+ "children" : [
34
+ <% @taxonomy.root.children.each_with_index do |taxon,i| %>
35
+ {
36
+ "attr" :
37
+ { "id" : "<%= taxon.id %>"},
38
+ "data" : "<%= taxon.name %>"
39
+ <% unless taxon.children.empty? %>
40
+ ,"state" : "closed"
41
+ <% end %>
42
+ }<%= ',' if i < (@taxonomy.root.children.size - 1) %>
43
+ <% end %>
44
+ ]
45
+ }
46
46
  ];
47
-
48
- </script>
47
+ <% end -%>
49
48
  <% end %>
@@ -1,9 +1,9 @@
1
1
  [<% @taxons.each_with_index do |t,i| %>
2
- { "attr" :
3
- { "id" : "<%= t.id %>" },
4
- "data" : "<%= t.name %>"
5
- <% unless t.children.empty? %>
6
- ,"state" : "closed"
7
- <% end %>
8
- }<%= "," if i < (@taxons.size - 1) %>
2
+ { "attr" :
3
+ { "id" : "<%= t.id %>" },
4
+ "data" : "<%= t.name %>"
5
+ <% unless t.children.empty? %>
6
+ ,"state" : "closed"
7
+ <% end %>
8
+ }<%= "," if i < (@taxons.size - 1) %>
9
9
  <% end %>]