spree_frontend 3.0.0 → 3.0.1
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/product.js.coffee +1 -1
- data/app/controllers/spree/orders_controller.rb +1 -1
- data/app/helpers/spree/frontend_helper.rb +8 -8
- data/app/views/spree/orders/edit.html.erb +7 -6
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/show.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +13 -11
- data/app/views/spree/shared/_products.html.erb +2 -2
- data/app/views/spree/taxons/show.html.erb +1 -1
- data/spec/spec_helper.rb +0 -1
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ca.js +2 -2
- metadata +6 -7
- data/app/views/spree/shared/_footer.html.erb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28b43e53de5b7242b077f72115ae7c95c169a01b
|
4
|
+
data.tar.gz: 956b54568f09eb563564df2e77f1db0ef00b763d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a39e7d2b31e5c664e70ea8d06839d851238ab9bfddb3f40ec9adcb7529f595e701b76e2a487223e591aaeda443feef72b4156acf9b05987b3c2ecd79db71cb2
|
7
|
+
data.tar.gz: 094be18bbca59c0ef858ea25af82722a26f61ca2699af172c4298b0f404eb9a05137822e1822d14d9dca0da5716316fa9eb78d914c4b055b4deec66bddf11a45
|
@@ -41,7 +41,7 @@ module Spree
|
|
41
41
|
order = current_order(create_order_if_necessary: true)
|
42
42
|
variant = Spree::Variant.find(params[:variant_id])
|
43
43
|
quantity = params[:quantity].to_i
|
44
|
-
options =
|
44
|
+
options = params[:options] || {}
|
45
45
|
|
46
46
|
# 2,147,483,647 is crazy. See issue #2695.
|
47
47
|
if quantity.between?(1, 2_147_483_647)
|
@@ -4,19 +4,19 @@ module Spree
|
|
4
4
|
@body_class ||= content_for?(:sidebar) ? 'two-col' : 'one-col'
|
5
5
|
@body_class
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
def breadcrumbs(taxon, separator=" ")
|
9
9
|
return "" if current_page?("/") || taxon.nil?
|
10
10
|
separator = raw(separator)
|
11
|
-
crumbs = [content_tag(:li, content_tag(:span, link_to(Spree.t(:home), spree.root_path, itemprop: "url") + separator, itemprop: "
|
11
|
+
crumbs = [content_tag(:li, content_tag(:span, link_to(content_tag(:span, Spree.t(:home), itemprop: "name"), spree.root_path, itemprop: "url") + separator, itemprop: "item"), itemscope: "itemscope", itemtype: "https://schema.org/ListItem", itemprop: "itemListElement")]
|
12
12
|
if taxon
|
13
|
-
crumbs << content_tag(:li, content_tag(:span, link_to(Spree.t(:products), spree.products_path, itemprop: "url") + separator, itemprop: "
|
14
|
-
crumbs << taxon.ancestors.collect { |ancestor| content_tag(:li, content_tag(:span, link_to(ancestor.name , seo_url(ancestor), itemprop: "url") + separator, itemprop: "
|
15
|
-
crumbs << content_tag(:li, content_tag(:span, link_to(taxon.name , seo_url(taxon), itemprop: "url"), itemprop: "
|
13
|
+
crumbs << content_tag(:li, content_tag(:span, link_to(content_tag(:span, Spree.t(:products), itemprop: "name"), spree.products_path, itemprop: "url") + separator, itemprop: "item"), itemscope: "itemscope", itemtype: "https://schema.org/ListItem", itemprop: "itemListElement")
|
14
|
+
crumbs << taxon.ancestors.collect { |ancestor| content_tag(:li, content_tag(:span, link_to(content_tag(:span, ancestor.name, itemprop: "name"), seo_url(ancestor), itemprop: "url") + separator, itemprop: "item"), itemscope: "itemscope", itemtype: "https://schema.org/ListItem", itemprop: "itemListElement") } unless taxon.ancestors.empty?
|
15
|
+
crumbs << content_tag(:li, content_tag(:span, link_to(content_tag(:span, taxon.name, itemprop: "name") , seo_url(taxon), itemprop: "url"), itemprop: "item"), class: 'active', itemscope: "itemscope", itemtype: "https://schema.org/ListItem", itemprop: "itemListElement")
|
16
16
|
else
|
17
|
-
crumbs << content_tag(:li, content_tag(:span, Spree.t(:products), itemprop: "
|
17
|
+
crumbs << content_tag(:li, content_tag(:span, Spree.t(:products), itemprop: "item"), class: 'active', itemscope: "itemscope", itemtype: "https://schema.org/ListItem", itemprop: "itemListElement")
|
18
18
|
end
|
19
|
-
crumb_list = content_tag(:ol, raw(crumbs.flatten.map{|li| li.mb_chars}.join), class: 'breadcrumb')
|
19
|
+
crumb_list = content_tag(:ol, raw(crumbs.flatten.map{|li| li.mb_chars}.join), class: 'breadcrumb', itemscope: "itemscope", itemtype: "https://schema.org/BreadcrumbList")
|
20
20
|
content_tag(:nav, crumb_list, id: 'breadcrumbs', class: 'col-md-12')
|
21
21
|
end
|
22
22
|
|
@@ -81,7 +81,7 @@ module Spree
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def taxons_tree(root_taxon, current_taxon, max_level = 1)
|
84
|
-
return '' if max_level < 1 || root_taxon.
|
84
|
+
return '' if max_level < 1 || root_taxon.leaf?
|
85
85
|
content_tag :div, class: 'list-group' do
|
86
86
|
root_taxon.children.map do |taxon|
|
87
87
|
css_class = (current_taxon && current_taxon.self_and_ancestors.include?(taxon)) ? 'list-group-item active' : 'list-group-item'
|
@@ -18,12 +18,13 @@
|
|
18
18
|
|
19
19
|
<div class="links col-md-6 navbar-form pull-right text-right" data-hook="cart_buttons">
|
20
20
|
<div class="form-group">
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
<%= button_tag class: 'btn btn-primary', id: 'update-button' do %>
|
22
|
+
<%= Spree.t(:update) %>
|
23
|
+
<% end %>
|
24
|
+
<%= button_tag class: 'btn btn-lg btn-success', id: 'checkout-link', name: 'checkout' do %>
|
25
|
+
<%= Spree.t(:checkout) %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
27
28
|
</div>
|
28
29
|
</div>
|
29
30
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= form_for :order, :url => populate_orders_path do |f| %>
|
2
|
-
<div class="row" id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="
|
2
|
+
<div class="row" id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
3
3
|
<% if @product.variants_and_option_values(current_currency).any? %>
|
4
4
|
<div id="product-variants" class="col-md-6">
|
5
5
|
<h3 class="product-section-title"><%= Spree.t(:variants) %></h3>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
</div>
|
39
39
|
|
40
40
|
<% if @product.master.can_supply? %>
|
41
|
-
<link itemprop="availability" href="
|
41
|
+
<link itemprop="availability" href="https://schema.org/InStock" />
|
42
42
|
<% elsif @product.variants.empty? %>
|
43
43
|
<br />
|
44
44
|
<span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% @body_id = 'product-details' %>
|
2
2
|
|
3
3
|
<% cache [I18n.locale, current_currency, @product] do %>
|
4
|
-
<div data-hook="product_show" itemscope itemtype="
|
4
|
+
<div data-hook="product_show" itemscope itemtype="https://schema.org/Product">
|
5
5
|
<div class="col-md-4" data-hook="product_left_part">
|
6
6
|
<div data-hook="product_left_part_wrap">
|
7
7
|
<div id="product-images" data-hook="product_images">
|
@@ -2,13 +2,13 @@
|
|
2
2
|
<% if order.has_step?("address") %>
|
3
3
|
<div class="col-md-3" data-hook="order-bill-address">
|
4
4
|
<h4><%= Spree.t(:billing_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless order.completed? %></h4>
|
5
|
-
<%= render
|
5
|
+
<%= render 'spree/shared/address', address: order.bill_address %>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<% if order.has_step?("delivery") %>
|
9
9
|
<div class="col-md-3" data-hook="order-ship-address">
|
10
10
|
<h4><%= Spree.t(:shipping_address) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:address) unless order.completed? %></h4>
|
11
|
-
<%= render
|
11
|
+
<%= render 'spree/shared/address', address: order.ship_address %>
|
12
12
|
</div>
|
13
13
|
|
14
14
|
<div class=" col-md-3" data-hook="order-shipment">
|
@@ -21,19 +21,21 @@
|
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
24
|
-
<%= render
|
24
|
+
<%= render 'spree/shared/shipment_tracking', order: order if order.shipped? %>
|
25
25
|
</div>
|
26
26
|
<% end %>
|
27
27
|
<% end %>
|
28
|
-
|
29
|
-
|
30
|
-
<
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
|
29
|
+
<% if @order.has_step?("payment") %>
|
30
|
+
<div class="col-md-3">
|
31
|
+
<h4><%= Spree.t(:payment_information) %> <%= link_to "(#{Spree.t(:edit)})", checkout_state_path(:payment) unless order.completed? %></h4>
|
32
|
+
<div class="payment-info">
|
33
|
+
<% order.payments.valid.each do |payment| %>
|
34
|
+
<%= render payment %><br/>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
35
37
|
</div>
|
36
|
-
|
38
|
+
<% end %>
|
37
39
|
</div>
|
38
40
|
|
39
41
|
<hr />
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<div id="products" class="row" data-hook>
|
26
26
|
<% products.each do |product| %>
|
27
27
|
<% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %>
|
28
|
-
<div id="product_<%= product.id %>" class="col-md-3 col-sm-6 product-list-item" data-hook="products_list_item" itemscope itemtype="
|
28
|
+
<div id="product_<%= product.id %>" class="col-md-3 col-sm-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/Product">
|
29
29
|
<div class="panel panel-default">
|
30
30
|
<% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : [I18n.locale, current_currency, product]) do %>
|
31
31
|
<div class="panel-body text-center product-body">
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
|
34
34
|
</div>
|
35
35
|
<div class="panel-footer text-center">
|
36
|
-
<span itemprop="offers" itemscope itemtype="
|
36
|
+
<span itemprop="offers" itemscope itemtype="https://schema.org/Offer">
|
37
37
|
<span class="price selling lead" itemprop="price"><%= display_price(product) %></span>
|
38
38
|
</span>
|
39
39
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% content_for :sidebar do %>
|
4
4
|
<div data-hook="taxon_sidebar_navigation">
|
5
5
|
<%= render partial: 'spree/shared/taxonomies' %>
|
6
|
-
<%= render partial: 'spree/shared/filters' if @taxon.
|
6
|
+
<%= render partial: 'spree/shared/filters' if @taxon.leaf? %>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
9
9
|
|
data/spec/spec_helper.rb
CHANGED
@@ -97,7 +97,6 @@ RSpec.configure do |config|
|
|
97
97
|
config.after(:each, :type => :feature) do |example|
|
98
98
|
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
99
99
|
if missing_translations.any?
|
100
|
-
#binding.pry
|
101
100
|
puts "Found missing translations: #{missing_translations.inspect}"
|
102
101
|
puts "In spec: #{example.location}"
|
103
102
|
end
|
@@ -13,7 +13,7 @@
|
|
13
13
|
number: "Si us plau, escriu un número enter vàlid.",
|
14
14
|
digits: "Si us plau, escriu només dígits.",
|
15
15
|
creditcard: "Si us plau, escriu un número de tarjeta vàlid.",
|
16
|
-
equalTo: "Si us plau, escriu el
|
16
|
+
equalTo: "Si us plau, escriu el mateix valor de nou.",
|
17
17
|
accept: "Si us plau, escriu un valor amb una extensió acceptada.",
|
18
18
|
maxlength: $.validator.format("Si us plau, no escriguis més de {0} caracters."),
|
19
19
|
minlength: $.validator.format("Si us plau, no escriguis menys de {0} caracters."),
|
@@ -22,4 +22,4 @@
|
|
22
22
|
max: $.validator.format("Si us plau, escriu un valor menor o igual a {0}."),
|
23
23
|
min: $.validator.format("Si us plau, escriu un valor major o igual a {0}.")
|
24
24
|
});
|
25
|
-
}(jQuery));
|
25
|
+
}(jQuery));
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.0.
|
33
|
+
version: 3.0.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.0.
|
40
|
+
version: 3.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap-sass
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -451,7 +451,6 @@ files:
|
|
451
451
|
- app/views/spree/shared/_address.html.erb
|
452
452
|
- app/views/spree/shared/_error_messages.html.erb
|
453
453
|
- app/views/spree/shared/_filters.html.erb
|
454
|
-
- app/views/spree/shared/_footer.html.erb
|
455
454
|
- app/views/spree/shared/_google_add_items.js.erb
|
456
455
|
- app/views/spree/shared/_google_analytics.js.erb
|
457
456
|
- app/views/spree/shared/_google_checkout.js.erb
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div id="spree-footer">
|
2
|
-
<div class="container">
|
3
|
-
<footer id="footer" class="row" data-hook>
|
4
|
-
<div id="footer-left" class="col-md-6" data-hook>
|
5
|
-
<p><%= Spree.t :powered_by %> <%= link_to 'Spree', 'http://spreecommerce.com/' %></p>
|
6
|
-
</div>
|
7
|
-
<div id="footer-right" class="col-md-6" data-hook></div>
|
8
|
-
</footer>
|
9
|
-
</div>
|
10
|
-
</div>
|