Commit 2f584417b36cfb46bcbebdd4ad7b91d29df2a5d0
1 parent
199ee52f
Exists in
master
and in
29 other branches
Use fancy box for displaying product's image
Showing
5 changed files
with
17 additions
and
10 deletions
Show diff stats
app/views/manage_products/_display_image.rhtml
1 | <div id='display-product-image'> | 1 | <div id='display-product-image'> |
2 | - <%= image_tag (@product.reload.default_image('thumb')), :class => 'product-pic' %> | 2 | + <%= image_tag (@product.reload.default_image('big')), :class => 'product-pic' %> |
3 | </div> | 3 | </div> |
4 | 4 | ||
5 | +<% if @product.image %> | ||
6 | + <%= link_to content_tag(:span, _('Zoom in')), @product.image.public_filename, | ||
7 | + :class => 'zoomify-image' %> | ||
8 | +<% end %> | ||
9 | +<%= add_zoom_to_images %> | ||
10 | + | ||
5 | <%= edit_product_link_to_remote(@product, 'image', _('Change image')) %> | 11 | <%= edit_product_link_to_remote(@product, 'image', _('Change image')) %> |
app/views/manage_products/show.rhtml
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | </div> | 9 | </div> |
10 | 10 | ||
11 | <div id='product-details'> | 11 | <div id='product-details'> |
12 | - <div id='product-image'> | 12 | + <div id='product-image' class="zoomable-image"> |
13 | <%= render :partial => 'manage_products/display_image' %> | 13 | <%= render :partial => 'manage_products/display_image' %> |
14 | </div> | 14 | </div> |
15 | <div id='product-extra-content'> | 15 | <div id='product-extra-content'> |
app/views/search/_display_results.rhtml
app/views/search/_image.rhtml
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <div class="zoomable-image"> | 40 | <div class="zoomable-image"> |
41 | <%= link_to '', product_path(image), :class => "search-image-pic", | 41 | <%= link_to '', product_path(image), :class => "search-image-pic", |
42 | :style => 'background-image: url(%s)'% image.default_image(:thumb) %> | 42 | :style => 'background-image: url(%s)'% image.default_image(:thumb) %> |
43 | - <%= link_to content_tag(:span, _('Zoom in')), image.default_image(:big).gsub('_big',''), | 43 | + <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename, |
44 | :class => 'zoomify-image' %> | 44 | :class => 'zoomify-image' %> |
45 | </div> | 45 | </div> |
46 | <% else %> | 46 | <% else %> |
@@ -50,4 +50,3 @@ | @@ -50,4 +50,3 @@ | ||
50 | <div class="search-content-type-icon icon-content-<%=image.class.to_s.underscore.dasherize%>"></div> | 50 | <div class="search-content-type-icon icon-content-<%=image.class.to_s.underscore.dasherize%>"></div> |
51 | <% end %> | 51 | <% end %> |
52 | </div> | 52 | </div> |
53 | -<%= add_zoom_to_images %> |
app/views/search/_search_form.rhtml
@@ -30,14 +30,14 @@ | @@ -30,14 +30,14 @@ | ||
30 | <%= _("Type more than 2 characters to start a search") %> | 30 | <%= _("Type more than 2 characters to start a search") %> |
31 | </div> | 31 | </div> |
32 | </div> | 32 | </div> |
33 | + | ||
34 | + <% end %> | ||
33 | 35 | ||
34 | - <% if @empty_query %> | ||
35 | - <% hint = environment.search_hints[@asset] %> | ||
36 | - <% if hint and !hint.blank? %> | ||
37 | - <span class="search-hint"><%= hint %></span> | ||
38 | - <% end %> | 36 | + <% if @empty_query %> |
37 | + <% hint = environment.search_hints[@asset] %> | ||
38 | + <% if hint and !hint.blank? %> | ||
39 | + <div class="search-hint"><%= hint %></div> | ||
39 | <% end %> | 40 | <% end %> |
40 | - | ||
41 | <% end %> | 41 | <% end %> |
42 | 42 | ||
43 | <div style="clear: both"></div> | 43 | <div style="clear: both"></div> |