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,19 +1,19 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Order Details"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Order Details'} %>
2
2
  <%= csrf_meta_tags %>
3
3
 
4
4
  <div data-hook="admin_order_new_header">
5
- <h2><%= t("new_order")%></h2>
5
+ <h2><%= t(:new_order)%></h2>
6
6
  <%= render 'shared/error_messages', :target => @order %>
7
7
  </div>
8
8
 
9
- <%= render :partial => "add_product" %>
9
+ <%= render :partial => 'add_product' %>
10
10
 
11
11
  <div data-hook="admin_order_new_form">
12
12
  <div id="order-form-wrapper">
13
- <%= render :partial => "form" %>
13
+ <%= render :partial => 'form' %>
14
14
  </div>
15
15
  </div>
16
16
 
17
17
  <% content_for :head do %>
18
- <%= javascript_tag "var expand_variants = true;" %>
18
+ <%= javascript_tag 'var expand_variants = true;' %>
19
19
  <% end %>
@@ -1,20 +1,20 @@
1
- <div class='toolbar order-links' data-hook="admin_order_show_buttons">
2
- <%= button_link_to t("cancel"), fire_admin_order_url(@order.number, {:e => "cancel"}), :icon => 'delete', :confirm => t('are_you_sure') if @order.can_cancel? %>
3
- <%= button_link_to t("edit"), edit_admin_order_url(@order.number), :icon => 'edit' %>
1
+ <div class="toolbar order-links" data-hook="admin_order_show_buttons">
2
+ <%= button_link_to t(:cancel), fire_admin_order_url(@order.number, {:e => "cancel"}), :icon => 'delete', :confirm => t(:are_you_sure) if @order.can_cancel? %>
3
+ <%= button_link_to t(:edit), edit_admin_order_url(@order.number), :icon => 'edit' %>
4
4
  </div>
5
5
 
6
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Order Details"} %>
6
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Order Details'} %>
7
7
 
8
8
  <div data-hook="admin_order_show_addresses">
9
9
  <% if @order.bill_address %>
10
- <div class='adr'>
11
- <h4><%= t("bill_address") %></h4>
10
+ <div class="adr">
11
+ <h4><%= t(:bill_address) %></h4>
12
12
  <%= render :partial => 'admin/shared/address', :locals => {:address => @order.bill_address} %>
13
13
  </div>
14
14
  <% end %>
15
15
  <% if @order.ship_address %>
16
16
  <div class='adr'>
17
- <h4><%= t("ship_address") %></h4>
17
+ <h4><%= t(:ship_address) %></h4>
18
18
  <%= render :partial => 'admin/shared/address', :locals => {:address => @order.ship_address} %>
19
19
  </div>
20
20
  <% end %>
@@ -1,19 +1,19 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Customer Details"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Customer Details'} %>
2
2
  <%= csrf_meta_tags %>
3
3
 
4
4
  <% if @order.cart? %>
5
5
  <div id="add-line-item" data-hook>
6
6
  <fieldset>
7
- <legend><%= t('customer_search') %></legend>
8
- <%= label_tag :customer_search, t("enter_atleast_five_letters") %>
7
+ <legend><%= t(:customer_search) %></legend>
8
+ <%= label_tag :customer_search, t(:enter_at_least_five_letters) %>
9
9
  <%= text_field_tag :customer_search, nil, :class => 'fullwidth title' %>
10
10
  </fieldset>
11
11
  </div>
12
12
  <% end %>
13
13
 
14
- <%= render "shared/error_messages", :target => @order %>
14
+ <%= render 'shared/error_messages', :target => @order %>
15
15
 
16
- <%= form_for(@order, :url => admin_order_url(@order), :html => { :method => :put}) do |f| %>
16
+ <%= form_for @order, :url => admin_order_url(@order), :html => { :method => :put} do |f| %>
17
17
  <%= f.hidden_field :number %>
18
- <%= render :partial => "user_form", :locals => {:f => f} %>
18
+ <%= render :partial => 'user_form', :locals => {:f => f} %>
19
19
  <% end %>
@@ -1,50 +1,50 @@
1
1
  <table data-hook="payment_method">
2
2
  <tr data-hook="name">
3
- <td><label><%=t("name")%></label></td>
4
- <td><%= text_field :payment_method, :name, {"style" => "width:200px"} %></td>
3
+ <td><%= label_tag nil, t(:name) %></td>
4
+ <td><%= text_field :payment_method, :name, {'style' => 'width:200px;'} %></td>
5
5
  </tr>
6
6
  <tr data-hook="description">
7
- <td><label><%=t("description")%></label></td>
7
+ <td><%= label_tag nil, t(:description) %></td>
8
8
  <td><%= text_area :payment_method, :description, {:cols => 60, :rows => 4} %></td>
9
9
  </tr>
10
10
  <tr data-hook="environment">
11
- <td><label><%=t("environment")%></label></td>
11
+ <td><%= label_tag nil, t(:environment) %></td>
12
12
  <td>
13
- <%= collection_select(:payment_method, :environment, Configuration.configurations.keys, :to_s, :titleize, {}, {:id => "gtwy-env"}) %>
13
+ <%= collection_select(:payment_method, :environment, Configuration.configurations.keys, :to_s, :titleize, {}, {:id => 'gtwy-env'}) %>
14
14
  </td>
15
15
  </tr>
16
16
  <tr data-hook="display">
17
- <td><label><%=t("display")%></label></td>
17
+ <td><%= label_tag nil, t(:display) %></td>
18
18
  <td>
19
19
  <%= select(:payment_method, :display_on, PaymentMethod::DISPLAY.collect {|display| [t(display), display == :both ? nil : display.to_s]}) %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr data-hook="active">
23
- <td><label><%= t("active") %></label></td>
23
+ <td><%= label_tag nil, t(:active) %></td>
24
24
  <td>
25
25
  <label class="sub">
26
- <%= radio_button(:payment_method, :active, true ) %>
27
- <%= t("yes") %>
26
+ <%= radio_button :payment_method, :active, true %>
27
+ <%= t(:yes) %>
28
28
  </label> &nbsp;
29
29
  <label class="sub">
30
- <%= radio_button(:payment_method, :active, false ) %>
31
- <%= t("no") %>
30
+ <%= radio_button :payment_method, :active, false %>
31
+ <%= t(:no) %>
32
32
  </label>
33
33
  </td>
34
34
  </tr>
35
35
  </table>
36
36
 
37
- <h2><%= t('settings') %></h2>
37
+ <h2><%= t(:settings) %></h2>
38
38
 
39
39
  <div id="preference-settings" data-hook>
40
- <%= f.label(:type, t("provider")) %>
41
- <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => "gtwy-type"}) %>
40
+ <%= f.label :type, t(:provider) %>
41
+ <%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => 'gtwy-type'}) %>
42
42
 
43
43
  <% unless @object.new_record? %>
44
44
  <%= preference_fields(@object, f) %>
45
45
 
46
46
  <% if @object.respond_to?(:preferences) %>
47
- <div id="gateway-settings-warning" style="color:#FF0000"><%= t('provider_settings_warning')%></div>
47
+ <div id="gateway-settings-warning" style="color:#FF0000;"><%= t(:provider_settings_warning) %></div>
48
48
  <% end %>
49
49
  <% end %>
50
50
  </div>
@@ -1,10 +1,10 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t("editing_payment_method") %></h1>
4
- <%= render "shared/error_messages", :target => @payment_method %>
5
- <%= form_for(@payment_method, :url => admin_payment_method_path(@payment_method), :html => { :method => :put }) do |f| %>
6
- <%= render :partial => "form", :locals => { :f => f } %>
3
+ <h1><%= t(:editing_payment_method) %></h1>
4
+ <%= render 'shared/error_messages', :target => @payment_method %>
5
+ <%= form_for @payment_method, :url => admin_payment_method_path(@payment_method), :html => { :method => :put } do |f| %>
6
+ <%= render :partial => 'form', :locals => { :f => f } %>
7
7
  <p data-hook="buttons">
8
- <%=submit_tag t("update")%>
8
+ <%= submit_tag t(:update) %>
9
9
  </p>
10
10
  <% end %>
@@ -3,22 +3,21 @@
3
3
  <div class="toolbar" data-hook="toolbar">
4
4
  <ul class="actions">
5
5
  <li>
6
- <%= button_link_to t("new_payment_method"), new_object_url, :icon => 'add',
7
- :id => 'admin_new_payment_methods_link' %>
6
+ <%= button_link_to t(:new_payment_method), new_object_url, :icon => 'add', :id => 'admin_new_payment_methods_link' %>
8
7
  </li>
9
8
  </ul>
10
- <br class='clear' />
9
+ <br class="clear" />
11
10
  </div>
12
11
 
13
- <h1><%= t("payment_methods") %></h1>
12
+ <h1><%= t(:payment_methods) %></h1>
14
13
 
15
14
  <table class="index" id='listing_payment_methods'>
16
15
  <tr data-hook="admin_payment_methods_index_headers">
17
- <th><%= t("name") %></th>
18
- <th><%= t("provider") %></th>
19
- <th><%= t("environment") %></th>
20
- <th><%= t("display") %></th>
21
- <th><%= t("active") %></th>
16
+ <th><%= t(:name) %></th>
17
+ <th><%= t(:provider) %></th>
18
+ <th><%= t(:environment) %></th>
19
+ <th><%= t(:display) %></th>
20
+ <th><%= t(:active) %></th>
22
21
  <th data-hook="admin_payment_methods_index_header_actions"></th>
23
22
  </tr>
24
23
  <tbody>
@@ -27,7 +26,7 @@
27
26
  <td width="120px"><%= method.name %></td>
28
27
  <td width="140px"><%= method.type %></td>
29
28
  <td width="100px"><%= method.environment.to_s.titleize %></td>
30
- <td width="60px"><%= method.display_on.blank? ? t('both') : t(method.display_on) %></td>
29
+ <td width="60px"><%= method.display_on.blank? ? t(:both) : t(method.display_on) %></td>
31
30
  <td width="60px"><%= method.active ? t(:yes) : t(:no) %></td>
32
31
  <td width="140px" data-hook="admin_payment_methods_index_row_actions">
33
32
  <%= link_to_edit method, :class => 'edit' %>
@@ -1,11 +1,11 @@
1
1
  <%= render :partial => 'admin/shared/configuration_menu' %>
2
2
 
3
- <h1><%= t("new_payment_method") %></h1>
3
+ <h1><%= t(:new_payment_method) %></h1>
4
4
  <%= render 'shared/error_messages', :target => @payment_method %>
5
5
 
6
- <%= form_for(@payment_method, :url => collection_url) do |f| %>
7
- <%= render :partial => "form", :locals => { :f => f } %>
6
+ <%= form_for @payment_method, :url => collection_url do |f| %>
7
+ <%= render :partial => 'form', :locals => { :f => f } %>
8
8
  <p data-hook="buttons">
9
- <%= submit_tag t("create") %>
9
+ <%= submit_tag t(:create) %>
10
10
  </p>
11
11
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <% order_form.fields_for :checkout do |checkout_form| %>
3
3
 
4
4
  <% checkout_form.fields_for :bill_address do |ba_form| %>
5
- <%= render :partial => "admin/shared/address_form", :locals => {:f => ba_form, :name => t('billing_address')} %>
5
+ <%= render :partial => 'admin/shared/address_form', :locals => {:f => ba_form, :name => t(:billing_address)} %>
6
6
  <% end %>
7
7
 
8
8
  <% end %>
@@ -1,15 +1,15 @@
1
1
  <p>
2
- <%= f.label :amount, t(:amount) %>
3
- <%= f.text_field :amount, :size=> 8, :value => @order.outstanding_balance %>
4
- </p>
2
+ <%= f.label :amount, t(:amount) %>
3
+ <%= f.text_field :amount, :size => 8, :value => @order.outstanding_balance %>
4
+ </p>
5
5
 
6
6
  <% @payment_methods.each do |method| %>
7
7
 
8
8
  <label data-hook="payment_method">
9
- <%= radio_button_tag "payment[payment_method_id]", method.id, method == @payment_method %>
9
+ <%= radio_button_tag 'payment[payment_method_id]', method.id, method == @payment_method %>
10
10
  <%= t(method.name, :scope => :payment_methods, :default => method.name) %>
11
11
  </label>
12
12
 
13
13
  <%= render "admin/payments/source_forms/#{method.method_type}", :payment_method => method %>
14
14
 
15
- <% end %>
15
+ <% end %>
@@ -1,15 +1,15 @@
1
1
  <table class="index">
2
2
  <tr data-hook="payments_header">
3
3
  <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
4
- <th><%= t("amount") %></th>
5
- <th><%= t("payment_method") %></th>
6
- <th><%= t("payment_state") %></th>
7
- <th><%= t("payment_actions") %></th>
4
+ <th><%= t(:amount) %></th>
5
+ <th><%= t(:payment_method) %></th>
6
+ <th><%= t(:payment_state) %></th>
7
+ <th><%= t(:payment_actions) %></th>
8
8
  </tr>
9
9
  <% payments.each do |payment| %>
10
10
  <tr data-hook="payments_row">
11
11
  <td><%= payment.created_at.to_s(:date_time24) %></td>
12
- <td><%= number_to_currency(payment.amount) %></td>
12
+ <td><%= number_to_currency payment.amount %></td>
13
13
  <td><%= link_to payment_method_name(payment), admin_order_payment_path(@order, payment) %></td>
14
14
  <td><%= t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></td>
15
15
  <td>
@@ -1,15 +1,15 @@
1
1
  <fieldset>
2
2
 
3
- <legend><%= t('transactions') %></legend>
3
+ <legend><%= t(:transactions) %></legend>
4
4
 
5
5
  <table class="index">
6
6
  <tr data-hook="transactions_header">
7
- <th><%= t('type') %></th>
8
- <th><%= 'date' %></th>
9
- <th><%= t('amount') %></th>
10
- <th><%= t('response_code') %></th>
7
+ <th><%= t(:type) %></th>
8
+ <th><%= t('spree.date') %></th>
9
+ <th><%= t(:amount) %></th>
10
+ <th><%= t(:response_code) %></th>
11
11
  </tr>
12
- <% for txn in txns %>
12
+ <% txns.each do |txn| %>
13
13
  <tr data-hook="transaction_row">
14
14
  <td>
15
15
  <%= txn.txn_type_name %>
@@ -1,14 +1,14 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Creditcards"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Creditcards'} %>
2
2
 
3
3
  <%= form_tag do %>
4
- <h3><%= t('refund') %></h3>
4
+ <h3><%= t(:refund) %></h3>
5
5
  <fieldset data-hook="credit">
6
6
  <p>
7
- <label for="amount"><%= t("amount") %></label>
7
+ <%= label_tag :amount, t(:amount) %>
8
8
  <%= text_field_tag :amount, @payment.amount %>
9
9
  </p>
10
10
  <p class="form-buttons">
11
- <%= button t("make_refund") %>
12
- </p>
11
+ <%= button t(:make_refund) %>
12
+ </p>
13
13
  </fieldset>
14
14
  <% end %>
@@ -1,22 +1,22 @@
1
1
  <div class="toolbar" data-hook="toolbar">
2
- <ul class='actions'>
2
+ <ul class="actions">
3
3
  <% if @order.outstanding_balance? %>
4
- <li id='new_payment_section'>
5
- <%= button_link_to t("new_payment"), new_admin_order_payment_url(@order), :icon => 'add' %>
4
+ <li id="new_payment_section">
5
+ <%= button_link_to t(:new_payment), new_admin_order_payment_url(@order), :icon => 'add' %>
6
6
  </li>
7
7
  <% end %>
8
8
  </ul>
9
- <br class='clear' />
9
+ <br class="clear" />
10
10
  </div>
11
11
 
12
- <%= render 'admin/shared/order_tabs', :current => "Payments" %>
12
+ <%= render 'admin/shared/order_tabs', :current => 'Payments' %>
13
13
 
14
14
  <% if @order.outstanding_balance? %>
15
- <p><%= @order.outstanding_balance < 0 ? t('credit_owed') : t('balance_due') %> <strong><%= number_to_currency @order.outstanding_balance %></strong></p>
15
+ <p><%= @order.outstanding_balance < 0 ? t(:credit_owed) : t(:balance_due) %> <strong><%= number_to_currency @order.outstanding_balance %></strong></p>
16
16
  <% end %>
17
17
 
18
- <h2><%= t("payments") %></h2>
18
+ <h2><%= t(:payments) %></h2>
19
19
  <%= render 'list', :payments => @payments %>
20
20
 
21
21
 
22
- <%= button_link_to t('continue'), admin_orders_url %>
22
+ <%= button_link_to t(:continue), admin_orders_url %>
@@ -1,19 +1,19 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Payments"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Payments'} %>
2
2
 
3
- <h2><%= t('new') %> <%= t("activerecord.models.#{@payment.class.to_s.underscore}.one") %></h2>
3
+ <h2><%= t(:new) %> <%= t("activerecord.models.#{@payment.class.to_s.underscore}.one") %></h2>
4
4
 
5
- <%= render "shared/error_messages", :target => @payment %>
5
+ <%= render 'shared/error_messages', :target => @payment %>
6
6
 
7
7
  <%= form_for @payment, :url => admin_order_payments_path(@order) do |f| %>
8
8
 
9
- <%= render "form", :f => f %>
9
+ <%= render 'form', :f => f %>
10
10
 
11
11
  <p class="form-buttons" data-hook="buttons">
12
- <%= button @order.cart? ? t('continue') : t('update') %>
12
+ <%= button @order.cart? ? t(:continue) : t(:update) %>
13
13
  </p>
14
14
 
15
15
  <% end %>
16
16
 
17
17
  <% content_for :head do %>
18
- <%= javascript_include_tag '/admin/javascripts/payments/new.js' %>
18
+ <%= javascript_include_tag '/admin/javascripts/payments/new.js' %>
19
19
  <% end %>
@@ -1,9 +1,9 @@
1
- <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Payments"} %>
1
+ <%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Payments'} %>
2
2
 
3
3
  <h2><%= t("activerecord.models.#{@payment.class.to_s.underscore}.one") %></h2>
4
4
 
5
5
  <p data-hook="amount">
6
- <label><%= t("amount") %>:</label>
6
+ <%= label_tag nil, t(:amount) %>
7
7
  <%= @payment.amount %>
8
8
  </p>
9
9
 
@@ -1,7 +1,7 @@
1
1
  <fieldset>
2
2
 
3
3
  <p class="field" data-hook="previous_cards">
4
- <% for card in @previous_cards %>
4
+ <% @previous_cards.each do |card| %>
5
5
  <label><%= radio_button_tag :card, card.id, card == @previous_cards.first %> <%= card.display_number %><br /></label>
6
6
  <% end %>
7
7
  <label><%= radio_button_tag :card, 'new', @previous_cards.none? %> <%= t(:use_new_cc) %></label>
@@ -9,32 +9,32 @@
9
9
 
10
10
  <div id="card_form" data-hook>
11
11
 
12
- <%= image_tag "creditcards/creditcard.gif", :id => 'creditcard-image' %>
12
+ <%= image_tag 'creditcards/creditcard.gif', :id => 'creditcard-image' %>
13
13
  <% param_prefix = "payment_source[#{payment_method.id}]" %>
14
14
 
15
15
  <div data-hook="card_number">
16
- <label for=""><%= t("card_number") %></label><br />
16
+ <%= label_tag nil, t(:card_number) %><br />
17
17
  <%= text_field_tag "#{param_prefix}[number]", '', :class => 'required', :size => 19, :maxlength => 19 %>
18
18
  <span class="req">*</span>
19
19
  &nbsp;
20
20
  <span id="card_type" style="display:none;">
21
- ( <span id="looks_like" ><%= t('card_type_is') %> <span id="type"></span></span>
22
- <span id="unrecognized"><%= t('unrecognized_card_type') %></span>
21
+ ( <span id="looks_like" ><%= t(:card_type_is) %> <span id="type"></span></span>
22
+ <span id="unrecognized"><%= t(:unrecognized_card_type) %></span>
23
23
  )
24
24
  </span>
25
25
  </div>
26
26
  <div data-hook="card_expiration">
27
- <label for=""><%= t("expiration") %></label><br />
27
+ <%= label_tag nil, t(:expiration) %><br />
28
28
  <%= select_month(Date.today, :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true, :class => 'required') %>
29
29
  <%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required') %>
30
30
  <span class="req">*</span>
31
31
  </div>
32
32
  <div data-hook="card_code">
33
- <label for=""><%= t("card_code") %></label><br />
33
+ <%= label_tag nil, t(:card_code) %><br />
34
34
  <%= text_field_tag "#{param_prefix}[verification_value]", '', :class => 'required', :size => 5 %>
35
35
  <span class="req">*</span>
36
36
  <a href="/content/cvv" target="_blank" onclick="window.open(this.href,'cvv_info','left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1');return false">
37
- (<%= t("whats_this") %>)
37
+ (<%= t(:whats_this) %>)
38
38
  </a>
39
39
  </div>
40
40
 
@@ -1,30 +1,30 @@
1
1
  <fieldset data-hook="creditcard">
2
- <legend><%= t('creditcard') %></legend>
2
+ <legend><%= t(:creditcard) %></legend>
3
3
 
4
4
  <table class="index">
5
5
  <tr>
6
- <th colspan="6"><%= t('card_details') %></th>
6
+ <th colspan="6"><%= t(:card_details) %></th>
7
7
  </tr>
8
8
  <tr>
9
- <td><label><%= t("card_number") %>:</label></td>
9
+ <td><%= label_tag nil, t(:card_number) %>:</td>
10
10
  <td>
11
11
  <%= payment.source.display_number %>
12
12
  </td>
13
- <td><label><%= t("expiration") %>:</label></td>
13
+ <td><%= label_tag nil, t(:expiration) %>:</td>
14
14
  <td>
15
15
  <%= payment.source.month %>/<%= payment.source.year %>
16
16
  </td>
17
- <td><label><%= t("card_code") %>:</label></td>
17
+ <td><%= label_tag nil, t(:card_code) %>:</td>
18
18
  <td>
19
19
  <%= payment.source.verification_value %>
20
20
  </td>
21
21
  </tr>
22
22
  <tr>
23
- <td><label><%= t("maestro_or_solo_cards") %>:</label></td>
23
+ <td><%= label_tag nil, t(:maestro_or_solo_cards) %>:</td>
24
24
  <td>
25
25
  <%= payment.source.issue_number %>
26
26
  </td>
27
- <td><label><%= t('start_date') %>:</label></td>
27
+ <td><%= label_tag nil, t(:start_date) %>:</td>
28
28
  <td colspan="3">
29
29
  <%= payment.source.start_month %>/<%= payment.source.start_year %>
30
30
  </td>