diff --git a/app/helpers/display_helper.rb b/app/helpers/display_helper.rb
index e269778..37c4090 100644
--- a/app/helpers/display_helper.rb
+++ b/app/helpers/display_helper.rb
@@ -8,6 +8,14 @@ module DisplayHelper
opts
end
+ def image_link_to_product(product, opts={})
+ return _('No product') unless product
+ target = product_path(product)
+ link_to image_tag(product.default_image(:big), :alt => product.name),
+ target,
+ opts
+ end
+
def price_span(price, options = {})
content_tag 'span',
number_to_currency(price, :unit => environment.currency_unit, :delimiter => environment.currency_delimiter, :separator => environment.currency_separator),
diff --git a/app/views/catalog/index.rhtml b/app/views/catalog/index.rhtml
index 6c65a14..080c471 100644
--- a/app/views/catalog/index.rhtml
+++ b/app/views/catalog/index.rhtml
@@ -11,7 +11,12 @@
">
<% if product.image %>
- - <%= link_to_product product, :class => 'product-big', :style => 'background-image:url(%s)' % product.default_image(:big) %>
+ -
+
+
<% else %>
- <%= _('No image') %>
<% end %>
@@ -88,3 +93,13 @@
<%= pagination_links @products, :params => {:controller => :catalog, :action => :index, :profile => profile.identifier} %>
+
+
diff --git a/features/browse_catalogs.feature b/features/browse_catalogs.feature
index ab0c9e9..e477ef4 100644
--- a/features/browse_catalogs.feature
+++ b/features/browse_catalogs.feature
@@ -95,6 +95,14 @@ Feature: browse catalogs
And I should not see "qualifiers"
And I should not see "price composition"
+ Scenario: display "zoom in" button
+ Given the following products
+ | owner | category | name | price | img |
+ | artebonito | categ1 | Agrotox | 12.34 | agrotox |
+ And I am on /catalog/artebonito
+ And I should not see "No image"
+ And I should see "Zoom in" within ".zoomify-image"
+
Scenario: image links to product page
Given the following products
| owner | category | name | price | img |
@@ -122,6 +130,7 @@ Feature: browse catalogs
| owner | category | name | price | description |
| artebonito | categ1 | Produto2 | 12.34 | A small description for a product that doesn't exist. |
And I am on /catalog/artebonito
+ And I reload and wait for the page
Then I should see "Produto2" within "li.product-link"
And I should see "12.34" within "span.product-price"
And I should see "description" within "#product-description-button"
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index a3b92cf..086c4ce 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1075,10 +1075,12 @@ code input {
text-align: left;
background: transparent url(/images/black-alpha-pixel.png);
border-bottom: 1px solid #333;
+ text-decoration: none;
}
.zoomable-image:hover .zoomify-image {
display: block;
+ text-decoration: none;
}
#article .zoomify-image {
@@ -1093,6 +1095,7 @@ code input {
border-bottom: 1px solid #eee;
display: block;
background: transparent url(/images/zoom.png) left center no-repeat;
+ color: #fff;
}
#article pre {
@@ -2980,7 +2983,7 @@ div#activation_enterprise div {
}
#product-list li.product {
width: 200px;
- min-height: 260px;
+ min-height: 280px;
float: left;
padding: 10px 30px 10px 0;
margin-bottom: 10px;
@@ -3122,11 +3125,14 @@ div#activation_enterprise div {
#product-list .product-big {
display: block;
width: 200px;
- height: 140px;
+ height: 160px;
border: 1px solid #BFBFBF;
- background-repeat: no-repeat;
- background-position: 50% 50%;
+/* background-repeat: no-repeat;
+ background-position: 50% 50%; */
position: relative; /* work arround msie bug */
+ text-align: center;
+ display: table-cell;
+ vertical-align: middle;
}
#product-list .product-big.no-image {
line-height: 145px;
--
libgit2 0.21.2