solidus_frontend_devise_token_auth 2.8.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +26 -0
  3. data/README.md +42 -0
  4. data/Rakefile +17 -0
  5. data/app/assets/config/solidus_frontend_manifest.js +4 -0
  6. data/app/assets/images/credit_cards/amex_cid.gif +0 -0
  7. data/app/assets/images/credit_cards/credit_card.gif +0 -0
  8. data/app/assets/images/credit_cards/discover_cid.gif +0 -0
  9. data/app/assets/images/credit_cards/icons/american_express.png +0 -0
  10. data/app/assets/images/credit_cards/icons/cirrus.png +0 -0
  11. data/app/assets/images/credit_cards/icons/delta.png +0 -0
  12. data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
  13. data/app/assets/images/credit_cards/icons/directdebit.png +0 -0
  14. data/app/assets/images/credit_cards/icons/discover.png +0 -0
  15. data/app/assets/images/credit_cards/icons/egold.png +0 -0
  16. data/app/assets/images/credit_cards/icons/maestro.png +0 -0
  17. data/app/assets/images/credit_cards/icons/master.png +0 -0
  18. data/app/assets/images/credit_cards/icons/paypal.png +0 -0
  19. data/app/assets/images/credit_cards/icons/solo.png +0 -0
  20. data/app/assets/images/credit_cards/icons/switch.png +0 -0
  21. data/app/assets/images/credit_cards/icons/visa.png +0 -0
  22. data/app/assets/images/credit_cards/icons/visaelectron.png +0 -0
  23. data/app/assets/images/credit_cards/icons/westernunion.png +0 -0
  24. data/app/assets/images/credit_cards/icons/wirecard.png +0 -0
  25. data/app/assets/images/credit_cards/icons/worldpay.png +0 -0
  26. data/app/assets/images/credit_cards/master_cid.jpg +0 -0
  27. data/app/assets/images/credit_cards/visa_cid.gif +0 -0
  28. data/app/assets/images/favicon.ico +0 -0
  29. data/app/assets/images/icons/add-to-cart.png +0 -0
  30. data/app/assets/images/icons/checkout.png +0 -0
  31. data/app/assets/images/icons/delete.png +0 -0
  32. data/app/assets/images/icons/update.png +0 -0
  33. data/app/assets/images/spinner.gif +0 -0
  34. data/app/assets/images/spree/frontend/cart.png +0 -0
  35. data/app/assets/javascripts/spree/frontend/cart.js +30 -0
  36. data/app/assets/javascripts/spree/frontend/checkout/address.js +127 -0
  37. data/app/assets/javascripts/spree/frontend/checkout/coupon-code.js +41 -0
  38. data/app/assets/javascripts/spree/frontend/checkout/payment.js +55 -0
  39. data/app/assets/javascripts/spree/frontend/checkout.js +24 -0
  40. data/app/assets/javascripts/spree/frontend/locale_selector.js +5 -0
  41. data/app/assets/javascripts/spree/frontend/product.js +81 -0
  42. data/app/assets/javascripts/spree/frontend.js +5 -0
  43. data/app/assets/stylesheets/spree/frontend/_skeleton.scss +242 -0
  44. data/app/assets/stylesheets/spree/frontend/_variables.scss +65 -0
  45. data/app/assets/stylesheets/spree/frontend/screen.css.scss +1387 -0
  46. data/app/assets/stylesheets/spree/frontend.css +5 -0
  47. data/app/controllers/spree/checkout_controller.rb +236 -0
  48. data/app/controllers/spree/content_controller.rb +11 -0
  49. data/app/controllers/spree/home_controller.rb +14 -0
  50. data/app/controllers/spree/locale_controller.rb +20 -0
  51. data/app/controllers/spree/orders_controller.rb +138 -0
  52. data/app/controllers/spree/products_controller.rb +52 -0
  53. data/app/controllers/spree/store_controller.rb +30 -0
  54. data/app/controllers/spree/taxons_controller.rb +31 -0
  55. data/app/helpers/spree/orders_helper.rb +18 -0
  56. data/app/helpers/spree/taxon_filters_helper.rb +13 -0
  57. data/app/models/spree/frontend_configuration.rb +10 -0
  58. data/app/views/spree/address/_form.html.erb +96 -0
  59. data/app/views/spree/address/_form_hidden.html.erb +12 -0
  60. data/app/views/spree/checkout/_address.html.erb +33 -0
  61. data/app/views/spree/checkout/_confirm.html.erb +25 -0
  62. data/app/views/spree/checkout/_coupon_code.html.erb +12 -0
  63. data/app/views/spree/checkout/_delivery.html.erb +108 -0
  64. data/app/views/spree/checkout/_payment.html.erb +67 -0
  65. data/app/views/spree/checkout/_summary.html.erb +76 -0
  66. data/app/views/spree/checkout/_terms_and_conditions.en.html.erb +1 -0
  67. data/app/views/spree/checkout/edit.html.erb +32 -0
  68. data/app/views/spree/checkout/existing_payment/_gateway.html.erb +9 -0
  69. data/app/views/spree/checkout/payment/_check.html.erb +0 -0
  70. data/app/views/spree/checkout/payment/_gateway.html.erb +36 -0
  71. data/app/views/spree/content/cvv.html.erb +13 -0
  72. data/app/views/spree/home/index.html.erb +12 -0
  73. data/app/views/spree/layouts/spree_application.html.erb +36 -0
  74. data/app/views/spree/orders/_adjustment_row.html.erb +8 -0
  75. data/app/views/spree/orders/_adjustments.html.erb +24 -0
  76. data/app/views/spree/orders/_form.html.erb +29 -0
  77. data/app/views/spree/orders/_line_item.html.erb +34 -0
  78. data/app/views/spree/orders/edit.html.erb +47 -0
  79. data/app/views/spree/orders/show.html.erb +22 -0
  80. data/app/views/spree/payments/_payment.html.erb +18 -0
  81. data/app/views/spree/products/_cart_form.html.erb +65 -0
  82. data/app/views/spree/products/_image.html.erb +8 -0
  83. data/app/views/spree/products/_promotions.html.erb +19 -0
  84. data/app/views/spree/products/_properties.html.erb +15 -0
  85. data/app/views/spree/products/_taxons.html.erb +14 -0
  86. data/app/views/spree/products/_thumbnails.html.erb +21 -0
  87. data/app/views/spree/products/index.html.erb +27 -0
  88. data/app/views/spree/products/show.html.erb +51 -0
  89. data/app/views/spree/shared/_address.html.erb +38 -0
  90. data/app/views/spree/shared/_filters.html.erb +27 -0
  91. data/app/views/spree/shared/_footer.html.erb +6 -0
  92. data/app/views/spree/shared/_head.html.erb +14 -0
  93. data/app/views/spree/shared/_header.html.erb +5 -0
  94. data/app/views/spree/shared/_image.html.erb +12 -0
  95. data/app/views/spree/shared/_link_to_cart.html.erb +1 -0
  96. data/app/views/spree/shared/_locale_selector.html.erb +25 -0
  97. data/app/views/spree/shared/_login_bar_items.html.erb +1 -0
  98. data/app/views/spree/shared/_main_nav_bar.html.erb +12 -0
  99. data/app/views/spree/shared/_nav_bar.html.erb +9 -0
  100. data/app/views/spree/shared/_order_details.html.erb +146 -0
  101. data/app/views/spree/shared/_products.html.erb +51 -0
  102. data/app/views/spree/shared/_search.html.erb +11 -0
  103. data/app/views/spree/shared/_shipment_tracking.html.erb +9 -0
  104. data/app/views/spree/shared/_sidebar.html.erb +3 -0
  105. data/app/views/spree/shared/_taxonomies.html.erb +9 -0
  106. data/app/views/spree/shared/unauthorized.html.erb +0 -0
  107. data/app/views/spree/store/cart_link.html.erb +1 -0
  108. data/app/views/spree/taxons/_taxon.html.erb +4 -0
  109. data/app/views/spree/taxons/show.html.erb +20 -0
  110. data/config/initializers/assets.rb +3 -0
  111. data/config/initializers/canonical_rails.rb +16 -0
  112. data/config/routes.rb +33 -0
  113. data/lib/generators/solidus/views/override_generator.rb +49 -0
  114. data/lib/solidus_frontend.rb +3 -0
  115. data/lib/spree/frontend/engine.rb +13 -0
  116. data/lib/spree/frontend/middleware/seo_assist.rb +52 -0
  117. data/lib/spree/frontend.rb +15 -0
  118. data/lib/spree_frontend.rb +3 -0
  119. data/lib/tasks/rake_util.rb +18 -0
  120. data/lib/tasks/taxon.rake +16 -0
  121. data/script/rails +10 -0
  122. data/solidus_frontend.gemspec +35 -0
  123. data/spec/controllers/controller_helpers_spec.rb +30 -0
  124. data/spec/controllers/locale_controller_spec.rb +57 -0
  125. data/spec/controllers/spree/checkout_controller_spec.rb +539 -0
  126. data/spec/controllers/spree/checkout_controller_with_views_spec.rb +37 -0
  127. data/spec/controllers/spree/content_controller_spec.rb +9 -0
  128. data/spec/controllers/spree/current_order_tracking_spec.rb +47 -0
  129. data/spec/controllers/spree/home_controller_spec.rb +29 -0
  130. data/spec/controllers/spree/orders_controller_ability_spec.rb +93 -0
  131. data/spec/controllers/spree/orders_controller_spec.rb +225 -0
  132. data/spec/controllers/spree/orders_controller_transitions_spec.rb +33 -0
  133. data/spec/controllers/spree/products_controller_spec.rb +38 -0
  134. data/spec/controllers/spree/taxons_controller_spec.rb +14 -0
  135. data/spec/features/address_spec.rb +78 -0
  136. data/spec/features/automatic_promotion_adjustments_spec.rb +49 -0
  137. data/spec/features/caching/products_spec.rb +48 -0
  138. data/spec/features/caching/taxons_spec.rb +21 -0
  139. data/spec/features/cart_spec.rb +85 -0
  140. data/spec/features/checkout_spec.rb +690 -0
  141. data/spec/features/checkout_unshippable_spec.rb +37 -0
  142. data/spec/features/coupon_code_spec.rb +266 -0
  143. data/spec/features/currency_spec.rb +20 -0
  144. data/spec/features/free_shipping_promotions_spec.rb +60 -0
  145. data/spec/features/locale_spec.rb +27 -0
  146. data/spec/features/order_spec.rb +73 -0
  147. data/spec/features/products_spec.rb +291 -0
  148. data/spec/features/promotion_code_invalidation_spec.rb +54 -0
  149. data/spec/features/quantity_promotions_spec.rb +130 -0
  150. data/spec/features/taxons_spec.rb +158 -0
  151. data/spec/features/template_rendering_spec.rb +20 -0
  152. data/spec/fixtures/thinking-cat.jpg +0 -0
  153. data/spec/generators/solidus/views/override_generator_spec.rb +50 -0
  154. data/spec/helpers/base_helper_spec.rb +13 -0
  155. data/spec/helpers/order_helper_spec.rb +14 -0
  156. data/spec/helpers/taxon_filters_helper_spec.rb +12 -0
  157. data/spec/spec_helper.rb +106 -0
  158. data/spec/support/features/fill_in_with_force.rb +12 -0
  159. data/spec/support/shared_contexts/checkout_setup.rb +12 -0
  160. data/spec/support/shared_contexts/custom_products.rb +28 -0
  161. data/spec/support/shared_contexts/locales.rb +16 -0
  162. data/spec/views/spree/checkout/_summary_spec.rb +11 -0
  163. metadata +337 -0
@@ -0,0 +1,22 @@
1
+ <fieldset id="order_summary" data-hook>
2
+ <legend><%= t('spree.order_number', number: @order.number) %></legend>
3
+ <h1><%= accurate_title %></h1>
4
+ <% if order_just_completed?(@order) %>
5
+ <strong><%= t('spree.thank_you_for_your_order') %></strong>
6
+ <% end %>
7
+
8
+ <div id="order" data-hook>
9
+ <%= render partial: 'spree/shared/order_details', locals: { order: @order } %>
10
+
11
+ <br class="clear" />
12
+
13
+ <p data-hook="links">
14
+ <%= link_to t('spree.back_to_store'), spree.root_path, class: "button" %>
15
+ <% unless order_just_completed?(@order) %>
16
+ <% if try_spree_current_user && respond_to?(:account_path) %>
17
+ <%= link_to t('spree.my_account'), spree.account_path, class: "button" %>
18
+ <% end %>
19
+ <% end %>
20
+ </p>
21
+ </div>
22
+ </fieldset>
@@ -0,0 +1,18 @@
1
+ <% source = payment.source %>
2
+ <% if source.is_a?(Spree::CreditCard) %>
3
+ <span class="cc-type">
4
+ <% unless (cc_type = source.cc_type).blank? %>
5
+ <%= image_tag "credit_cards/icons/#{cc_type}.png" %>
6
+ <% end %>
7
+ <% if source.last_digits %>
8
+ <%= t('spree.ending_in') %> <%= source.last_digits %>
9
+ <% end %>
10
+ </span>
11
+ <br />
12
+ <span class="full-name"><%= source.name %></span>
13
+ <% elsif source.is_a?(Spree::StoreCredit) %>
14
+ <%= content_tag(:span, payment.payment_method.name) %>:
15
+ <%= content_tag(:span, payment.display_amount) %>
16
+ <% else %>
17
+ <%= content_tag(:span, payment.payment_method.name) %>
18
+ <% end %>
@@ -0,0 +1,65 @@
1
+ <%= form_for :order, url: populate_orders_path do |f| %>
2
+ <div id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
3
+
4
+ <% if @product.variants_and_option_values_for(current_pricing_options).any? %>
5
+ <div id="product-variants" class="columns five alpha">
6
+ <h6 class="product-section-title"><%= t('spree.variants') %></h6>
7
+ <ul>
8
+ <% @product.variants_and_option_values_for(current_pricing_options).each_with_index do |variant, index| %>
9
+ <li>
10
+ <%= radio_button_tag "variant_id", variant.id, index == 0, 'data-price' => variant.price_for(current_pricing_options) %>
11
+ <%= label_tag "variant_id_#{ variant.id }" do %>
12
+ <span class="variant-description">
13
+ <%= variant_options variant %>
14
+ </span>
15
+ <% if variant_price variant %>
16
+ <span class="price diff"><%= variant_price variant %></span>
17
+ <% end %>
18
+
19
+ <% unless variant.can_supply? %>
20
+ <span class="out-of-stock"><%= t('spree.out_of_stock') %></span>
21
+ <% end %>
22
+ <% end %>
23
+ </li>
24
+ <% end %>
25
+ </ul>
26
+ </div>
27
+ <% else %>
28
+ <%= hidden_field_tag "variant_id", @product.master.id %>
29
+ <% end %>
30
+
31
+ <% if @product.price_for(current_pricing_options) and !@product.price.nil? %>
32
+ <div data-hook="product_price" class="columns five <%= !@product.has_variants? ? 'alpha' : 'omega' %>">
33
+
34
+ <div id="product-price">
35
+ <h6 class="product-section-title"><%= t('spree.price') %></h6>
36
+ <div>
37
+ <span class="price selling" itemprop="price" content="<%= @product.price_for(current_pricing_options).to_d %>">
38
+ <%= display_price(@product) %>
39
+ </span>
40
+ <span itemprop="priceCurrency" content="<%= current_pricing_options.currency %>"></span>
41
+ </div>
42
+
43
+ <% if @product.master.can_supply? %>
44
+ <link itemprop="availability" href="http://schema.org/InStock" />
45
+ <% elsif @product.variants.empty? %>
46
+ <br />
47
+ <span class="out-of-stock"><%= t('spree.out_of_stock') %></span>
48
+ <% end %>
49
+ </div>
50
+
51
+ <div class="add-to-cart">
52
+ <%= number_field_tag :quantity, 1, class: 'title', min: 1 %>
53
+ <%= button_tag class: 'large primary', id: 'add-to-cart-button', type: :submit do %>
54
+ <%= t('spree.add_to_cart') %>
55
+ <% end %>
56
+ </div>
57
+ </div>
58
+ <% else %>
59
+ <div id="product-price">
60
+ <br>
61
+ <div><span class="price selling" itemprop="price"><%= t('spree.product_not_available_in_this_currency') %></span></div>
62
+ </div>
63
+ <% end %>
64
+ </div>
65
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% if defined?(image) && image %>
2
+ <%= render 'spree/shared/image', image: image, size: :product, itemprop: "image" %>
3
+ <% else %>
4
+ <%= render 'spree/shared/image',
5
+ image: @product.gallery.images.first,
6
+ size: :product,
7
+ itemprop: "image" %>
8
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <% promotions = @product.possible_promotions %>
2
+ <% if promotions.any? %>
3
+ <div id="promotions">
4
+ <h3><%= t('spree.promotions') %></h3>
5
+ <% promotions.each do |promotion| %>
6
+ <div>
7
+ <h4><%= promotion.name %></h4>
8
+ <p><%= promotion.description %></p>
9
+ <% if promotion.products.any? %>
10
+ <ul>
11
+ <% promotion.products.each do |product| %>
12
+ <li><%= link_to product.name, product_path(product) %></li>
13
+ <% end %>
14
+ </ul>
15
+ <% end %>
16
+ </div>
17
+ <% end %>
18
+ </div>
19
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% unless @product_properties.empty? %>
2
+ <h6 class="product-section-title"><%= t('spree.properties')%></h6>
3
+ <table id="product-properties" class="table-display" data-hook>
4
+ <tbody>
5
+ <% @product_properties.each do |product_property| %>
6
+ <% css_class = cycle('even', 'odd', name: "properties") %>
7
+ <tr class="<%= css_class %>">
8
+ <td><strong><%= product_property.property.presentation %></strong></td>
9
+ <td><%= product_property.value %></td>
10
+ </tr>
11
+ <% end %>
12
+ <% reset_cycle('properties') %>
13
+ </tbody>
14
+ </table>
15
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <% if !@product.taxons.blank? %>
2
+ <div id="taxon-crumbs" data-hook class="alpha columns five omega">
3
+ <h6 class="product-section-title"><%= t('spree.look_for_similar_items') %></h6>
4
+
5
+ <div data-hook="product_taxons">
6
+ <ul id="similar_items_by_taxon" data-hook>
7
+ <% @product.taxons.each do |taxon| %>
8
+ <li><%= link_to taxon.name, seo_url(taxon) %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+
13
+ </div>
14
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <%# no need for thumbnails unless there is more than one image %>
2
+ <% if @product.gallery.images.size > 1 %>
3
+ <ul id="product-thumbnails" class="thumbnails inline" data-hook>
4
+
5
+ <% @product.gallery.images.each do |image| %>
6
+ <% next if image.viewable_id != @product.master.id %>
7
+ <li class='tmb-all tmb-<%= image.viewable_id %>'>
8
+ <%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
9
+ </li>
10
+ <% end %>
11
+
12
+ <% if @product.has_variants? %>
13
+ <% @product.gallery.images.each do |image| %>
14
+ <% next if image.viewable_id == @product.master.id %>
15
+ <li class='vtmb tmb-<%= image.viewable_id %>'>
16
+ <%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>
17
+ </li>
18
+ <% end %>
19
+ <% end %>
20
+ </ul>
21
+ <% end %>
@@ -0,0 +1,27 @@
1
+ <% content_for :sidebar do %>
2
+ <div data-hook="homepage_sidebar_navigation">
3
+ <% if "spree/products" == params[:controller] && @taxon %>
4
+ <%= render partial: 'spree/shared/filters' %>
5
+ <% else %>
6
+ <%= render partial: 'spree/shared/taxonomies' %>
7
+ <% end %>
8
+ </div>
9
+ <% end %>
10
+
11
+
12
+ <% if params[:keywords] %>
13
+
14
+ <div data-hook="search_results">
15
+ <% if @products.empty? %>
16
+ <h6 class="search-results-title"><%= t('spree.no_products_found') %></h6>
17
+ <% else %>
18
+ <%= render partial: 'spree/shared/products', locals: { products: @products, taxon: @taxon } %>
19
+ <% end %>
20
+ </div>
21
+
22
+ <% else %>
23
+
24
+ <div data-hook="homepage_products">
25
+ <%= render partial: 'spree/shared/products', locals: { products: @products, taxon: @taxon } %>
26
+ </div>
27
+ <% end %>
@@ -0,0 +1,51 @@
1
+ <% cache [I18n.locale, current_pricing_options, @product] do %>
2
+ <div data-hook="product_show" itemscope itemtype="http://schema.org/Product">
3
+ <% @body_id = 'product-details' %>
4
+
5
+ <div class="columns six alpha" data-hook="product_left_part">
6
+ <div class="row" data-hook="product_left_part_wrap">
7
+
8
+ <div id="product-images" data-hook="product_images">
9
+ <div id="main-image" data-hook>
10
+ <%= render partial: 'image' %>
11
+ </div>
12
+ <div id="thumbnails" data-hook>
13
+ <%= render partial: 'thumbnails' %>
14
+ </div>
15
+ </div>
16
+
17
+ <div data-hook="product_properties">
18
+ <%= render partial: 'properties' %>
19
+ </div>
20
+
21
+ <div data-hook="promotions">
22
+ <%= render partial: 'promotions' %>
23
+ </div>
24
+
25
+ </div>
26
+ </div>
27
+
28
+ <div class="columns ten omega" data-hook="product_right_part">
29
+ <div class="row" data-hook="product_right_part_wrap">
30
+
31
+ <div id="product-description" data-hook="product_description">
32
+
33
+ <h1 class="product-title" itemprop="name"><%= @product.name %></h1>
34
+
35
+ <div itemprop="description" data-hook="description">
36
+ <%= product_description(@product) rescue t('spree.product_has_no_description') %>
37
+ </div>
38
+
39
+ <div id="cart-form" data-hook="cart_form">
40
+ <%= render partial: 'cart_form' %>
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <%= render partial: 'taxons' %>
46
+
47
+ </div>
48
+ </div>
49
+
50
+ </div>
51
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <div class="address vcard">
2
+ <div class="fn"><%= address.full_name %></div>
3
+ <% unless address.company.blank? %>
4
+ <div class="org">
5
+ <%= address.company %>
6
+ </div>
7
+ <% end %>
8
+ <div class="adr">
9
+ <div class="street-address">
10
+ <div class="street-address-line">
11
+ <%= address.address1 %>
12
+ </div>
13
+ <% unless address.address2.blank? %>
14
+ <div class="street-address-line">
15
+ <%= address.address2 %>
16
+ </div>
17
+ <% end %>
18
+ </div>
19
+ <div class="local">
20
+ <span class="locality"><%= address.city %></span>
21
+ <span class="region"><%= address.state_text %></span>
22
+ <span class="postal-code"><%= address.zipcode %></span>
23
+ <div class="country-name"><%= address.country.try(:name) %></div>
24
+ </div>
25
+ </div>
26
+ <% unless address.phone.blank? %>
27
+ <div class="tel">
28
+ <span class="type"><%= t('spree.phone') %></span>
29
+ <%= address.phone %>
30
+ </div>
31
+ <% end %>
32
+ <% unless address.alternative_phone.blank? %>
33
+ <div class="alternative-phone tel">
34
+ <span class="type"><%= t('spree.alternative_phone') %></span>
35
+ <%= address.alternative_phone %>
36
+ </div>
37
+ <% end %>
38
+ </div>
@@ -0,0 +1,27 @@
1
+ <% filters = applicable_filters_for(@taxon) %>
2
+ <% unless filters.empty? %>
3
+ <%= form_tag '', method: :get, id: 'sidebar_products_search' do %>
4
+ <%= hidden_field_tag 'per_page', params[:per_page] %>
5
+ <% filters.each do |filter| %>
6
+ <% labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} %>
7
+ <% next if labels.empty? %>
8
+ <div class="navigation" data-hook="navigation">
9
+ <h6 class="filter-title"> <%= filter[:name] %> </h6>
10
+ <ul class="filter_choices">
11
+ <% labels.each do |nm,val| %>
12
+ <% label = "#{filter[:name]}_#{nm}".gsub(/\s+/,'_') %>
13
+ <li class="nowrap">
14
+ <input type="checkbox"
15
+ id="<%= label %>"
16
+ name="search[<%= filter[:scope].to_s %>][]"
17
+ value="<%= val %>"
18
+ <%= params[:search] && params[:search][filter[:scope]] && params[:search][filter[:scope]].include?(val.to_s) ? "checked" : "" %> />
19
+ <label class="nowrap" for="<%= label %>"> <%= nm %> </label>
20
+ </li>
21
+ <% end %>
22
+ </ul>
23
+ </div>
24
+ <% end %>
25
+ <%= submit_tag t('spree.search'), name: nil %>
26
+ <% end %>
27
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <footer id="footer" class="sixteen columns" data-hook>
2
+ <div id="footer-left" class="columns alpha eight" data-hook>
3
+ <p><%= t 'spree.powered_by' %> <%= link_to 'Solidus', 'http://solidus.io/' %></p>
4
+ </div>
5
+ <div id="footer-right" class="columns omega eight" data-hook></div>
6
+ </footer>
@@ -0,0 +1,14 @@
1
+ <meta charset="utf-8">
2
+ <title><%= title %></title>
3
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
4
+ <meta content="width=device-width, initial-scale=1.0, maximum-scale=1" name="viewport">
5
+ <%== meta_data_tags %>
6
+ <%= canonical_tag(current_store.url) %>
7
+ <%= favicon_link_tag 'favicon.ico' %>
8
+ <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen' %>
9
+ <%= csrf_meta_tags %>
10
+ <%= javascript_include_tag 'spree/frontend/all' %>
11
+ <!--[if lt IE 9]>
12
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6/html5shiv.min.js"></script>
13
+ <![endif]-->
14
+ <%= yield :head %>
@@ -0,0 +1,5 @@
1
+ <header id="header" class="row" data-hook>
2
+ <figure id="logo" class="columns six" data-hook><%= logo %></figure>
3
+ <%= render partial: 'spree/shared/nav_bar' %>
4
+ <%= render partial: 'spree/shared/main_nav_bar' if store_menu? %>
5
+ </header>
@@ -0,0 +1,12 @@
1
+ <% size ||= :mini %>
2
+ <% itemprop ||= nil %>
3
+
4
+ <% if image_url = image.try(:url, size) %>
5
+ <% if image_alt = image.try(:alt) %>
6
+ <%= image_tag image_url, alt: image_alt, itemprop: itemprop %>
7
+ <% else %>
8
+ <%= image_tag image_url, itemprop: itemprop %>
9
+ <% end %>
10
+ <% else %>
11
+ <span class="image-placeholder <%= size %>"></span>
12
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= link_to_cart %>
@@ -0,0 +1,25 @@
1
+ <% available_locales = current_store.available_locales %>
2
+ <% if available_locales.many? %>
3
+ <li id="locale_selector" data-hook>
4
+ <%= form_tag spree.select_locale_path, class: 'navbar-form' do %>
5
+ <div class="form-group">
6
+ <label for="switch_to_locale" class="sr-only">
7
+ <%= I18n.t('spree.i18n.language') %>
8
+ </label>
9
+ <%=
10
+ select_tag(
11
+ :switch_to_locale,
12
+ options_for_select(
13
+ available_locales.map do |locale|
14
+ [I18n.t('spree.i18n.this_file_language', locale: locale, default: locale.to_s, fallback: false), locale]
15
+ end.sort,
16
+ selected: I18n.locale
17
+ ),
18
+ class: 'form-control'
19
+ )
20
+ %>
21
+ <noscript><%= submit_tag t("spree.select") %></noscript>
22
+ </div>
23
+ <% end %>
24
+ </li>
25
+ <% end %>
@@ -0,0 +1 @@
1
+ <%# solidus_auth_devise or a custom auth system can replace this partial %>
@@ -0,0 +1,12 @@
1
+ <nav class="columns sixteen">
2
+ <ul id="main-nav-bar" class="inline" data-hook>
3
+ <li id="home-link" data-hook><%= link_to t('spree.home'), spree.root_path %></li>
4
+ <li id="link-to-cart" data-hook>
5
+ <noscript>
6
+ <%= link_to t('spree.cart'), spree.cart_path %>
7
+ </noscript>
8
+ &nbsp;
9
+ </li>
10
+ </ul>
11
+ <script>Spree.fetch_cart('<%= j spree.cart_link_path %>')</script>
12
+ </nav>
@@ -0,0 +1,9 @@
1
+ <nav id="top-nav-bar" class="columns ten">
2
+ <ul id="nav-bar" class="inline" data-hook>
3
+ <%= render 'spree/shared/locale_selector' %>
4
+ <%= render 'spree/shared/login_bar_items' %>
5
+ <li id="search-bar" data-hook>
6
+ <%= render partial: 'spree/shared/search' %>
7
+ </li>
8
+ </ul>
9
+ </nav>
@@ -0,0 +1,146 @@
1
+ <div class="row steps-data">
2
+
3
+ <% if order.has_checkout_step?("address") %>
4
+
5
+ <div class="columns alpha four" data-hook="order-bill-address">
6
+ <h6><%= t('spree.billing_address') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:address) unless order.completed? %></h6>
7
+ <%= render partial: 'spree/shared/address', locals: { address: order.bill_address } %>
8
+ </div>
9
+
10
+ <% if order.has_checkout_step?("delivery") %>
11
+ <div class="columns alpha four" data-hook="order-ship-address">
12
+ <h6><%= t('spree.shipping_address') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:address) unless order.completed? %></h6>
13
+ <%= render partial: 'spree/shared/address', locals: { address: order.ship_address } %>
14
+ </div>
15
+
16
+ <div class="columns alpha four" data-hook="order-shipment">
17
+ <h6><%= t('spree.shipments') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:delivery) unless order.completed? %></h6>
18
+ <div class="delivery">
19
+ <% order.shipments.each do |shipment| %>
20
+ <div>
21
+ <i class='fa fa-truck'></i>
22
+ <%= t('spree.shipment_details', stock_location: shipment.stock_location.name, shipping_method: shipment.selected_shipping_rate.name) %>
23
+ </div>
24
+ <% end %>
25
+ </div>
26
+ <%= render(partial: 'spree/shared/shipment_tracking', locals: {order: order}) if order.shipped? %>
27
+ </div>
28
+ <% end %>
29
+ <% end %>
30
+
31
+ <% if order.has_checkout_step?("payment") %>
32
+ <div class="columns omega four">
33
+ <h6><%= t('spree.payment_information') %> <%= link_to "(#{t('spree.actions.edit')})", checkout_state_path(:payment) unless order.completed? %></h6>
34
+ <div class="payment-info">
35
+ <% order.payments.valid.each do |payment| %>
36
+ <%= render payment %><br/>
37
+ <% end %>
38
+ </div>
39
+ </div>
40
+ <% end %>
41
+ </div>
42
+
43
+ <hr />
44
+
45
+ <table id='line-items' class="index columns alpha omega sixteen" data-hook="order_details">
46
+ <col width="15%" valign="middle" halign="center">
47
+ <col width="70%" valign="middle">
48
+ <col width="5%" valign="middle" halign="center">
49
+ <col width="5%" valign="middle" halign="center">
50
+ <col width="5%" valign="middle" halign="center">
51
+
52
+ <thead data-hook>
53
+ <tr data-hook="order_details_line_items_headers">
54
+ <th colspan="2"><%= t('spree.item') %></th>
55
+ <th class="price"><%= t('spree.price') %></th>
56
+ <th class="qty"><%= t('spree.qty') %></th>
57
+ <th class="total"><span><%= t('spree.total') %></span></th>
58
+ </tr>
59
+ </thead>
60
+
61
+ <tbody data-hook>
62
+ <% order.line_items.each do |item| %>
63
+ <tr data-hook="order_details_line_item_row">
64
+ <td data-hook="order_item_image">
65
+ <%= link_to(render('spree/shared/image',
66
+ image: (item.variant.gallery.images.first || item.variant.product.gallery.images.first),
67
+ size: :small), item.variant.product) %>
68
+ </td>
69
+ <td data-hook="order_item_description">
70
+ <h4><%= item.variant.product.name %></h4>
71
+ <%= truncated_product_description(item.variant.product) %>
72
+ <%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
73
+ </td>
74
+ <td data-hook="order_item_price" class="price"><span><%= item.single_money.to_html %></span></td>
75
+ <td data-hook="order_item_qty"><%= item.quantity %></td>
76
+ <td data-hook="order_item_total" class="total"><span><%= item.display_amount.to_html %></span></td>
77
+ </tr>
78
+ <% end %>
79
+ </tbody>
80
+ <tfoot id="order-total" data-hook="order_details_total">
81
+ <tr class="total">
82
+ <td colspan="4"><b><%= t('spree.order_total') %>:</b></td>
83
+ <td class="total"><span id="order_total"><%= order.display_order_total_after_store_credit.to_html %></span></td>
84
+ </tr>
85
+ </tfoot>
86
+
87
+ <tfoot id="subtotal" data-hook="order_details_subtotal">
88
+ <tr class="total" id="subtotal-row">
89
+ <td colspan="4"><b><%= t('spree.subtotal') %>:</b></td>
90
+ <td class="total"><span><%= order.display_item_total.to_html %></span></td>
91
+ </tr>
92
+ </tfoot>
93
+
94
+ <% if order.line_item_adjustments.exists? %>
95
+ <% if order.line_item_adjustments.promotion.eligible.exists? %>
96
+ <tfoot id="price-adjustments" data-hook="order_details_price_adjustments">
97
+ <% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
98
+ <tr class="total">
99
+ <td colspan="4"><%= t('spree.promotion') %>: <strong><%= label %></strong></td>
100
+ <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
101
+ </tr>
102
+ <% end %>
103
+ </tfoot>
104
+ <% end %>
105
+ <% end %>
106
+
107
+ <tfoot id='shipment-total'>
108
+ <% order.shipments.group_by { |s| s.selected_shipping_rate.name }.each do |name, shipments| %>
109
+ <tr class="total" data-hook='shipment-row'>
110
+ <td colspan="4"><%= t('spree.shipping') %>: <strong><%= name %></strong></td>
111
+ <td class="total"><span><%= Spree::Money.new(shipments.sum(&:total_before_tax), currency: order.currency).to_html %></span></td>
112
+ </tr>
113
+ <% end %>
114
+ </tfoot>
115
+
116
+ <% if order.all_adjustments.tax.exists? %>
117
+ <tfoot id="tax-adjustments" data-hook="order_details_tax_adjustments">
118
+ <% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
119
+ <tr class="total">
120
+ <td colspan="4"><%= t('spree.tax') %>: <strong><%= label %></strong></td>
121
+ <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
122
+ </tr>
123
+ <% end %>
124
+ </tfoot>
125
+ <% end %>
126
+
127
+ <% if order.total_applicable_store_credit > 0.0 %>
128
+ <tfoot id="store-credit" data-hook="order_details_store_credit">
129
+ <tr class="total">
130
+ <td colspan='4'><%= t('spree.store_credit.store_credit') %>:</td>
131
+ <td class='total'><span><%= order.display_total_applicable_store_credit.to_html %></span></td>
132
+ </tr>
133
+ </tfoot>
134
+ <% end %>
135
+
136
+ <tfoot id="order-charges" data-hook="order_details_adjustments">
137
+ <% order.adjustments.eligible.each do |adjustment| %>
138
+ <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
139
+ <tr class="total">
140
+ <td colspan="4"><strong><%= adjustment.label %></strong></td>
141
+ <td class="total"><span><%= adjustment.display_amount.to_html %></span></td>
142
+ </tr>
143
+ <% end %>
144
+ </tfoot>
145
+
146
+ </table>
@@ -0,0 +1,51 @@
1
+ <%
2
+ paginated_products = @searcher.retrieve_products if params.key?(:keywords)
3
+ paginated_products ||= products
4
+ %>
5
+
6
+ <% content_for :head do %>
7
+ <% if paginated_products.respond_to?(:total_pages) %>
8
+ <%= rel_next_prev_link_tags paginated_products %>
9
+ <% end %>
10
+ <% end %>
11
+
12
+ <div data-hook="products_search_results_heading">
13
+ <% if products.empty? %>
14
+ <div data-hook="products_search_results_heading_no_results_found">
15
+ <%= t('spree.no_products_found') %>
16
+ </div>
17
+ <% elsif params.key?(:keywords) %>
18
+ <div data-hook="products_search_results_heading_results_found">
19
+ <h6 class="search-results-title"><%= t('spree.search_results', keywords: h(params[:keywords])) %></h6>
20
+ </div>
21
+ <% end %>
22
+ </div>
23
+
24
+ <% if products.any? %>
25
+ <ul id="products" class="inline product-listing" data-hook>
26
+ <% products.each do |product| %>
27
+ <% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
28
+ <li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary", name: "classes") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
29
+ <% cache(@taxon.present? ? [I18n.locale, current_pricing_options, @taxon, product] : [I18n.locale, current_pricing_options, product]) do %>
30
+ <div class="product-image">
31
+ <%= link_to(render('spree/shared/image', image: product.gallery.images.first, size: :small, itemprop: "image"), url, itemprop: 'url') %>
32
+ </div>
33
+ <%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
34
+ <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
35
+ <% if price = product.price_for(current_pricing_options) %>
36
+ <span class="price selling" itemprop="price" content="<%= price.to_d %>">
37
+ <%= price.to_html %>
38
+ </span>
39
+ <% end %>
40
+ <span itemprop="priceCurrency" content="<%= current_pricing_options.currency %>"></span>
41
+ </span>
42
+ <% end %>
43
+ </li>
44
+ <% end %>
45
+ <% reset_cycle("classes") %>
46
+ </ul>
47
+ <% end %>
48
+
49
+ <% if paginated_products.respond_to?(:total_pages) %>
50
+ <%= paginate paginated_products %>
51
+ <% end %>