spree_frontend 4.2.0.rc1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/frontend.js +11 -1
- data/app/assets/javascripts/spree/frontend/account.js +1 -1
- data/app/assets/javascripts/spree/frontend/cart.js +24 -2
- data/app/assets/javascripts/spree/frontend/checkout/address.js +60 -43
- data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
- data/app/assets/javascripts/spree/frontend/coupon_manager.js +2 -2
- data/app/assets/javascripts/spree/frontend/currency.js +11 -0
- data/app/assets/javascripts/spree/frontend/locale.js +11 -0
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +2 -2
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +1 -1
- data/app/assets/stylesheets/spree/frontend/application.scss +0 -3
- data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -22
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
- data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
- data/app/controllers/concerns/spree/locale_urls.rb +23 -0
- data/app/controllers/spree/addresses_controller.rb +1 -0
- data/app/controllers/spree/checkout_controller.rb +8 -8
- data/app/controllers/spree/currency_controller.rb +6 -10
- data/app/controllers/spree/home_controller.rb +5 -1
- data/app/controllers/spree/locale_controller.rb +23 -6
- data/app/controllers/spree/orders_controller.rb +2 -2
- data/app/controllers/spree/products_controller.rb +6 -5
- data/app/controllers/spree/store_controller.rb +7 -13
- data/app/controllers/spree/taxons_controller.rb +4 -3
- data/app/helpers/spree/addresses_helper.rb +19 -8
- data/app/helpers/spree/cache_helper.rb +7 -0
- data/app/helpers/spree/frontend_helper.rb +17 -25
- data/app/helpers/spree/navigation_helper.rb +6 -1
- data/app/helpers/spree/store_helper.rb +39 -0
- data/app/helpers/spree/taxons_helper.rb +1 -1
- data/app/models/spree/frontend_configuration.rb +2 -1
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
- data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +2 -2
- data/app/views/spree/address/_form.html.erb +15 -16
- data/app/views/spree/addresses/_form.html.erb +1 -1
- data/app/views/spree/addresses/edit.html.erb +2 -2
- data/app/views/spree/addresses/new.html.erb +2 -2
- data/app/views/spree/checkout/_address.html.erb +4 -6
- data/app/views/spree/checkout/_confirm.html.erb +1 -33
- data/app/views/spree/checkout/_credit_card.html.erb +2 -2
- data/app/views/spree/checkout/_delivery_informations.html.erb +43 -36
- data/app/views/spree/checkout/_summary.html.erb +3 -5
- data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
- data/app/views/spree/home/index.html.erb +21 -22
- data/app/views/spree/locale/index.html.erb +1 -0
- data/app/views/spree/orders/_coupon_code.html.erb +2 -3
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/_line_item_data.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +2 -3
- data/app/views/spree/orders/show.html.erb +1 -71
- data/app/views/spree/products/_cart_form.html.erb +4 -7
- data/app/views/spree/products/_color_option_type.html.erb +2 -3
- data/app/views/spree/products/_filters_desktop.html.erb +1 -2
- data/app/views/spree/products/_gallery.html.erb +4 -6
- data/app/views/spree/products/_gallery_modal.html.erb +3 -5
- data/app/views/spree/products/_option_type.html.erb +1 -2
- data/app/views/spree/products/_sort_mobile.html.erb +4 -4
- data/app/views/spree/products/related.html.erb +11 -5
- data/app/views/spree/products/show.html.erb +1 -5
- data/app/views/spree/shared/_carousel_4_products.html.erb +6 -12
- data/app/views/spree/shared/_color_select.html.erb +3 -3
- data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
- data/app/views/spree/shared/_error_messages.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +4 -4
- data/app/views/spree/shared/_head.html.erb +5 -1
- data/app/views/spree/shared/_header.html.erb +1 -1
- data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
- data/app/views/spree/shared/_line_item.html.erb +2 -2
- data/app/views/spree/shared/_link_to_account.html.erb +5 -5
- data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
- data/app/views/spree/shared/_login.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +3 -6
- data/app/views/spree/shared/_nav_bar.html.erb +5 -5
- data/app/views/spree/shared/_no_product_available.html.erb +1 -1
- data/app/views/spree/shared/_option_values.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +117 -174
- data/app/views/spree/shared/_payment.html.erb +2 -2
- data/app/views/spree/shared/_payment_sources.html.erb +2 -2
- data/app/views/spree/shared/_product_added_modal.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -2
- data/app/views/spree/shared/_translations.html.erb +6 -6
- data/app/views/spree/shared/carousel/_single.html.erb +6 -11
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +5 -11
- data/app/views/spree/users/_address.html.erb +1 -1
- data/app/views/spree/users/_address_controls.html.erb +1 -2
- data/app/views/spree/users/show.html.erb +4 -4
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +26 -30
- data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
- data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
- data/lib/generators/spree/frontend/install/templates/config/initializers/spree_storefront.rb +1 -0
- data/lib/generators/spree/frontend/install/templates/config/spree_storefront.yml +99 -0
- data/spree_frontend.gemspec +2 -2
- metadata +27 -19
- data/app/views/spree/products/_vendor_info.html.erb +0 -13
- data/app/views/spree/shared/_change_store.html.erb +0 -25
- data/app/views/spree/shared/_mobile_change_store.html.erb +0 -30
- data/app/views/spree/shared/forbidden.html.erb +0 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
@@ -16,7 +16,6 @@
|
|
16
16
|
|
17
17
|
<% is_product_available_in_currency = product_available_in_currency? %>
|
18
18
|
<% default_variant = default_variant(@variants, @product) %>
|
19
|
-
<% should_display_compare_at_price = default_variant.compare_at_price.present? && default_variant.compare_at_price > default_variant.price %>
|
20
19
|
|
21
20
|
<%= form_for :order, html: {
|
22
21
|
id: 'add-to-cart-form',
|
@@ -28,11 +27,9 @@
|
|
28
27
|
<div id="inside-product-cart-form" data-hook="inside_product_cart_form">
|
29
28
|
<% if is_product_available_in_currency %>
|
30
29
|
<div id="product-price" class="mb-2 text-center text-md-left add-to-cart-form-price" data-hook="product_price">
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<% end %>
|
35
|
-
</span>
|
30
|
+
<% if should_display_compare_at_price?(default_variant) %>
|
31
|
+
<span class="compare-at-price mr-3"><%= display_compare_at_price(default_variant) %></span>
|
32
|
+
<% end %>
|
36
33
|
<span class="price selling" content="<%= @product_price.to_d %>">
|
37
34
|
<%= display_price(default_variant) %>
|
38
35
|
</span>
|
@@ -58,7 +55,7 @@
|
|
58
55
|
<ul id="product-variants" class="product-variants">
|
59
56
|
<% used_variants_options(@variants, @product).each_with_index do |option_type, index| %>
|
60
57
|
<li>
|
61
|
-
<% if
|
58
|
+
<% if color_option_type_name.present? && color_option_type_name == option_type[:name] %>
|
62
59
|
<%= render "color_option_type", option_type: option_type, index: index %>
|
63
60
|
<% else %>
|
64
61
|
<%= render "option_type", option_type: option_type, index: index %>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<li>
|
10
10
|
<%= label_tag "variant_option_value_id_#{option_type[:id]}_#{option_value[:id]}",
|
11
11
|
class: "m-1 m-sm-2 m-md-1 color-select-label",
|
12
|
-
title: option_value[:name],
|
12
|
+
title: option_value[:name]&.humanize,
|
13
13
|
data: { toggle: "tooltip", placement: "bottom" } do %>
|
14
14
|
|
15
15
|
<%= radio_button_tag "variant_option_value_id_#{option_type[:id]}",
|
@@ -22,8 +22,7 @@
|
|
22
22
|
"presentation" => option_value[:presentation],
|
23
23
|
"variant-id" => option_value[:variant_id],
|
24
24
|
"is-color" => true
|
25
|
-
}
|
26
|
-
%>
|
25
|
+
} %>
|
27
26
|
|
28
27
|
<%= render partial: "spree/shared/color_select", locals: {
|
29
28
|
color: option_value[:presentation],
|
@@ -2,16 +2,15 @@
|
|
2
2
|
<% if @product_images.size > 0 %>
|
3
3
|
<div
|
4
4
|
class="w-100 d-flex align-self-start justify-content-between product-details-images"
|
5
|
-
data-hook="product_left_part_wrap"
|
6
|
-
|
5
|
+
data-hook="product_left_part_wrap">
|
6
|
+
|
7
7
|
<div class="d-none d-md-block product-details-thumbnails" data-hook="product_thumbnails">
|
8
8
|
<%= render 'spree/shared/carousel/thumbnails',
|
9
9
|
images: @product_images,
|
10
10
|
group_id: 'main-product-carousel',
|
11
11
|
id: 'productThumbnailsCarousel',
|
12
12
|
trigger_id: 'productCarousel',
|
13
|
-
per_page: 5
|
14
|
-
%>
|
13
|
+
per_page: 5 %>
|
15
14
|
</div>
|
16
15
|
<div class="product-details-single" data-hook="product_images">
|
17
16
|
<%= render 'spree/shared/carousel/single',
|
@@ -19,8 +18,7 @@
|
|
19
18
|
group_id: 'main-product-carousel',
|
20
19
|
id: 'productCarousel',
|
21
20
|
trigger_id: 'productCarousel',
|
22
|
-
zoomed: false
|
23
|
-
%>
|
21
|
+
zoomed: false %>
|
24
22
|
</div>
|
25
23
|
</div>
|
26
24
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @product_images.size > 0 %>
|
2
|
-
<div class="modal fade" id="picturesModal" tabindex="-1" role="dialog"
|
2
|
+
<div class="modal fade" id="picturesModal" tabindex="-1" role="dialog">
|
3
3
|
<div class="modal-dialog--zoom modal-dialog mw-100 vh-100 mt-0 mb-0" role="document">
|
4
4
|
<div class="modal-content h-100">
|
5
5
|
<div class="modal-body h-100">
|
@@ -23,8 +23,7 @@
|
|
23
23
|
group_id: 'main-product-modal-carousel',
|
24
24
|
id: 'productModalThumbnailsCarousel',
|
25
25
|
trigger_id: 'productCarousel',
|
26
|
-
per_page: 4
|
27
|
-
%>
|
26
|
+
per_page: 4 %>
|
28
27
|
</div>
|
29
28
|
<% end %>
|
30
29
|
<div class="product-details-single">
|
@@ -33,8 +32,7 @@
|
|
33
32
|
group_id: 'main-product-modal-carousel',
|
34
33
|
id: 'productModalCarousel',
|
35
34
|
trigger_id: 'productCarousel',
|
36
|
-
zoomed: true
|
37
|
-
%>
|
35
|
+
zoomed: true %>
|
38
36
|
</div>
|
39
37
|
</div>
|
40
38
|
</div>
|
@@ -15,8 +15,7 @@
|
|
15
15
|
"option-type-index" => index,
|
16
16
|
"presentation" => option_value[:presentation],
|
17
17
|
"variant-id" => option_value[:variant_id]
|
18
|
-
}
|
19
|
-
%>
|
18
|
+
} %>
|
20
19
|
|
21
20
|
<%= label_tag "variant_option_value_id_#{option_type[:id]}_#{option_value[:id]}",
|
22
21
|
class: "m-1 select-label",
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="plp-overlay-header-border"></div>
|
9
9
|
<ul class="pt-1 plp-overlay-ul">
|
10
10
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by].blank? %>">
|
11
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: nil)) %>"
|
11
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: nil)) %>">
|
12
12
|
<div class="plp-empty-dot">
|
13
13
|
<div class="filled-dot"></div>
|
14
14
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</a>
|
17
17
|
</li>
|
18
18
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'newest-first' %>">
|
19
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>"
|
19
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'newest-first')) %>">
|
20
20
|
<div class="plp-empty-dot">
|
21
21
|
<div class="filled-dot"></div>
|
22
22
|
</div>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
</a>
|
25
25
|
</li>
|
26
26
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-high-to-low' %>">
|
27
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>"
|
27
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-high-to-low')) %>">
|
28
28
|
<div class="plp-empty-dot">
|
29
29
|
<div class="filled-dot"></div>
|
30
30
|
</div>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
</a>
|
33
33
|
</li>
|
34
34
|
<li class="plp-overlay-ul-li <%= 'plp-overlay-ul-li--active' if params[:sort_by] == 'price-low-to-high' %>">
|
35
|
-
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>"
|
35
|
+
<a class="p-3 d-block" href="<%= url_for(permitted_params.merge(sort_by: 'price-low-to-high')) %>">
|
36
36
|
<div class="plp-empty-dot">
|
37
37
|
<div class="filled-dot"></div>
|
38
38
|
</div>
|
@@ -1,8 +1,14 @@
|
|
1
|
-
<% if
|
1
|
+
<% if product_relation_types.any? %>
|
2
2
|
<div id="related-products">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
<% product_relation_types.each do |relation_type| %>
|
4
|
+
<% products = product_relations_by_type(relation_type) %>
|
5
|
+
|
6
|
+
<% if products.any? %>
|
7
|
+
<div class="product-details-related" id="product-details-related-<%= relation_type.id %>">
|
8
|
+
<p class="font-weight-bold text-center text-uppercase product-details-carousel-text"><%= relation_type.name %></p>
|
9
|
+
<%= render 'spree/shared/carousel_4_products', id: "related-products-carousel-#{relation_type.id}", products: products %>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
7
13
|
</div>
|
8
14
|
<% end %>
|
@@ -9,9 +9,6 @@
|
|
9
9
|
<div class="row" data-hook="product_show">
|
10
10
|
<%= render partial: 'gallery' %>
|
11
11
|
<div class="col-12 col-md-5" data-hook="product_right_part">
|
12
|
-
<% if @product.respond_to?(:vendor) %>
|
13
|
-
<%= render partial: 'vendor_info' %>
|
14
|
-
<% end %>
|
15
12
|
<div id="product-description" data-hook="product_right_part_wrap">
|
16
13
|
<h1 class="mt-3 mt-md-0 text-center text-md-left product-details-title">
|
17
14
|
<%= @product.name %>
|
@@ -51,5 +48,4 @@
|
|
51
48
|
<div
|
52
49
|
data-related-products
|
53
50
|
data-related-products-id="<%= @product.slug %>"
|
54
|
-
data-related-products-enabled="<%= @product.respond_to?(:has_related_products?) %>"
|
55
|
-
/>
|
51
|
+
data-related-products-enabled="<%= @product.respond_to?(:has_related_products?) %>" />
|
@@ -20,8 +20,7 @@
|
|
20
20
|
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
|
21
21
|
href="#<%= id %>-mobile"
|
22
22
|
role="button"
|
23
|
-
data-slide="prev"
|
24
|
-
>
|
23
|
+
data-slide="prev">
|
25
24
|
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
|
26
25
|
<%= icon(name: 'arrow-right',
|
27
26
|
classes: 'spree-icon-arrow spree-icon-arrow-left',
|
@@ -35,8 +34,7 @@
|
|
35
34
|
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
|
36
35
|
href="#<%= id %>-mobile"
|
37
36
|
role="button"
|
38
|
-
data-slide="next"
|
39
|
-
>
|
37
|
+
data-slide="next">
|
40
38
|
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
|
41
39
|
<%= icon(name: 'arrow-right',
|
42
40
|
classes: 'spree-icon-arrow spree-icon-arrow-right',
|
@@ -56,14 +54,12 @@
|
|
56
54
|
class="d-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--previous"
|
57
55
|
href="#<%= id %>-desktop"
|
58
56
|
role="button"
|
59
|
-
data-slide="prev"
|
60
|
-
>
|
57
|
+
data-slide="prev">
|
61
58
|
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
|
62
59
|
<%= icon(name: 'arrow-right',
|
63
60
|
classes: 'spree-icon-arrow spree-icon-arrow-left',
|
64
61
|
width: 20,
|
65
|
-
height: 20)
|
66
|
-
%>
|
62
|
+
height: 20) %>
|
67
63
|
</span>
|
68
64
|
<span class="sr-only"><%= Spree.t(:previous) %></span>
|
69
65
|
</a>
|
@@ -80,14 +76,12 @@
|
|
80
76
|
class="d-md-flex position-absolute justify-content-center align-items-center carousel-icon-control carousel-icon-control--next"
|
81
77
|
href="#<%= id %>-desktop"
|
82
78
|
role="button"
|
83
|
-
data-slide="next"
|
84
|
-
>
|
79
|
+
data-slide="next">
|
85
80
|
<span class="d-flex justify-content-center align-items-center carousel-icon-control-rounded" aria-hidden="true">
|
86
81
|
<%= icon(name: 'arrow-right',
|
87
82
|
classes: 'spree-icon-arrow spree-icon-arrow-right',
|
88
83
|
width: 20,
|
89
|
-
height: 20)
|
90
|
-
%>
|
84
|
+
height: 20) %>
|
91
85
|
</span>
|
92
86
|
<span class="sr-only"><%= Spree.t(:next) %></span>
|
93
87
|
</a>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<svg class="color-select" height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg">
|
2
2
|
<g class="color-select-border" fill="none" fill-rule="evenodd">
|
3
|
-
<circle class="<%= 'color-select-border--selected' if selected %> plp-overlay-color-item" cx="16" cy="16" r="15" stroke-width="2"/>
|
3
|
+
<circle class="<%= 'color-select-border--selected' if selected %> plp-overlay-color-item" cx="16" cy="16" r="15" stroke-width="2" />
|
4
4
|
<g transform="translate(2 2)">
|
5
|
-
<circle cx="14" cy="14" fill="<%= color %>" fill-rule="evenodd" r="12"/>
|
6
|
-
<circle cx="14" cy="14" r="13" stroke="#fff" stroke-width="2"/>
|
5
|
+
<circle cx="14" cy="14" fill="<%= color %>" fill-rule="evenodd" r="12" />
|
6
|
+
<circle cx="14" cy="14" r="13" stroke="#fff" stroke-width="2" />
|
7
7
|
</g>
|
8
8
|
</g>
|
9
9
|
</svg>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if defined?(should_render_currency_dropdown?) && should_render_currency_dropdown? %>
|
2
|
+
<%= form_tag spree.set_currency_path, method: :get, class: 'px-4 py-3 w-100', id: 'currency-select' do %>
|
3
|
+
<div class="form-group">
|
4
|
+
<label for="switch_to_currency" class="dropdown-header text-center">
|
5
|
+
<%= Spree.t(:choose_currency) %>
|
6
|
+
</label>
|
7
|
+
<%= select_tag(:switch_to_currency,
|
8
|
+
options_for_select(supported_currency_options, current_currency),
|
9
|
+
class: 'custom-select w-100') %>
|
10
|
+
<noscript><%= submit_tag %></noscript>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% if target && target.errors.any? %>
|
2
2
|
<div id="errorExplanation" class="alert alert-danger d-flex justify-content-center mb-0" data-hook>
|
3
|
-
<ul class="mb-0 pl-0"
|
3
|
+
<ul class="mb-0 pl-0" style="list-style-type: none;">
|
4
4
|
<% target.errors.full_messages.each do |msg| %>
|
5
5
|
<li><%= msg %></li>
|
6
6
|
<% end %>
|
7
7
|
</ul>
|
8
|
-
<br
|
8
|
+
<br>
|
9
9
|
</div>
|
10
10
|
<% end %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<div class="d-flex flex-column align-items-center align-items-xl-start pb-3 flex-grow-2 footer-spree-contact-note">
|
34
34
|
<div>
|
35
35
|
<strong><%= current_store.name %></strong>
|
36
|
-
<br
|
36
|
+
<br>
|
37
37
|
<% if current_store.address %>
|
38
38
|
<%= current_store.address.html_safe %>
|
39
39
|
<% end %>
|
@@ -41,8 +41,8 @@
|
|
41
41
|
<% if current_store.contact_phone&.present? %>
|
42
42
|
<div><%= Spree.t(:call_us_now) %><%= current_store.contact_phone %></div>
|
43
43
|
<% end %>
|
44
|
-
<% if current_store.
|
45
|
-
<div><%= Spree.t(:email) %>: <%= current_store.
|
44
|
+
<% if current_store.customer_support_email&.present? %>
|
45
|
+
<div><%= Spree.t(:email) %>: <%= current_store.customer_support_email %></div>
|
46
46
|
<% end %>
|
47
47
|
</div>
|
48
48
|
</div>
|
@@ -68,7 +68,7 @@
|
|
68
68
|
<%= Spree.t('nav_bar.my_account') %>
|
69
69
|
</div>
|
70
70
|
<div class="pt-2">
|
71
|
-
<%= link_to Spree.t(
|
71
|
+
<%= link_to Spree.t(:my_orders).upcase, spree.account_path(anchor: "account-my-orders") %>
|
72
72
|
</div>
|
73
73
|
</div>
|
74
74
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<title><%= title %></title>
|
2
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
3
3
|
<%== og_meta_data_tags %>
|
4
4
|
<%== meta_data_tags %>
|
5
5
|
<%== meta_robots %>
|
@@ -8,5 +8,9 @@
|
|
8
8
|
<%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', 'data-turbolinks-track': 'reload' %>
|
9
9
|
<%= csrf_meta_tags %>
|
10
10
|
<%= render 'spree/shared/paths' %>
|
11
|
+
<script>
|
12
|
+
var SPREE_LOCALE = '<%= I18n.locale %>'
|
13
|
+
var SPREE_CURRENCY = '<%= current_currency %>'
|
14
|
+
</script>
|
11
15
|
<%= javascript_include_tag 'spree/frontend/all', defer: true, 'data-turbolinks-track': 'reload' %>
|
12
16
|
<%= yield :head %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<button class="navbar-toggler border-0 px-0 d-flex" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-label="<%= Spree.t('nav_bar.show_menu') %>">
|
9
9
|
<%= icon(name: 'burger',
|
10
10
|
width: 18.5,
|
11
|
-
height: 16)
|
11
|
+
height: 16) %>
|
12
12
|
</button>
|
13
13
|
</div>
|
14
14
|
<figure class="logo flex-grow-0 flex-xl-grow-1 order-xl-0 header-spree-fluid-logo m-0">
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) || (defined?(should_render_internationalization_dropdown?) && should_render_internationalization_dropdown?) %>
|
2
|
+
<li class="d-none d-xl-block internationalization-options">
|
3
|
+
<div class="dropdown navbar-right-dropdown">
|
4
|
+
<button id="internationalization-button-desktop" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t(:internationalization) %>">
|
5
|
+
<%= icon(name: 'global',
|
6
|
+
classes: 'd-none d-xl-inline-block',
|
7
|
+
width: 41,
|
8
|
+
height: 36) %>
|
9
|
+
<%= icon(name: 'arrow-down',
|
10
|
+
classes: 'd-inline-block d-xl-none',
|
11
|
+
width: 15,
|
12
|
+
height: 15) %>
|
13
|
+
</button>
|
14
|
+
|
15
|
+
<div id="internationalization-options-desktop" class="dropdown-menu dropdown-menu-right text-left">
|
16
|
+
<% if (defined?(should_render_store_chooser?) && should_render_store_chooser?) %>
|
17
|
+
<% stores.each do |store| %>
|
18
|
+
<div class="pl-3 d-flex justify-content-between align-items-center stores-list">
|
19
|
+
<%= country_flag_icon(store_country_iso(store)) %>
|
20
|
+
<%= store_link(store, class: "dropdown-item text-uppercase #{'font-weight-bold' if current_store == store}") %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<% else %>
|
24
|
+
<%= render 'spree/shared/locale_dropdown' %>
|
25
|
+
<div class="dropdown-divider"></div>
|
26
|
+
<%= render 'spree/shared/currency_dropdown' %>
|
27
|
+
<% end %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</li>
|
31
|
+
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div class="checkout-confirm-order-details-line-items-line-item w-100 d-table-row">
|
2
2
|
<div class="checkout-confirm-order-details-line-items-line-item-name d-table-cell align-middle py-3 py-sm-4">
|
3
3
|
<div class="d-flex align-items-lg-center">
|
4
|
-
<%= link_to product_image(line_item.variant), line_item.product %>
|
4
|
+
<%= link_to product_image(line_item.variant), spree.product_path(line_item.product) %>
|
5
5
|
<div class="d-flex flex-column mt-2 mt-lg-0">
|
6
|
-
<div><%= link_to line_item.name, line_item.product %></div>
|
6
|
+
<div><%= link_to line_item.name, spree.product_path(line_item.product) %></div>
|
7
7
|
<ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
|
8
8
|
<% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
|
9
9
|
<li>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if try_spree_current_user %>
|
2
|
-
<%= link_to Spree.t(
|
3
|
-
<%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path, class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
|
4
|
-
<%= link_to Spree.t(
|
2
|
+
<%= link_to Spree.t(:my_account).upcase, spree.account_path, class: 'dropdown-item' if spree.respond_to?(:account_path) %>
|
3
|
+
<%= link_to Spree.t('nav_bar.admin_panel'), spree.admin_orders_path(locale: nil), class: 'dropdown-item text-uppercase' if try_spree_current_user.has_spree_role?(:admin) %>
|
4
|
+
<%= link_to Spree.t(:logout).upcase, spree_logout_path, class: 'dropdown-item', method: :get if defined?(spree_logout_path) %>
|
5
5
|
<% else %>
|
6
|
-
<%= link_to Spree.t(
|
7
|
-
<%= link_to Spree.t(
|
6
|
+
<%= link_to Spree.t(:login).upcase, spree_login_path, class: 'dropdown-item' if defined?(spree_login_path) %>
|
7
|
+
<%= link_to Spree.t(:sign_up).upcase, spree_signup_path, class: 'dropdown-item' if defined?(spree_signup_path) %>
|
8
8
|
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if should_render_locale_dropdown? %>
|
2
|
+
<%= form_tag spree.set_locale_path, method: :get, class: 'px-4 py-3 w-100', id: 'locale-select' do %>
|
3
|
+
<div class="form-group">
|
4
|
+
<label for="switch_to_locale" class="dropdown-header text-center">
|
5
|
+
<%= Spree.t('i18n.language') %>
|
6
|
+
</label>
|
7
|
+
<%= select_tag(:switch_to_locale,
|
8
|
+
options_for_select(supported_locales_options, I18n.locale),
|
9
|
+
class: 'custom-select w-100') %>
|
10
|
+
<noscript><%= submit_tag %></noscript>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|