spree 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. data/CHANGELOG +30 -0
  2. data/CONTRIBUTORS +38 -20
  3. data/app/controllers/admin/creditcard_payments_controller.rb +10 -3
  4. data/app/controllers/admin/orders_controller.rb +17 -16
  5. data/app/controllers/admin/products_controller.rb +12 -14
  6. data/app/controllers/admin/reports_controller.rb +12 -14
  7. data/app/controllers/admin/users_controller.rb +10 -5
  8. data/app/controllers/admin/zones_controller.rb +4 -1
  9. data/app/controllers/application.rb +0 -1
  10. data/app/controllers/checkout_controller.rb +96 -0
  11. data/app/controllers/content_controller.rb +11 -1
  12. data/app/controllers/orders_controller.rb +12 -33
  13. data/app/controllers/products_controller.rb +12 -7
  14. data/app/controllers/spree/base_controller.rb +1 -1
  15. data/app/controllers/states_controller.rb +14 -2
  16. data/app/controllers/taxons_controller.rb +6 -2
  17. data/app/controllers/users_controller.rb +9 -6
  18. data/app/helpers/application_helper.rb +1 -11
  19. data/app/helpers/products_helper.rb +3 -1
  20. data/app/helpers/spree/base_helper.rb +0 -26
  21. data/app/models/address.rb +3 -3
  22. data/app/models/app_configuration.rb +1 -0
  23. data/app/models/country.rb +4 -0
  24. data/app/models/creditcard.rb +6 -1
  25. data/app/models/creditcard_payment.rb +1 -1
  26. data/app/models/inventory_unit.rb +4 -1
  27. data/app/models/order.rb +37 -21
  28. data/app/models/product.rb +19 -8
  29. data/{vendor/extensions/shipping/app → app}/models/shipment.rb +20 -4
  30. data/{vendor/extensions/shipping/app → app}/models/shipping_category.rb +0 -0
  31. data/{vendor/extensions/shipping/app → app}/models/shipping_method.rb +6 -4
  32. data/app/models/state.rb +5 -0
  33. data/app/models/user.rb +4 -2
  34. data/app/models/variant.rb +19 -1
  35. data/app/presenters/checkout_presenter.rb +58 -0
  36. data/app/views/admin/creditcard_payments/edit.html.erb +1 -1
  37. data/app/views/admin/option_types/available.html.erb +1 -1
  38. data/app/views/admin/orders/index.html.erb +28 -18
  39. data/app/views/admin/orders/show.html.erb +1 -1
  40. data/app/views/admin/payments/index.html.erb +1 -1
  41. data/app/views/admin/products/_images.html.erb +1 -1
  42. data/app/views/admin/products/index.html.erb +17 -13
  43. data/app/views/admin/users/index.html.erb +8 -8
  44. data/app/views/admin/zones/index.html.erb +5 -2
  45. data/app/views/checkout/_form.html.erb +165 -0
  46. data/app/views/{creditcards → checkout}/cvv.html.erb +1 -1
  47. data/app/views/checkout/new.html.erb +6 -0
  48. data/app/views/layouts/admin.html.erb +2 -3
  49. data/app/views/layouts/application.html.erb +1 -1
  50. data/app/views/orders/_form.html.erb +6 -4
  51. data/app/views/orders/_google_order.html.erb +24 -0
  52. data/app/views/orders/_line_item.html.erb +2 -1
  53. data/app/views/orders/show.html.erb +4 -1
  54. data/app/views/products/index.html.erb +2 -1
  55. data/app/views/products/show.html.erb +4 -4
  56. data/app/views/shared/_footer.html.erb +12 -1
  57. data/app/views/shared/_login.html.erb +1 -1
  58. data/app/views/shared/_order_details.html.erb +8 -9
  59. data/app/views/shared/_products.html.erb +1 -1
  60. data/app/views/shared/_report_criteria.html.erb +28 -28
  61. data/app/views/states/index.js.erb +10 -1
  62. data/config/environment.rb +10 -4
  63. data/config/initializers/searchlogic.rb +6 -0
  64. data/config/locales/de.yml +14 -0
  65. data/config/locales/en-GB.yml +20 -6
  66. data/config/locales/en-US.yml +20 -4
  67. data/config/locales/es.yml +14 -0
  68. data/config/locales/fr-FR.yml +463 -0
  69. data/config/locales/fr-FR_rails.yml +115 -0
  70. data/config/locales/it.yml +14 -0
  71. data/config/locales/nb-NO.yml +457 -0
  72. data/config/locales/nb-NO_rails.yml +105 -0
  73. data/config/locales/pl.yml +14 -0
  74. data/config/locales/pt-BR.yml +14 -0
  75. data/config/locales/pt-PT.yml +14 -0
  76. data/config/locales/ru-RU.yml +458 -0
  77. data/config/locales/ru-RU_rails.yml +154 -0
  78. data/config/routes.rb +11 -4
  79. data/db/migrate/20090204200045_add_order_permalink.rb +13 -0
  80. data/db/migrate/20090225231119_add_more_needed_keys_items_and_conf.rb +19 -0
  81. data/db/migrate/20090302221152_give_all_users_user_role.rb +13 -0
  82. data/db/sample/orders.yml +1 -1
  83. data/lib/generators/instance/instance_generator.rb +1 -1
  84. data/lib/spree.rb +1 -1
  85. data/lib/spree/setup.rb +1 -1
  86. data/lib/tasks/database.rake +5 -2
  87. data/lib/tasks/release.rake +1 -1
  88. data/lib/tasks/upgrade.rake +11 -0
  89. data/public/assets/products/1009/mini/sean.jpg +0 -0
  90. data/public/assets/products/1009/original/sean.jpg +0 -0
  91. data/public/assets/products/1009/product/sean.jpg +0 -0
  92. data/public/assets/products/1009/small/sean.jpg +0 -0
  93. data/public/images/ajax_loader.gif +0 -0
  94. data/public/javascripts/checkout.js +284 -0
  95. data/public/javascripts/jquery-1.3.2.min.js +19 -0
  96. data/public/javascripts/jquery.validate.pack.js +15 -0
  97. data/public/stylesheets/checkout.css +25 -0
  98. data/public/stylesheets/spree-admin.css +6 -2
  99. data/public/stylesheets/spree.css +419 -432
  100. data/spec/controllers/countries_controller_spec.rb +3 -2
  101. data/spec/controllers/orders_controller_spec.rb +7 -5
  102. data/spec/controllers/states_controller_spec.rb +4 -2
  103. data/spec/models/creditcard_payment_spec.rb +6 -2
  104. data/spec/models/order_spec.rb +164 -157
  105. data/spec/models/product_spec.rb +2 -2
  106. data/vendor/extensions/payment_gateway/db/migrate/20090218091936_create_protx_gateway.rb +18 -0
  107. data/vendor/extensions/payment_gateway/lib/spree/payment_gateway.rb +7 -5
  108. data/vendor/extensions/shipping/app/controllers/admin/shipments_controller.rb +6 -5
  109. data/vendor/extensions/shipping/app/views/admin/shipments/index.html.erb +1 -1
  110. data/vendor/extensions/shipping/config/locales/nb-NO.yml +25 -0
  111. data/vendor/extensions/shipping/config/locales/ru-RU.yml +25 -0
  112. data/vendor/extensions/shipping/db/sample/shipping_methods.yml +5 -1
  113. data/vendor/extensions/shipping/db/sample/zone_members.yml +9 -1
  114. data/vendor/extensions/shipping/db/sample/zones.yml +4 -1
  115. data/vendor/extensions/shipping/lib/spree/shipping_calculator.rb +0 -16
  116. data/vendor/extensions/shipping/shipping_extension.rb +0 -15
  117. data/vendor/extensions/shipping/spec/models/shipping_method_spec.rb +16 -10
  118. data/vendor/extensions/shipping/spec/models/shipping_order_spec.rb +3 -17
  119. data/vendor/extensions/tax_calculator/config/locales/nb-NO.yml +30 -0
  120. data/vendor/extensions/tax_calculator/spec/models/{order_spec.rb → order_tax_calc_spec.rb} +2 -2
  121. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/.specification +3 -5
  122. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/LICENSE +0 -0
  123. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/README +9 -2
  124. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/Rakefile +0 -0
  125. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/lib/active_presenter.rb +0 -0
  126. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/lib/active_presenter/base.rb +38 -8
  127. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/lib/active_presenter/version.rb +1 -1
  128. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/lib/tasks/doc.rake +0 -0
  129. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/lib/tasks/gem.rake +0 -0
  130. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/test/base_test.rb +66 -30
  131. data/vendor/gems/{active_presenter-0.0.4 → active_presenter-0.0.6}/test/test_helper.rb +36 -0
  132. data/vendor/plugins/attribute_fu/lib/attribute_fu/associated_form_helper.rb +12 -4
  133. data/vendor/plugins/find_by_param/MIT-LICENSE +1 -1
  134. data/vendor/plugins/find_by_param/{README → README.markdown} +7 -1
  135. data/vendor/plugins/find_by_param/init.rb +0 -1
  136. data/vendor/plugins/find_by_param/lib/find_by_param.rb +23 -87
  137. data/vendor/plugins/find_by_param/test/find_by_param_test.rb +22 -8
  138. data/vendor/plugins/find_by_param/test/test_helper.rb +0 -1
  139. metadata +65 -193
  140. data/app/controllers/creditcards_controller.rb +0 -73
  141. data/app/models/order_filter.rb +0 -28
  142. data/app/models/user_filter.rb +0 -6
  143. data/app/views/creditcards/_form_credit_card.html.erb +0 -30
  144. data/app/views/creditcards/new.html.erb +0 -25
  145. data/app/views/shared/_paginate.html.erb +0 -34
  146. data/lib/plugins/paginating_find/CHANGELOG +0 -120
  147. data/lib/plugins/paginating_find/README +0 -89
  148. data/lib/plugins/paginating_find/init.rb +0 -2
  149. data/lib/plugins/paginating_find/lib/paginating_find.rb +0 -138
  150. data/lib/plugins/paginating_find/lib/paging_enumerator.rb +0 -158
  151. data/lib/plugins/paginating_find/lib/paging_helper.rb +0 -47
  152. data/lib/plugins/paginating_find/test_app/Rakefile +0 -10
  153. data/lib/plugins/paginating_find/test_app/app/controllers/application.rb +0 -2
  154. data/lib/plugins/paginating_find/test_app/config/boot.rb +0 -44
  155. data/lib/plugins/paginating_find/test_app/config/database.yml +0 -6
  156. data/lib/plugins/paginating_find/test_app/config/environment.rb +0 -53
  157. data/lib/plugins/paginating_find/test_app/config/environments/test.rb +0 -19
  158. data/lib/plugins/paginating_find/test_app/config/routes.rb +0 -22
  159. data/lib/plugins/paginating_find/test_app/script/breakpointer +0 -3
  160. data/lib/plugins/paginating_find/test_app/script/console +0 -3
  161. data/lib/plugins/paginating_find/test_app/test/fixtures/articles.yml +0 -19
  162. data/lib/plugins/paginating_find/test_app/test/fixtures/authors.yml +0 -7
  163. data/lib/plugins/paginating_find/test_app/test/fixtures/edits.yml +0 -11
  164. data/lib/plugins/paginating_find/test_app/test/fixtures/models.rb +0 -18
  165. data/lib/plugins/paginating_find/test_app/test/test_helper.rb +0 -33
  166. data/lib/plugins/paginating_find/test_app/test/unit/abstract_test.rb +0 -7
  167. data/lib/plugins/paginating_find/test_app/test/unit/group_test.rb +0 -40
  168. data/lib/plugins/paginating_find/test_app/test/unit/paginating_find_test.rb +0 -194
  169. data/lib/plugins/paginating_find/test_app/test/unit/paging_enumerator_test.rb +0 -143
  170. data/public/assets/products/1012/mini/bt.jpg +0 -0
  171. data/public/assets/products/1012/original/bt.jpg +0 -0
  172. data/public/assets/products/1012/product/bt.jpg +0 -0
  173. data/public/assets/products/1012/small/bt.jpg +0 -0
  174. data/spec/views/products/index.html.erb_spec.rb +0 -46
  175. data/spec/views/products/show.html.erb_spec.rb +0 -46
  176. data/vendor/extensions/shipping/app/controllers/shipments_controller.rb +0 -96
  177. data/vendor/extensions/shipping/app/helpers/shipments_helper.rb +0 -20
  178. data/vendor/extensions/shipping/app/views/orders/fatal_shipping.html.erb +0 -6
  179. data/vendor/extensions/shipping/app/views/shipments/_form.html.erb +0 -46
  180. data/vendor/extensions/shipping/app/views/shipments/edit.html.erb +0 -57
  181. data/vendor/extensions/shipping/app/views/shipments/new.html.erb +0 -10
@@ -1,7 +1,7 @@
1
1
  <%= stylesheets %>
2
2
 
3
3
  <div class="cvv">
4
- <h2><%= t("what_is_a_cvv_credit_card_code") %></h2>
4
+ <h2><%= t("what_is_a_cvv") %></h2>
5
5
  <p>For Visa, MasterCard, and Discover cards, the card code is the last 3 digit number located on the back of your card on or above your signature line. For an American Express card, it is the 4 digits on the FRONT above the end of your card number.</p>
6
6
  <p>To help reduce fraud in the card-not-present environment, credit card companies have introduced a card code program. Visa calls this code Card Verification Value (CVV); MasterCard calls it Card Validation Code (CVC); Discover calls it Card ID (CID). The card code is a three- or four- digit security code that is printed on the back of cards. The number typically appears at the end of the signature panel.</p>
7
7
  <div class="cid-caption">Visa</div>
@@ -0,0 +1,6 @@
1
+ <div id="checkout">
2
+ <h1><%= t("checkout")%></h1>
3
+ <% form_for(:checkout_presenter, :url => "/orders/#{@order.number}/complete", :html => { :method => :put, :id => 'checkout_form'}) do |f| %>
4
+ <%= render :partial => 'form', :locals => {:f => f} %>
5
+ <% end %>
6
+ </div>
@@ -4,11 +4,10 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
6
  <title><%= "Spree #{t('administration')}: #{controller.controller_name.titleize}" %></title>
7
- <%= stylesheets %>
7
+ <%= stylesheets %>
8
8
  <%= stylesheet_link_tag "spree-admin.css", :plugin => "spree" %>
9
9
  <%= javascript_include_tag :defaults %>
10
- <%= javascript_include_tag 'spree.js' %>
11
-
10
+ <%= javascript_include_tag 'spree.js' %>
12
11
  <%= yield :head %>
13
12
  </head>
14
13
  <body class="yui-skin-sam">
@@ -3,8 +3,8 @@
3
3
  <html xmlns="http://www.w3.org/1999/xhtml">
4
4
  <head>
5
5
  <title>Spree</title>
6
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6
7
  <%= stylesheets %>
7
- <%= javascript_include_tag :defaults %>
8
8
  <%= yield :head %>
9
9
  </head>
10
10
  <body>
@@ -1,9 +1,11 @@
1
1
  <table class="cart-summary" width="100% ">
2
2
  <thead>
3
- <th colspan="2"><%= t("item") %></th>
4
- <th><%= t("price") %></th>
5
- <th><%= t("qty") %></th>
6
- <th><%= t("total") %></th>
3
+ <tr>
4
+ <th colspan="2"><%= t("item") %></th>
5
+ <th><%= t("price") %></th>
6
+ <th><%= t("qty") %></th>
7
+ <th><%= t("total") %></th>
8
+ </tr>
7
9
  </thead>
8
10
  <tbody id="line_items">
9
11
  <%= f.render_associated_form(@order.line_items) %>
@@ -0,0 +1,24 @@
1
+ <script type="text/javascript">
2
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
3
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
4
+ </script>
5
+ <script type="text/javascript">
6
+ var pageTracker = _gat._getTracker("<%= Spree::Config[:google_analytics_id] %>");
7
+ pageTracker._initData();
8
+ pageTracker._trackPageview();
9
+ pageTracker._addTrans(
10
+ "<%= order.number %>", //Order Number
11
+ "", //Affiliation
12
+ "<%= order.total %>", //Order total
13
+ "<%= order.tax_amount %>", //Tax Amount
14
+ "<%= order.ship_amount %>", //Ship Amount
15
+ "", //City
16
+ "", //State
17
+ "" //Country
18
+ );
19
+ <% order.line_items.each do |line_item| -%>
20
+ pageTracker._addItem("<%= order.number %>", "<%= line_item.variant.sku %>", "<%= line_item.variant.product.name %>",
21
+ "" /*Product Category*/, "<%= line_item.price %>", "<%= line_item.quantity %>");
22
+ <% end -%>
23
+ pageTracker._trackTrans();
24
+ </script>
@@ -6,7 +6,8 @@
6
6
  <td valign="top">
7
7
  <%= link_to variant.product.name, product_path(variant.product) %>
8
8
  <%= variant_options variant %><br/>
9
- <%= truncate(variant.product.description, length = 100, truncate_string = "...") %>
9
+ <%= truncate(variant.product.description, :length => 100, :omission => "...") %>
10
+
10
11
  </td>
11
12
  <td valign="top" width="75">
12
13
  <%= product_price(line_item) %>
@@ -5,7 +5,10 @@
5
5
  <br/><br/>
6
6
  <h1><%= t('order_processed_successfully') %></h1>
7
7
  <br/>
8
- <%= t('thank_you_for_your_order') %>
8
+ <%= t('thank_you_for_your_order') %>
9
+ <% if Spree::Config[:google_analytics_id] and not %w{development test}.include? RAILS_ENV %>
10
+ <%= render :partial => "orders/google_order", :locals => {:order => @order} %>
11
+ <% end %>
9
12
  <% else %>
10
13
  | <%= link_to t('my_account'), user_path(current_user) %>
11
14
  <% end %>
@@ -8,4 +8,5 @@
8
8
  <%= render :partial => "shared/taxonomies" %>
9
9
  </td>
10
10
  <% end %>
11
- <%= render :partial => 'shared/paginate', :locals => {:collection => @products, :options => {}} unless @products.empty? %>
11
+
12
+ <%= page_links(:prev => "&#171; #{t('previous')}", :next => "#{t('next')} &#187;") if @search.page_count > 1 %>
@@ -33,10 +33,10 @@
33
33
  <td>
34
34
  <div id="variants">
35
35
  <ul>
36
- <% @product.variants.each do |v| %>
36
+ <% @product.variants.active.each_with_index do |v,index| %>
37
37
  <% next if v.option_values.empty? %>
38
- <li>
39
- <input type="radio" name="variant[id]" value="<%= v.id %>" <%= @product.variants.first == v ? 'checked="checked"' : '' %> <%= 'disabled' unless v.in_stock or Spree::Config[:show_zero_stock_products] %> />
38
+ <li>
39
+ <input type="radio" name="quantities[<%= @product.id %>]" value="<%= "#{v.id}=1" %>" <%= index == 1 ? 'checked="checked"' : '' %> <%= 'disabled' unless v.in_stock or Spree::Config[:show_zero_stock_products] %> />
40
40
  <%= variant_options v %>
41
41
  <% if variant_price_diff v %>
42
42
  <span class="price-diff"><%= variant_price_diff v %></span>
@@ -48,7 +48,7 @@
48
48
  </td>
49
49
  </tr>
50
50
  <% else %>
51
- <tr><td><input type="hidden" name="variant[id]" value="<%=@product.variants.first.id %>"/></td></tr>
51
+ <tr><td><input type="hidden" name="quantities[<%= @product.id %>]" value="<%= "#{@product.variants.first.id}=1" %>"/></td></tr>
52
52
  <% end%>
53
53
  <tr>
54
54
  <td>
@@ -2,4 +2,15 @@
2
2
  <p>
3
3
  Powered by <a href="http://spreehq.org">Spree</a>
4
4
  </p>
5
- </div>
5
+ </div>
6
+ <% if Spree::Config[:google_analytics_id] and not %w{development test}.include? RAILS_ENV and not params[:checkout_complete] %>
7
+ <script type="text/javascript">
8
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
9
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
10
+ </script>
11
+ <script type="text/javascript">
12
+ var pageTracker = _gat._getTracker("<%= Spree::Config[:google_analytics_id] %>");
13
+ pageTracker._initData();
14
+ pageTracker._trackPageview();
15
+ </script>
16
+ <% end %>
@@ -13,5 +13,5 @@
13
13
  </td>
14
14
  </tr>
15
15
  </table>
16
- <p><%= submit_tag t("log_in") %>
16
+ <p><%= submit_tag t("log_in") %></p>
17
17
  <% end %>
@@ -1,9 +1,4 @@
1
1
  <table class="order-summary">
2
- <!-->
3
- <tr>
4
- <th colspan="4" id="order-num"><%= t('order') %> # <%=@order.number%></th>
5
- </tr>
6
- -->
7
2
  <tr>
8
3
  <th><%= t('item_description') %></th>
9
4
  <th><%= t('price') %></th>
@@ -24,14 +19,18 @@
24
19
  </tr>
25
20
  <tr>
26
21
  <td colspan="3"><b><%= t('tax') %>:</b></td>
27
- <td><%= number_to_currency @order.tax_amount -%></td>
22
+ <td><span id="tax_amount"><%= number_to_currency @order.tax_amount -%></span></td>
28
23
  </tr>
29
24
  <tr>
30
- <td colspan="3"><b><%= t('shipping') %>:</b> (<%= @order.shipment.shipping_method.name %>)</td>
31
- <td><%= number_to_currency @order.ship_amount -%></td>
25
+ <td colspan="3"><b><%= t('shipping') %>:</b>
26
+ <% if @order.shipment && @order.shipment.shipping_method %>
27
+ <span id="ship_method">(<%= @order.shipment.shipping_method.name %>)</span>
28
+ <% end %>
29
+ </td>
30
+ <td><span id="ship_amount"><%= number_to_currency @order.ship_amount -%></span></td>
32
31
  </tr>
33
32
  <tr>
34
33
  <td colspan="3"><b><%= t('order_total') %>:</b></td>
35
- <td><%= number_to_currency @order.total -%></td>
34
+ <td><span id="order_total"><%= number_to_currency @order.total -%></span></td>
36
35
  </tr>
37
36
  </table>
@@ -1,4 +1,4 @@
1
- <div id="product-listing">
1
+ <div class="product-listing">
2
2
  <ul class="product-listing">
3
3
  <% products.each do |product| %>
4
4
  <% if Spree::Config[:show_zero_stock_products] || product.has_stock? %>
@@ -2,32 +2,32 @@
2
2
  <%= calendar_date_select_includes %>
3
3
  <% end %>
4
4
  <td valign="top">
5
- <% form_for :search do |f| %>
6
- <div id="report-search">
7
- <table class="admin-search">
8
- <thead>
9
- <tr>
10
- <th colspan="2"><%= t("date_range") %></th>
11
- </tr>
12
- </thead>
13
- <tbody>
14
- <tr>
15
- <td><%= t("start") %>:</td>
16
- <td>
17
- <%= error_message_on :filter, :start%>
18
- <%= calendar_date_select :filter, :start, :style=>"width:100px" %>
19
- </td>
20
- </tr>
21
- <tr>
22
- <td><%= t("stop") %>:</td>
23
- <td>
24
- <%= error_message_on :filter, :stop%>
25
- <%= calendar_date_select :filter, :stop, :style=>"width:100px" %>
26
- </td>
27
- </tr>
28
- </tbody>
29
- </table>
30
- <%=submit_tag t('search') %>
31
- </div>
32
- <% end %>
5
+ <% form_for [:admin, @search], :url => "" do |f| %>
6
+ <% f.fields_for @search.conditions do |s| %>
7
+ <div id="search-col">
8
+ <table class="admin-search">
9
+ <thead>
10
+ <tr>
11
+ <th colspan="2"><%= t("date_range") %></th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <tr>
16
+ <td><%= t("start") %>:</td>
17
+ <td>
18
+ <%= s.calendar_date_select :created_at_after, :style=>"width:100px" %>
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <td><%= t("stop") %>:</td>
23
+ <td>
24
+ <%= s.calendar_date_select :created_at_before, :style=>"width:100px" %>
25
+ </td>
26
+ </tr>
27
+ </tbody>
28
+ </table>
29
+ <%= f.submit t("search") %>
30
+ </div>
31
+ <% end %>
32
+ <% end %>
33
33
  </td>
@@ -1 +1,10 @@
1
- <%= auto_complete_result @states, :name %>
1
+ <%=
2
+ def inner(ct)
3
+ ct[''] = ''
4
+ ct.sort.map {|nm,id| '"' + id.to_s + '":"' + nm + '"'}.join(',')
5
+ end
6
+ "{" + @state_info.
7
+ to_a.
8
+ map {|cv,ct| cv + " : {" + inner(ct) + "}" }.
9
+ join(",") + "}"
10
+ %>
@@ -5,7 +5,7 @@
5
5
  # ENV['RAILS_ENV'] ||= 'production'
6
6
 
7
7
  # Specifies gem version of Rails to use when vendor/rails is not present
8
- SPREE_GEM_VERSION = '0.6.0' unless defined? SPREE_GEM_VERSION
8
+ SPREE_GEM_VERSION = '0.7.0' unless defined? SPREE_GEM_VERSION
9
9
 
10
10
  # Bootstrap the Rails environment, frameworks, and default configuration
11
11
  require File.join(File.dirname(__FILE__), 'boot')
@@ -29,8 +29,11 @@ Spree::Initializer.run do |config|
29
29
  config.gem "highline", :version => '1.4.0'
30
30
  config.gem "activemerchant", :lib => "active_merchant", :version => '1.4.1'
31
31
  config.gem "tlsmail"
32
- config.gem 'active_presenter', :version => '0.0.4'
32
+ config.gem 'active_presenter', :version => '0.0.6'
33
33
  config.gem 'activerecord-tableless', :lib => 'tableless', :version => '0.1.0'
34
+ #config.gem 'searchlogic', :version => '1.6.3'
35
+ # HACKED version of search logic - we'll move back when our fix is accepted into core
36
+ config.gem 'schof-searchlogic', :lib => 'searchlogic', :version => '0.0.2'
34
37
 
35
38
  # Only load the plugins named here, in the order given. By default, all plugins
36
39
  # in vendor/plugins are loaded in alphabetical order.
@@ -75,9 +78,12 @@ Spree::Initializer.run do |config|
75
78
  # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
76
79
  # All files from config/locales/*.rb,yml are added automatically.
77
80
  #config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
78
- config.i18n.default_locale = :'en-US'
81
+ config.i18n.default_locale = :'en-US'
82
+
79
83
  end
80
84
 
85
+ Time::DATE_FORMATS[:date_time24] = "%Y-%m-%d %H:%M"
86
+
81
87
  # Add new inflection rules using the following format
82
88
  # (all these examples are active by default):
83
89
  # Inflector.inflections do |inflect|
@@ -91,4 +97,4 @@ end
91
97
  # Mime::Type.register "text/richtext", :rtf
92
98
  # Mime::Type.register "application/x-mobile", :mobile
93
99
 
94
- # Include your application configuration below
100
+ # Include your application configuration below
@@ -0,0 +1,6 @@
1
+ # config/initializers/searchlogic.rb
2
+
3
+ # global configuration switches
4
+ Searchlogic::Config.configure do |config|
5
+ config.helpers.page_links_div_wrapper = true
6
+ end
@@ -207,6 +207,7 @@ de:
207
207
  credit_card: Kreditkarte
208
208
  credit_card_capture_complete: "Credit Card Was Captured"
209
209
  credit_card_payment: Kreditkartenzahlung
210
+ creditcard: Creditcard
210
211
  current: Stand
211
212
  customer: Kunde
212
213
  date_range: "Datum (von/bis)"
@@ -234,6 +235,7 @@ de:
234
235
  error: Fehler
235
236
  event: Ereignis
236
237
  existing_customer: "Vorhandener Kunde"
238
+ expiration: Expiration
237
239
  expiration_month: "Gültig bis (Monat)"
238
240
  expiration_year: "Gültig bis (Jahr)"
239
241
  extension: Erweiterung
@@ -246,6 +248,12 @@ de:
246
248
  gateway_setting_description: "Gateway-Einstellungen ändern"
247
249
  general_settings: "Allgemeine Einstellungen"
248
250
  general_settings_description: "Allgemeine Einstellungen ändern"
251
+ google_analytics: "Google Analytics"
252
+ google_analytics_active: "Active"
253
+ google_analytics_create: "Create New Google Analytics Account"
254
+ google_analytics_id: "Analytics ID"
255
+ google_analytics_new: "New Google Analytics Account"
256
+ google_analytics_setting_description: "Manage Google Analytics ID"
249
257
  height: Höhe
250
258
  hello_user: "Hallo Benutzer"
251
259
  image: Bild
@@ -279,6 +287,7 @@ de:
279
287
  master_price: Grundpreis
280
288
  my_account: "Mein Konto"
281
289
  my_orders: "Meine Bestellungen"
290
+ name: Name
282
291
  new: Neu
283
292
  new_category: "Neue Kategorie"
284
293
  new_credit_card_payment: "Neue Kreditkartenzahlung"
@@ -333,6 +342,7 @@ de:
333
342
  payment_information: Zahlungsinformationen
334
343
  payments: Zahlungen
335
344
  phone: Telefon
345
+ place_order: Place Order
336
346
  presentation: Anzeige
337
347
  previous: zurück
338
348
  price: Preis
@@ -384,6 +394,7 @@ de:
384
394
  shopping_cart: Warenkorb
385
395
  show_deleted: "Zeige gelöschte"
386
396
  show_incomplete_orders: "Zeige unvollständige Bestellungen"
397
+ show_only_complete_orders: "Only show complete orders"
387
398
  show_out_of_stock_products: "Zeige ausverkaufte Produkte"
388
399
  sign_up: "Anmelden"
389
400
  sku: Lagerhaltungsnummer
@@ -429,8 +440,11 @@ de:
429
440
  unable_to_capture_credit_card: "Unable to Capture Credit Card"
430
441
  update: Speichern
431
442
  updated_successfully: "Erfolgreich aktualisiert"
443
+ use_as_shipping_address: Use as Shipping Address
444
+ use_billing_address: Use Billing Address
432
445
  use_different_shipping_address: "Andere Lieferaddresse verwenden"
433
446
  user: Benutzer
447
+ user_account: User Account
434
448
  user_details: "Benutzer Details"
435
449
  users: Benutzer
436
450
  value: ""
@@ -22,7 +22,7 @@ en-GB:
22
22
  firstname: "First Name"
23
23
  lastname: "Last Name"
24
24
  phone: Phone
25
- zipcode: "Zip Code"
25
+ zipcode: "Post Code"
26
26
  country:
27
27
  iso: ISO
28
28
  iso3: ISO3
@@ -55,7 +55,7 @@ en-GB:
55
55
  description: Description
56
56
  master_price: "Master Price"
57
57
  name: Name
58
- on_hand: "On Hande"
58
+ on_hand: "On Hand"
59
59
  property:
60
60
  name: Name
61
61
  presentation: Presentation
@@ -207,6 +207,7 @@ en-GB:
207
207
  credit_card: "Credit Card"
208
208
  credit_card_capture_complete: "Credit Card Was Captured"
209
209
  credit_card_payment: "Credit Card Payment"
210
+ creditcard: Creditcard
210
211
  current: Current
211
212
  customer: Customer
212
213
  date_range: "Date Range"
@@ -234,6 +235,7 @@ en-GB:
234
235
  error: error
235
236
  event: Event
236
237
  existing_customer: "Existing Customer"
238
+ expiration: Expiration
237
239
  expiration_month: "Expiration Month"
238
240
  expiration_year: "Expiration Year"
239
241
  extension: Extension
@@ -246,6 +248,12 @@ en-GB:
246
248
  gateway_setting_description: "Select a payment gateway and configure its settings."
247
249
  general_settings: "General Settings"
248
250
  general_settings_description: "Configure general Spree settings."
251
+ google_analytics: "Google Analytics"
252
+ google_analytics_active: "Active"
253
+ google_analytics_create: "Create New Google Analytics Account"
254
+ google_analytics_id: "Analytics ID"
255
+ google_analytics_new: "New Google Analytics Account"
256
+ google_analytics_setting_description: "Manage Google Analytics ID"
249
257
  height: Height
250
258
  hello_user: "Hello User"
251
259
  image: Image
@@ -279,6 +287,7 @@ en-GB:
279
287
  master_price: "Master Price"
280
288
  my_account: "My Account"
281
289
  my_orders: "My Orders"
290
+ name: Name
282
291
  new: New
283
292
  new_category: "New category"
284
293
  new_credit_card_payment: "New Credit Card Payment"
@@ -333,8 +342,9 @@ en-GB:
333
342
  payment_information: "Payment Information"
334
343
  payments: Payments
335
344
  phone: Phone
345
+ place_order: Place Order
336
346
  presentation: Presentation
337
- previous: previous
347
+ previous: Previous
338
348
  price: Price
339
349
  problem_authorizing_card: "Problem authorizing credit card"
340
350
  problem_capturing_card: "Problem capturing credit card"
@@ -384,6 +394,7 @@ en-GB:
384
394
  shopping_cart: "Shopping Basket"
385
395
  show_deleted: "Show Deleted"
386
396
  show_incomplete_orders: "Show Incomplete Orders"
397
+ show_only_complete_orders: "Only show complete orders"
387
398
  show_out_of_stock_products: "Show out-of-stock products"
388
399
  sign_up: "Sign up"
389
400
  sku: SKU
@@ -397,10 +408,10 @@ en-GB:
397
408
  date: Date
398
409
  time: Time
399
410
  start: Start
400
- state: State
411
+ state: County
401
412
  state_based: "State Based"
402
413
  state_setting_description: "Administer the list of states/provinces associated with each country."
403
- states: States
414
+ states: Counties
404
415
  status: Status
405
416
  stop: Stop
406
417
  store: Store
@@ -429,8 +440,11 @@ en-GB:
429
440
  unable_to_capture_credit_card: "Unable to Capture Credit Card"
430
441
  update: Update
431
442
  updated_successfully:
443
+ use_as_shipping_address: Use as Shipping Address
444
+ use_billing_address: Use Billing Address
432
445
  use_different_shipping_address: "Use Different Shipping Address"
433
446
  user: User
447
+ user_account: User Account
434
448
  user_details: "User Details"
435
449
  users: Users
436
450
  value: Value
@@ -444,7 +458,7 @@ en-GB:
444
458
  whats_this: "What's this"
445
459
  width: Width
446
460
  your_cart_is_empty: "Your basket is empty"
447
- zip: Zip
461
+ zip: Post Code
448
462
  zone: Zone
449
463
  zone_based: "Zone Based"
450
464
  zone_setting_description: "Collections of countries, states or other zones to be used in various calculations."