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
@@ -3,11 +3,11 @@
3
3
  <h2><%= ProductGroup.human_attribute_name(:products) %> (<%= count %>)</h2>
4
4
 
5
5
  <% if count == 0 %>
6
- <p data-hook="preview_empty"><%= t('no_match_found') %></p>
6
+ <p data-hook="preview_empty"><%= t(:no_match_found) %></p>
7
7
  <% else %>
8
8
 
9
9
  <% if count > Spree::Config[:admin_pgroup_preview_size] %>
10
- <p data-hook="preview_showing"><%= t('showing_first_n', :n => Spree::Config[:admin_pgroup_preview_size]) %></p>
10
+ <p data-hook="preview_showing"><%= t(:showing_first_n, :n => Spree::Config[:admin_pgroup_preview_size]) %></p>
11
11
  <% end %>
12
12
 
13
13
  <table class="index" data-hook="preview">
@@ -1,6 +1,6 @@
1
1
  <tr id="<%= dom_id product_scope %>" data-hook="product_scope">
2
2
  <td data-hook="description">
3
- <label><%= t(:name, :scope => [:product_scopes, :scopes, product_scope.name]) %></label>
3
+ <%= label_tag nil, t(:name, :scope => [:product_scopes, :scopes, product_scope.name]) %>
4
4
  <% if description = t(:description, :scope => [:product_scopes, :scopes, product_scope.name], :default => "") and description.present? %>
5
5
  <br /><%= description %>
6
6
  <% end %>
@@ -10,8 +10,8 @@
10
10
  <table><tr>
11
11
  <% arguments.each_with_index do |argument, i| %>
12
12
  <td>
13
- <label><%= t(argument, :scope => [:product_scopes, :scopes, product_scope.name, :args]) %></label><br />
14
- <%= hidden_field_tag "product_group[product_scopes_attributes][][id]", product_scope.id %>
13
+ <%= label_tag nil, t(argument, :scope => [:product_scopes, :scopes, product_scope.name, :args]) %><br />
14
+ <%= hidden_field_tag 'product_group[product_scopes_attributes][][id]', product_scope.id %>
15
15
  <%= product_scope_field product_scope, i %>
16
16
  </td>
17
17
  <% end %>
@@ -1,19 +1,19 @@
1
1
  <%= render 'admin/shared/product_sub_menu' %>
2
2
 
3
- <h1><%= t('editing_product_group') %></h1>
3
+ <h1><%= t(:editing_product_group) %></h1>
4
4
 
5
5
  <fieldset id="product_group_forms_container" data-hook>
6
6
 
7
- <%= form_for([:admin, @product_group], :html => { :id => 'product-group-form', :method => :put, :remote => true }) do |f| %>
7
+ <%= form_for [:admin, @product_group], :html => { :id => 'product-group-form', :method => :put, :remote => true } do |f| %>
8
8
 
9
9
  <%= f.field_container :name do %>
10
- <%= f.label :name, t("name") %><br />
10
+ <%= f.label :name, t(:name) %><br />
11
11
  <%= f.text_field :name %>
12
12
  <%= f.error_message_on :name %>
13
13
  <% end %>
14
14
 
15
15
  <%= f.field_container :order_scope do %>
16
- <%= f.label :order_scope, t("sort_ordering") %><br />
16
+ <%= f.label :order_scope, t(:sort_ordering) %><br />
17
17
  <%= f.select(:order_scope, Scopes::Product::ORDERING.collect{|p| [ t(:name, :scope =>[:product_scopes, :scopes, p]), p.to_s ] }) %>
18
18
  <% end %>
19
19
 
@@ -21,11 +21,11 @@
21
21
  <%= render :partial => 'product_scope', :collection => @product_group.product_scopes.reject {|s| s.is_ordering? } %>
22
22
  </table>
23
23
 
24
- <%= button t("update") %>
24
+ <%= button t(:update) %>
25
25
 
26
26
  <% end %>
27
27
 
28
- <%= form_tag(admin_product_group_product_scopes_path(@product_group), :remote => true, :id => 'new_product_group_form') do %>
28
+ <%= form_tag admin_product_group_product_scopes_path(@product_group), :remote => true, :id => 'new_product_group_form' do %>
29
29
  <%
30
30
  options =
31
31
  grouped_options_for_select(
@@ -40,9 +40,9 @@
40
40
  )
41
41
  %>
42
42
  <p>
43
- <label for="product_scope_name"><%= t('add_scope') %></label>
44
- <%= select_tag("product_scope[name]", options) %>
45
- <input type="submit" value="<%= t('add') %>" />
43
+ <%= label_tag :product_scope_name, t(:add_scope) %>
44
+ <%= select_tag 'product_scope[name]', options %>
45
+ <%= submit_tag t(:add) %>
46
46
  </p>
47
47
  <% end %>
48
48
 
@@ -2,21 +2,21 @@
2
2
  <div class="toolbar" data-hook="toolbar">
3
3
  <ul class="actions">
4
4
  <li>
5
- <%= button_link_to t("new_product_group"), new_object_url, :icon => 'add', :id => 'new_product_group_link' %>
5
+ <%= button_link_to t(:new_product_group), new_object_url, :icon => 'add', :id => 'new_product_group_link' %>
6
6
  </li>
7
7
  </ul>
8
- <br class='clear' />
8
+ <br class="clear" />
9
9
  </div>
10
10
 
11
- <h1><%= t("listing_product_groups") %></h1>
11
+ <h1><%= t(:listing_product_groups) %></h1>
12
12
 
13
13
  <table class="index" id='listing_product_groups' data-hook>
14
14
  <thead>
15
15
  <tr data-hook="product_group_header">
16
- <th><%= ProductGroup.human_attribute_name("name") %></th>
17
- <th><%= ProductGroup.human_attribute_name("url") %></th>
18
- <th><%= ProductGroup.human_attribute_name("product_scopes") %></th>
19
- <th><%= ProductGroup.human_attribute_name("product_count") %></th>
16
+ <th><%= ProductGroup.human_attribute_name(:name) %></th>
17
+ <th><%= ProductGroup.human_attribute_name(:url) %></th>
18
+ <th><%= ProductGroup.human_attribute_name(:product_scopes) %></th>
19
+ <th><%= ProductGroup.human_attribute_name(:product_count) %></th>
20
20
  <th><%= t(:action) %></th>
21
21
  </tr>
22
22
  </thead>
@@ -25,7 +25,7 @@
25
25
  <tr id="<%= dom_id pg %>" data-hook="product_group_row">
26
26
  <td><%= link_to pg.name, [:admin, pg] %></td>
27
27
  <td><%= link_to pg_search_path(:product_group_name => pg.permalink), pg_search_path(:product_group_name => pg.permalink) %></td>
28
- <td><%== pg.product_scopes.map(&:to_sentence).join("<br />") %></td>
28
+ <td><%== pg.product_scopes.map(&:to_sentence).join('<br />') %></td>
29
29
  <td><%= pg.products.count %></td>
30
30
  <td>
31
31
  <%= link_to_edit pg, :class => 'admin_edit_product_group' %> &nbsp; <%= link_to_delete pg %>
@@ -1,12 +1,12 @@
1
1
  <%= render 'admin/shared/product_sub_menu' %>
2
- <%= form_for([:admin, @product_group], :html => { :id => 'product-group-form', :multipart => true }) do |f| %>
2
+ <%= form_for [:admin, @product_group], :html => { :id => 'product-group-form', :multipart => true } do |f| %>
3
3
  <fieldset data-hook="name">
4
4
  <legend><%= t(:product_group) %></legend>
5
5
  <%= f.field_container :name do %>
6
- <%= f.label :name, t("name") %>
6
+ <%= f.label :name, t(:name) %>
7
7
  <%= f.text_field :name %>
8
8
  <%= f.error_message_on :name %>
9
9
  <% end %>
10
10
  </fieldset>
11
- <%= button t("create") %>
11
+ <%= button t(:create) %>
12
12
  <% end %>
@@ -22,7 +22,7 @@
22
22
  <%= product_scope.to_sentence %>
23
23
  </td>
24
24
  <td>
25
- <%= product_scope.arguments.join(", ") %>
25
+ <%= product_scope.arguments.join(', ') %>
26
26
  </td>
27
27
  </tr>
28
28
  <% end %>
@@ -1,12 +1,12 @@
1
- jQuery('#preview_container').html('<%= escape_javascript( render('admin/product_groups/preview') ) %>');
1
+ $('#preview_container').html('<%= escape_javascript( render('admin/product_groups/preview') ) %>');
2
2
  <% notice = flash[:notice] %>
3
3
  <% flash.delete(:notice) %>
4
4
  flash_notice = jQuery('.flash.notice');
5
5
  if (flash_notice.length > 0) {
6
6
  flash_notice.html('<%= notice %>');
7
7
  } else {
8
- jQuery('#content h1').before('<div class="flash notice"><%= notice %></div>');
8
+ $('#content h1').before('<div class="flash notice"><%= notice %></div>');
9
9
  }
10
10
 
11
11
  //set form action in case permalink changes
12
- jQuery('form#product-group-form').attr('action', '<%= url_for([:admin, @product_group]) %>');
12
+ $('form#product-group-form').attr('action', '<%= url_for([:admin, @product_group]) %>');
@@ -1,11 +1,11 @@
1
1
  <tr class="product_property fields" data-hook="product_property">
2
2
  <td class='property_name'>
3
- <%= f.text_field :property_name, :class => "autocomplete" %>
3
+ <%= f.text_field :property_name, :class => 'autocomplete' %>
4
4
  </td>
5
5
  <td class='value'>
6
- <%= f.text_field :value, :class => "autocomplete" %>
6
+ <%= f.text_field :value, :class => 'autocomplete' %>
7
7
  </td>
8
8
  <td class="actions">
9
- <%= link_to_remove_fields t("remove"), f %>
9
+ <%= link_to_remove_fields t(:remove), f %>
10
10
  </td>
11
11
  </tr>
@@ -1,16 +1,16 @@
1
1
  <%= render :partial => 'admin/shared/product_sub_menu' %>
2
2
 
3
- <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Product Properties"} %>
3
+ <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => 'Product Properties'} %>
4
4
 
5
- <%= render "shared/error_messages", :target => @product %>
5
+ <%= render 'shared/error_messages', :target => @product %>
6
6
 
7
- <%= form_for(@product, :url => admin_product_url(@product), :html => { :method => :put }) do |f| %>
7
+ <%= form_for @product, :url => admin_product_url(@product), :html => { :method => :put } do |f| %>
8
8
  <table class="index">
9
9
  <thead>
10
10
  <tr data-hook="product_properties_header">
11
- <th><%= t("property") %></th>
12
- <th><%= t("value") %></th>
13
- <th><%= t("action") %></th>
11
+ <th><%= t(:property) %></th>
12
+ <th><%= t(:value) %></th>
13
+ <th><%= t(:action) %></th>
14
14
  </tr>
15
15
  </thead>
16
16
  <tbody id="product_properties" data-hook>
@@ -20,28 +20,28 @@
20
20
  </tbody>
21
21
  </table>
22
22
 
23
- <input type="hidden" name="clear_product_properties" value="true">
23
+ <%= hidden_field_tag 'clear_product_properties', 'true' %>
24
24
 
25
25
  <p class="add_product_properties" data-hook="add_product_properties">
26
- <%= link_to_add_fields icon('add') + ' ' + t("add_product_properties"),
27
- "tbody#product_properties",
26
+ <%= link_to_add_fields icon('add') + ' ' + t(:add_product_properties),
27
+ 'tbody#product_properties',
28
28
  f,
29
29
  :product_properties %>
30
30
 
31
31
  &nbsp;&nbsp;
32
32
 
33
33
  <span id="new_ptype_link">
34
- <%= link_to t("select_from_prototype"), available_admin_prototypes_url,
35
- :remote => true, 'data-update' => "prototypes" %>
34
+ <%= link_to t(:select_from_prototype), available_admin_prototypes_url,
35
+ :remote => true, 'data-update' => 'prototypes' %>
36
36
  </span>
37
37
  </p>
38
38
  <div id="prototypes" data-hook></div>
39
- <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
40
- <br/>
39
+ <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
40
+ <br />
41
41
  <%= render :partial => 'admin/shared/edit_resource_links' %>
42
42
  <% end %>
43
43
 
44
- <%= javascript_tag do %>
44
+ <%= javascript_tag do -%>
45
45
  var properties = [<%= @properties.map{|id| "'#{id}'"}.join(', ') %>];
46
46
 
47
47
  $("#product_properties input.autocomplete").live("keydown", function(){
@@ -51,5 +51,5 @@
51
51
  $(this).focus();
52
52
  }
53
53
  });
54
- <% end %>
54
+ <% end -%>
55
55
 
@@ -1,3 +1,3 @@
1
- jQuery('#product_scopes').append('<%= escape_javascript( render('admin/product_groups/product_scope', :product_scope => @product_scope) ) %>');
2
- jQuery('#<%= dom_id @product_scope %>').hide();
3
- jQuery('#<%= dom_id @product_scope %>').fadeIn();
1
+ $('#product_scopes').append('<%= escape_javascript( render('admin/product_groups/product_scope', :product_scope => @product_scope) ) %>');
2
+ $('#<%= dom_id @product_scope %>').hide();
3
+ $('#<%= dom_id @product_scope %>').fadeIn();
@@ -1,3 +1,3 @@
1
- jQuery('#<%= dom_id @product_scope %>').fadeOut();
2
- jQuery('#<%= dom_id @product_scope %>').remove();
3
- jQuery('#preview_container').html('<%= escape_javascript( render('admin/product_groups/preview') ) %>');
1
+ $('#<%= dom_id @product_scope %>').fadeOut();
2
+ $('#<%= dom_id @product_scope %>').remove();
3
+ $('#preview_container').html('<%= escape_javascript( render('admin/product_groups/preview') ) %>');
@@ -1,102 +1,102 @@
1
1
  <div class="clearfix">
2
2
  <div class="left" data-hook="admin_product_form_left">
3
3
  <%= f.field_container :name do %>
4
- <%= f.label :name, t("name") %> <span class="required">*</span><br />
4
+ <%= f.label :name, t(:name) %> <span class="required">*</span><br />
5
5
  <%= f.text_field :name, :class => 'fullwidth title' %>
6
6
  <%= f.error_message_on :name %>
7
7
  <% end %>
8
8
 
9
9
  <%= f.field_container :permalink do %>
10
- <%= f.label :permalink, t("permalink") %> <span class="required">*</span><br />
10
+ <%= f.label :permalink, t(:permalink) %> <span class="required">*</span><br />
11
11
  <%= f.text_field :permalink, :class => 'fullwidth title' %>
12
12
  <%= f.error_message_on :permalink %>
13
13
  <% end %>
14
14
 
15
15
  <%= f.field_container :description do %>
16
- <%= f.label :description, t("description")%><br />
16
+ <%= f.label :description, t(:description)%><br />
17
17
  <%= f.text_area :description, {:cols => 60, :rows => 4, :class => 'fullwidth'} %>
18
18
  <%= f.error_message_on :description %>
19
19
  <% end %>
20
20
  </div>
21
21
  <div class="right" data-hook="admin_product_form_right">
22
22
  <%= f.field_container :price do %>
23
- <%= f.label :price, t("master_price")%> <span class="required">*</span><br>
23
+ <%= f.label :price, t(:master_price) %> <span class="required">*</span><br />
24
24
  <%= f.text_field :price, :value => number_with_precision(@product.price, :precision => 2) %>
25
25
  <%= f.error_message_on :price %>
26
26
  <% end %>
27
27
 
28
28
  <%if Spree::Config[:show_price_inc_vat] %>
29
- <%= label_tag :price_includes_vat , I18n.t(:price_with_vat_included, :price => I18n.t(:price)) %><br>
29
+ <%= label_tag :price_includes_vat , I18n.t(:price_with_vat_included, :price => I18n.t(:price)) %><br />
30
30
  <%= text_field_tag :price_including_vat, product_price(@product, :show_vat_text => false), :size => 30 %>
31
- <script type="text/javascript">
31
+ <%= javascript_tag do -%>
32
32
  var effective_tax_rate = <%= @product.effective_tax_rate %>;
33
- </script>
34
- <%end%>
33
+ <% end -%>
34
+ <% end %>
35
35
 
36
36
  <%= f.field_container :cost_price do %>
37
- <%= f.label :cost_price, t("cost_price")%><br />
37
+ <%= f.label :cost_price, t(:cost_price) %><br />
38
38
  <%= f.text_field :cost_price, :value => number_with_precision(@product.cost_price, :precision => 2) %>
39
39
  <%= f.error_message_on :cost_price %>
40
40
  <% end %>
41
41
 
42
42
  <p>
43
- <%= f.label :available_on, t("available_on") %><br />
43
+ <%= f.label :available_on, t(:available_on) %><br />
44
44
  <%= f.error_message_on :available_on %>
45
45
  <%= f.text_field :available_on, :class => 'datepicker' %>
46
46
  </p>
47
47
 
48
48
  <p>
49
- <%= f.label :sku, t("sku") %><br />
49
+ <%= f.label :sku, t(:sku) %><br />
50
50
  <%= f.text_field :sku, :size => 16 %>
51
51
  </p>
52
52
  <% unless @product.has_variants? %>
53
53
  <% if Spree::Config[:track_inventory_levels] %>
54
54
  <p>
55
- <%= f.label :on_hand, t("on_hand")%><br />
55
+ <%= f.label :on_hand, t(:on_hand) %><br />
56
56
  <%= f.text_field :on_hand, :size => 4 %>
57
57
  </p>
58
58
  <% end %>
59
59
  <ul id="shipping-specs">
60
60
  <li>
61
- <%= f.label :weight, t("weight")%>
61
+ <%= f.label :weight, t(:weight) %>
62
62
  <%= f.text_field :weight, :size => 4 %>
63
63
  </li>
64
64
  <li>
65
- <%= f.label :height, t("height")%>
65
+ <%= f.label :height, t(:height) %>
66
66
  <%= f.text_field :height, :size => 4 %>
67
67
  </li>
68
68
  <li>
69
- <%= f.label :width, t("width")%>
69
+ <%= f.label :width, t(:width) %>
70
70
  <%= f.text_field :width, :size => 4 %>
71
71
  </li>
72
72
  <li>
73
- <%= f.label :depth, t("depth")%>
73
+ <%= f.label :depth, t(:depth) %>
74
74
  <%= f.text_field :depth, :size => 4 %>
75
75
  </li>
76
76
  </ul>
77
77
  <% end %>
78
78
  <p>
79
- <%= f.label :shipping_category_id, t("shipping_categories")%><br />
80
- <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, {:include_blank => true}, {"style" => "width:200px"}) %>
79
+ <%= f.label :shipping_category_id, t(:shipping_categories) %><br />
80
+ <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, {:include_blank => true}, {'style' => 'width:200px'}) %>
81
81
  <%= f.error_message_on :shipping_category %>
82
82
  </p>
83
83
 
84
84
  <p>
85
- <%= f.label :tax_category_id, t("tax_category")%><br />
86
- <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, {:include_blank => true}, {"style" => "width:200px"}) %>
87
- <%= f.error_message_on :tax_category%>
85
+ <%= f.label :tax_category_id, t(:tax_category) %><br />
86
+ <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, {:include_blank => true}, {'style' => 'width:200px'}) %>
87
+ <%= f.error_message_on :tax_category %>
88
88
  </p>
89
89
  </div>
90
90
  </div>
91
91
 
92
- <h2><%= t("metadata") %></h2>
92
+ <h2><%= t(:metadata) %></h2>
93
93
  <div data-hook="admin_product_form_meta">
94
94
  <p>
95
- <%= f.label :meta_keywords, t("meta_keywords")%><br />
95
+ <%= f.label :meta_keywords, t(:meta_keywords) %><br />
96
96
  <%= f.text_field :meta_keywords, :class => 'fullwidth' %>
97
97
  </p>
98
98
  <p>
99
- <%= f.label :meta_description, t("meta_description")%><br />
99
+ <%= f.label :meta_description, t(:meta_description) %><br />
100
100
  <%= f.text_field :meta_description, :class => 'fullwidth' %>
101
101
  </p>
102
102
  </div>
@@ -104,6 +104,6 @@
104
104
 
105
105
  <div data-hook="admin_product_form_additional_fields">
106
106
  <% Variant.additional_fields.select{|af| af[:only].nil? || af[:only].include?(:product) }.each do |field| %>
107
- <%= render :partial => "admin/shared/additional_field", :locals => {:field => field, :f => f} %>
107
+ <%= render :partial => 'admin/shared/additional_field', :locals => {:field => field, :f => f} %>
108
108
  <% end %>
109
109
  </div>
@@ -1,22 +1,22 @@
1
- <h2><%= t("selected_option_types") %></h2>
1
+ <h2><%= t(:selected_option_types) %></h2>
2
2
  <table class="option-types" data-hook="option_types">
3
3
  <thead>
4
4
  <tr data-hook="option_types_header">
5
- <th><%= t("name") %></th>
6
- <th><%= t("display") %></th>
7
- <th><%= t("action") %></th>
5
+ <th><%= t(:name) %></th>
6
+ <th><%= t(:display) %></th>
7
+ <th><%= t(:action) %></th>
8
8
  </tr>
9
9
  </thead>
10
10
  <tbody>
11
11
  <% @product.selected_options.each do |so| %>
12
12
  <tr data-hook="option_types_row">
13
- <td><%=so.option_type.name%></td>
14
- <td><%=so.option_type.presentation%></td>
13
+ <td><%= so.option_type.name%></td>
14
+ <td><%= so.option_type.presentation%></td>
15
15
  <td>
16
- <%= link_to_remote t("remove"),
17
- :url => {:action => 'remove_option_type', :id=> @product, :product_option_type_id => so},
18
- :before => "jQuery('#select-link').hide(); jQuery('#busy_indicator').show()",
19
- :complete => "jQuery('#busy_indicator').hide()",
16
+ <%= link_to_remote t(:remove),
17
+ :url => {:action => 'remove_option_type', :id => @product, :product_option_type_id => so},
18
+ :before => "$('#select-link').hide(); $('#busy_indicator').show()",
19
+ :complete => "$('#busy_indicator').hide()",
20
20
  :update => 'option-type-listing' %>
21
21
  </td>
22
22
  </tr>
@@ -30,11 +30,11 @@
30
30
  </table>
31
31
  <% unless @product.new_record? %>
32
32
  <span id="select-link" data-hook>
33
- <%= link_to_remote icon('delete') + ' ' + t("select_option_type"), {
34
- :url => {:controller => 'option_types', :action => 'select', :id=> @product},
33
+ <%= link_to_remote icon('delete') + ' ' + t(:select_option_type), {
34
+ :url => {:controller => 'option_types', :action => 'select', :id => @product},
35
35
  :update => 'new-option-type'}, :class => 'iconlink' %>
36
36
  </span>
37
- <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
37
+ <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
38
38
  <% end %>
39
- <br/>
39
+ <br />
40
40
  <div id="new-option-type" data-hook></div>