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,4 +1,4 @@
1
- <h2>Properties</h2>
1
+ <h2><%= t(:properties) %></h2>
2
2
  <% f.fields_for :product_properties do |properties_form| %>
3
3
  <p data-hook="value">
4
4
  <%= properties_form.label :value, properties_form.object.property.presentation %><br />
@@ -1,9 +1,9 @@
1
1
  <%= render :partial => 'admin/shared/product_sub_menu' %>
2
2
 
3
- <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => "Product Details"} %>
4
- <%= render "shared/error_messages", :target => @product %>
3
+ <%= render :partial => 'admin/shared/product_tabs', :locals => {:current => 'Product Details'} %>
4
+ <%= render 'shared/error_messages', :target => @product %>
5
5
 
6
- <%= form_for([:admin, @product], :html => { :method => :put, :multipart => true }) do |f| %>
6
+ <%= form_for [:admin, @product], :html => { :method => :put, :multipart => true } do |f| %>
7
7
  <%= render :partial => 'form', :locals => {:f => f} %>
8
8
  <%= render :partial => 'admin/shared/edit_resource_links' %>
9
9
  <% end %>
@@ -3,21 +3,21 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li id="new_product_link">
6
- <%= button_link_to t("new_product"), new_object_url, {:remote => true, :icon => 'add', :id => 'admin_new_product'} %>
6
+ <%= button_link_to t(:new_product), new_object_url, {:remote => true, :icon => 'add', :id => 'admin_new_product'} %>
7
7
  </li>
8
8
  </ul>
9
- <br class='clear' />
9
+ <br class="clear" />
10
10
  </div>
11
11
 
12
- <h1><%= "#{t("actions.listing")} #{t("products")}" %></h1>
12
+ <h1><%= "#{t('actions.listing')} #{t(:products)}" %></h1>
13
13
 
14
14
  <div id="new_product" data-hook></div>
15
15
 
16
- <table class="index" id='listing_products'>
16
+ <table class="index" id="listing_products">
17
17
  <tr data-hook="admin_products_index_headers">
18
- <th><%= t("sku") %></th>
19
- <th><%= sort_link @search,:name, t("name"), {}, {:title => 'admin_products_listing_name_title'} %></th>
20
- <th><%= sort_link @search,:master_price, t("master_price") %></th>
18
+ <th><%= t(:sku) %></th>
19
+ <th><%= sort_link @search,:name, t(:name), {}, {:title => 'admin_products_listing_name_title'} %></th>
20
+ <th><%= sort_link @search,:master_price, t(:master_price) %></th>
21
21
  <th data-hook="admin_products_index_header_actions"></th>
22
22
  </tr>
23
23
  <% @collection.each do |product| %>
@@ -46,22 +46,22 @@
46
46
  <%- locals = {:f => f} %>
47
47
  <div data-hook="admin_products_index_search">
48
48
  <p>
49
- <%= f.label :name_contains, t("name") %><br />
49
+ <%= f.label :name_contains, t(:name) %><br />
50
50
  <%= f.text_field :name_contains, :size => 15 %>
51
51
  </p>
52
52
  <p>
53
- <%= f.label :variants_including_master_sku_contains, t("sku") %><br />
53
+ <%= f.label :variants_including_master_sku_contains, t(:sku) %><br />
54
54
  <%= f.text_field :variants_including_master_sku_contains, :size => 15 %>
55
55
  </p>
56
56
  <p>
57
- <%= f.label :deleted_at_is_null, t("show_deleted") %><br />
58
- <%= f.check_box :deleted_at_is_null, {:checked => params[:search][:deleted_at_is_null].blank?}, "", "1" %>
57
+ <%= f.label :deleted_at_is_null, t(:show_deleted) %><br />
58
+ <%= f.check_box :deleted_at_is_null, {:checked => params[:search][:deleted_at_is_null].blank?}, '', '1' %>
59
59
  </p>
60
60
  </div>
61
61
 
62
62
  <div data-hook="admin_products_index_search_buttons">
63
63
  <p class="form-buttons">
64
- <%= button t("search") %>
64
+ <%= button t(:search) %>
65
65
  </p>
66
66
  </div>
67
67
  </div>
@@ -1,29 +1,29 @@
1
1
  <%= render :partial => 'admin/shared/product_sub_menu' %>
2
2
 
3
- <%= render "shared/error_messages", :target => @product %>
3
+ <%= render 'shared/error_messages', :target => @product %>
4
4
 
5
- <%= form_for([:admin, @product], :html => { :multipart => true }) do |f| %>
5
+ <%= form_for [:admin, @product], :html => { :multipart => true } do |f| %>
6
6
  <fieldset data-hook="new_product">
7
7
 
8
8
  <%= f.field_container :name do %>
9
- <%= f.label :name, t("name") %> <span class="required">*</span><br />
9
+ <%= f.label :name, t(:name) %> <span class="required">*</span><br />
10
10
  <%= f.text_field :name, :class => 'fullwidth title' %>
11
11
  <%= f.error_message_on :name %>
12
12
  <% end %>
13
13
 
14
- <div class="clearfix" data-hook="new_product_attrs">
14
+ <div class="clearfix" data-hook="new_product_attrs">
15
15
  <div class="left">
16
16
 
17
17
  <% unless @product.has_variants? %>
18
- <%= f.field_container :sku do %>
19
- <%= f.label :sku, t("sku") %><br />
20
- <%= f.text_field :sku, :size => 16 %>
21
- <%= f.error_message_on :sku %>
22
- <% end %>
18
+ <%= f.field_container :sku do %>
19
+ <%= f.label :sku, t(:sku) %><br />
20
+ <%= f.text_field :sku, :size => 16 %>
21
+ <%= f.error_message_on :sku %>
22
+ <% end %>
23
23
  <% end %>
24
24
 
25
25
  <p>
26
- <%= f.label :prototype_id, t("prototype") %><br />
26
+ <%= f.label :prototype_id, t(:prototype) %><br />
27
27
  <%= f.collection_select :prototype_id, Prototype.all, :id, :name, :include_blank => true %>
28
28
  </p>
29
29
 
@@ -31,13 +31,13 @@
31
31
  <div class="right">
32
32
 
33
33
  <%= f.field_container :price do %>
34
- <%= f.label :price, t("master_price")%> <span class="required">*</span><br />
35
- <%= f.text_field :price %>
36
- <%= f.error_message_on :price%>
34
+ <%= f.label :price, t(:master_price) %> <span class="required">*</span><br />
35
+ <%= f.text_field :price %>
36
+ <%= f.error_message_on :price %>
37
37
  <% end %>
38
38
 
39
39
  <p>
40
- <%= f.label :available_on, t("available_on") %><br />
40
+ <%= f.label :available_on, t(:available_on) %><br />
41
41
  <%= f.error_message_on :available_on %>
42
42
  <%= f.text_field :available_on, :class => 'datepicker', :style => "width:150px" %>
43
43
  </p>
@@ -1,4 +1,4 @@
1
1
  <%= render :partial => 'shared/product_sub_menu' %>
2
- TODO - show product details here <br/><br/>
2
+ TODO - show product details here <br /><br />
3
3
 
4
4
  <%= render :partial => 'shared/show_resource_links' %>
@@ -1,13 +1,13 @@
1
1
  <div data-hook="admin_property_form">
2
2
 
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 %>
6
6
  <%= f.error_message_on :name %>
7
7
  <% end %>
8
8
 
9
9
  <%= f.field_container :presentation do %>
10
- <%= f.label :presentation, t("presentation") %> <span class="required">*</span><br />
10
+ <%= f.label :presentation, t(:presentation) %> <span class="required">*</span><br />
11
11
  <%= f.text_field :presentation %>
12
12
  <%= f.error_message_on :presentation %>
13
13
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <%= render :partial => 'admin/shared/product_sub_menu' %>
2
2
 
3
- <h1><%= t("editing_property") %></h1>
3
+ <h1><%= t(:editing_property) %></h1>
4
4
 
5
5
  <%= render 'shared/error_messages', :target => @property %>
6
6
 
7
- <%= form_for([:admin, @property]) do |f| %>
8
- <%= render :partial => "form", :locals => { :f => f } %>
7
+ <%= form_for [:admin, @property] do |f| %>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
9
  <%= render :partial => 'admin/shared/edit_resource_links' %>
10
10
  <% end %>
@@ -3,23 +3,23 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li id="new_property_link">
6
- <%= button_link_to t("new_property"), new_admin_property_url, {:remote => true, :icon => 'add', 'data-update' => 'new_property', :id => 'new_property_link'} %>
6
+ <%= button_link_to t(:new_property), new_admin_property_url, {:remote => true, :icon => 'add', 'data-update' => 'new_property', :id => 'new_property_link'} %>
7
7
  </li>
8
8
  </ul>
9
- <br class='clear' />
9
+ <br class="clear" />
10
10
  </div>
11
11
 
12
- <h1><%= t("properties") %></h1>
12
+ <h1><%= t(:properties) %></h1>
13
13
 
14
14
  <div id="new_property"></div>
15
15
 
16
- <%= image_tag "spinner.gif", :plugin=>"spree", :style => "display:none", :id => 'busy_indicator' %>
16
+ <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
17
17
 
18
18
  <table class="index" id='listing_properties' data-hook>
19
19
  <thead>
20
20
  <tr data-hook="listing_properties_header">
21
- <th><%= t("name") %></th>
22
- <th><%= t("presentation") %></th>
21
+ <th><%= t(:name) %></th>
22
+ <th><%= t(:presentation) %></th>
23
23
  <th></th>
24
24
  </tr>
25
25
  </thead>
@@ -2,10 +2,10 @@
2
2
 
3
3
  <%= render 'shared/error_messages', :target => @property %>
4
4
 
5
- <%= form_for([:admin, @property]) do |f| %>
5
+ <%= form_for [:admin, @property] do |f| %>
6
6
  <fieldset data-hook="new_property">
7
- <legend><%= t("new_property")%></legend>
8
- <%= render :partial => "form", :locals => { :f => f } %>
7
+ <legend><%= t(:new_property)%></legend>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
9
  <%= render :partial => 'admin/shared/new_resource_links' %>
10
10
  </fieldset>
11
11
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <%= f.field_container :name do %>
2
- <%= f.label :name, t("name") %><br />
2
+ <%= f.label :name, t(:name) %><br />
3
3
  <%= f.text_field :name %>
4
4
  <%= f.error_message_on :name %>
5
5
  <% end %>
6
6
 
7
- <h3><%= t("properties") %></h3>
7
+ <h3><%= t(:properties) %></h3>
8
8
 
9
9
  <ul class='checkbox-list' id='properties' data-hook>
10
10
  <% Property.sorted.each do |property| %>
@@ -15,7 +15,7 @@
15
15
  end %>
16
16
  <li>
17
17
  <label>
18
- <%= check_box_tag "property[id][]", "#{property.id}", selected %>
18
+ <%= check_box_tag 'property[id][]', "#{property.id}", selected %>
19
19
  <%= property.name %>
20
20
  </label>
21
21
  </li>
@@ -24,9 +24,9 @@
24
24
 
25
25
  <hr />
26
26
 
27
- <h3><%= t("option_types") %></h3>
27
+ <h3><%= t(:option_types) %></h3>
28
28
 
29
- <ul class='checkbox-list' id='option_types' data-hook>
29
+ <ul class="checkbox-list" id="option_types" data-hook>
30
30
  <% OptionType.all.each do |option_type| %>
31
31
  <% selected = if @prototype.new_record?
32
32
  (params[:option_type] and params[:option_type][:id] and params[:option_type][:id].include?(option_type.id.to_s))
@@ -35,7 +35,7 @@
35
35
  end %>
36
36
  <li>
37
37
  <label>
38
- <%= check_box_tag "option_type[id][]", "#{option_type.id}", selected %>
38
+ <%= check_box_tag 'option_type[id][]', "#{option_type.id}", selected %>
39
39
  <%= option_type.name %>
40
40
  </label>
41
41
  </li>
@@ -1,7 +1,7 @@
1
1
  <table class="index">
2
2
  <thead>
3
3
  <tr data-hook="avilable_header">
4
- <th><%= t("name") %></th>
4
+ <th><%= t(:name) %></th>
5
5
  <th></th>
6
6
  </tr>
7
7
  </thead>
@@ -10,13 +10,12 @@
10
10
  <tr id="row_<%= prototype.id %>" data-hook="available_row">
11
11
  <td><%= prototype.name %></td>
12
12
  <td class="actions">
13
- <%= link_to icon('add') + ' ' + t("select"), select_admin_prototype_url(prototype),
14
- :class => 'ajax iconlink select_properties_from_prototype' %>
13
+ <%= link_to icon('add') + ' ' + t(:select), select_admin_prototype_url(prototype), :class => 'ajax iconlink select_properties_from_prototype' %>
15
14
  </td>
16
15
  </tr>
17
16
  <% end %>
18
17
  <% if @prototypes.empty? %>
19
- <tr data-hook="available_none"><td colspan="2"><% t("none") %>.</td></tr>
18
+ <tr data-hook="available_none"><td colspan="2"><% t(:none) %>.</td></tr>
20
19
  <% end %>
21
20
  </tbody>
22
21
  </table>
@@ -1,9 +1,9 @@
1
1
  <%= render :partial => 'admin/shared/product_sub_menu' %>
2
- <h1><%= t("editing_prototype") %></h1>
2
+ <h1><%= t(:editing_prototype) %></h1>
3
3
 
4
- <%= render "shared/error_messages", :target => @prototype %>
4
+ <%= render 'shared/error_messages', :target => @prototype %>
5
5
 
6
- <%= form_for([:admin, @prototype]) do |f| %>
7
- <%= render :partial => "form", :locals => { :f => f } %>
6
+ <%= form_for [:admin, @prototype] do |f| %>
7
+ <%= render :partial => 'form', :locals => { :f => f } %>
8
8
  <%= render :partial => 'admin/shared/edit_resource_links' %>
9
9
  <% end %>
@@ -3,23 +3,23 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li id="new_prototype_link">
6
- <%= button_link_to t("new_prototype"), new_admin_prototype_url, {:remote => true, :icon => 'add', 'data-update' => 'new_prototype', :id => 'new_prototype_link'} %>
6
+ <%= button_link_to t(:new_prototype), new_admin_prototype_url, {:remote => true, :icon => 'add', 'data-update' => 'new_prototype', :id => 'new_prototype_link'} %>
7
7
  </li>
8
8
  </ul>
9
- <br class='clear' />
9
+ <br class="clear" />
10
10
  </div>
11
11
 
12
12
 
13
- <h1><%=t("prototypes") %></h1>
13
+ <h1><%= t(:prototypes) %></h1>
14
14
 
15
- <%= image_tag "spinner.gif", :plugin => "spree", :style => "display:none", :id => 'busy_indicator' %>
15
+ <%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display: none', :id => 'busy_indicator' %>
16
16
  <div id="new_prototype"></div>
17
17
 
18
18
  <table class="index" id='listing_prototypes' data-hook>
19
19
  <thead>
20
20
  <tr data-hook="prototypes_header">
21
- <th><%= t("name") %></th>
22
- <th><%= t("action") %></th>
21
+ <th><%= t(:name) %></th>
22
+ <th><%= t(:action) %></th>
23
23
  </tr>
24
24
  </thead>
25
25
  <tbody>
@@ -2,10 +2,10 @@
2
2
 
3
3
  <%= render 'shared/error_messages', :target => @prototype %>
4
4
 
5
- <%= form_for([:admin, @prototype]) do |f| %>
5
+ <%= form_for [:admin, @prototype] do |f| %>
6
6
  <fieldset data-hook="new_prototype">
7
- <legend><%= t("new_prototype")%></legend>
8
- <%= render :partial => "form", :locals => { :f => f } %>
7
+ <legend><%= t(:new_prototype) %></legend>
8
+ <%= render :partial => 'form', :locals => { :f => f } %>
9
9
  <%= render :partial => 'admin/shared/new_resource_links' %>
10
10
  </fieldset>
11
11
  <% end %>
@@ -1,10 +1,10 @@
1
- <h1><%= t("listing_reports") %></h1>
1
+ <h1><%= t(:listing_reports) %></h1>
2
2
 
3
3
  <table class="index">
4
4
  <thead>
5
5
  <tr data-hook="reports_header">
6
- <th><%= t("name") %></th>
7
- <th><%= t("description") %></th>
6
+ <th><%= t(:name) %></th>
7
+ <th><%= t(:description) %></th>
8
8
  </tr>
9
9
  </thead>
10
10
  <tbody>
@@ -1,18 +1,18 @@
1
- <h1><%= t("sales_totals") %> </h1>
1
+ <h1><%= t(:sales_totals) %> </h1>
2
2
 
3
3
  <table class="admin-report" data-hook="sales_total">
4
4
  <tbody>
5
5
  <tr>
6
- <th scope="row"><%= t("item_total") %>:</th>
7
- <td align="right"><%=number_to_currency @item_total%></td>
6
+ <th scope="row"><%= t(:item_total) %>:</th>
7
+ <td align="right"><%= number_to_currency @item_total %></td>
8
8
  </tr>
9
9
  <tr>
10
- <th scope="row"><%= t("adjustment_total") %>:</th>
11
- <td align="right"><%=number_to_currency @adjustment_total%></td>
10
+ <th scope="row"><%= t(:adjustment_total) %>:</th>
11
+ <td align="right"><%= number_to_currency @adjustment_total %></td>
12
12
  </tr>
13
13
  <tr>
14
- <th scope="row"><%= t("sales_total") %>:</th>
15
- <td align="right"><%=number_to_currency @sales_total%></td>
14
+ <th scope="row"><%= t(:sales_total) %>:</th>
15
+ <td align="right"><%= number_to_currency @sales_total %></td>
16
16
  </tr>
17
17
  </tbody>
18
18
  </table>
@@ -1,9 +1,9 @@
1
1
  <table class="index">
2
2
  <tr data-hook="rma_header">
3
- <th><%= t("product") %></th>
4
- <th><%= t("quantity_shipped") %></th>
5
- <th><%= t("quantity_returned") %></th>
6
- <th><%= t("return_quantity") %></th>
3
+ <th><%= t(:product) %></th>
4
+ <th><%= t(:quantity_shipped) %></th>
5
+ <th><%= t(:quantity_returned) %></th>
6
+ <th><%= t(:return_quantity) %></th>
7
7
  </tr>
8
8
  <% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
9
9
  <tr id="<%= dom_id(variant) %>" data-hook="rma_row">
@@ -20,8 +20,7 @@
20
20
  0
21
21
  <% else %>
22
22
  <%= text_field_tag "return_quantity[#{variant.id}]",
23
- @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0,
24
- {:style => "width:30px;"} %>
23
+ @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:30px;'} %>
25
24
  <% end %>
26
25
  </td>
27
26
  </tr>
@@ -29,24 +28,24 @@
29
28
  </table>
30
29
 
31
30
  <%= f.field_container :amount do %>
32
- <%= f.label :amount, t("amount")%> <span class="required">*</span><br />
31
+ <%= f.label :amount, t(:amount) %> <span class="required">*</span><br />
33
32
  <% if @return_authorization.received? %>
34
- <%= number_to_currency(@return_authorization.amount) %>
33
+ <%= number_to_currency @return_authorization.amount %>
35
34
  <% else %>
36
- <%= f.text_field :amount, {:style => "width:80px;"} %> <%= t("rma_value") %>: <span id="rma_value"></span>
35
+ <%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value"></span>
37
36
  <%= f.error_message_on :amount %>
38
37
  <% end %>
39
38
  <% end %>
40
39
 
41
40
  <%= f.field_container :reason do %>
42
- <%= f.label :reason, t("reason")%>
43
- <%= f.text_area :reason, {:style=> "height:100px;", :class => 'fullwidth'} %>
41
+ <%= f.label :reason, t(:reason) %>
42
+ <%= f.text_area :reason, {:style => 'height:100px;', :class => 'fullwidth'} %>
44
43
  <%= f.error_message_on :reason %>
45
44
  <% end %>
46
45
 
47
46
 
48
47
  <% content_for :head do %>
49
- <script type="text/javascript">
48
+ <%= javascript_tag do -%>
50
49
  var variant_prices = new Array();
51
50
  <% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
52
51
  variant_prices[<%= variant.id.to_s %>] = <%= variant.price %>;
@@ -65,7 +64,7 @@
65
64
  }
66
65
  }
67
66
 
68
- jQuery(document).ready(function(){
67
+ $(document).ready(function(){
69
68
  $.each($("td.return_quantity input"), function(i, inpt){
70
69
  $(inpt).delayedObserver(function() {
71
70
  calculate_rma_price();
@@ -74,5 +73,5 @@
74
73
 
75
74
  calculate_rma_price();
76
75
  });
77
- </script>
76
+ <% end -%>
78
77
  <% end %>