diff --git a/app/views/search/_display_results.rhtml b/app/views/search/_display_results.rhtml index cdf0c06..89ecb39 100644 --- a/app/views/search/_display_results.rhtml +++ b/app/views/search/_display_results.rhtml @@ -17,13 +17,17 @@ <%= @names[name] %> <% end %> - <%= link_to _('see all (%d)') % results.total_entries, params.merge(:action => 'index', :find_in => [ name ]), :class => 'see-more' %> + <%= link_to( _('see all (%d)') % results.total_entries, + params.merge(:action => 'index', + :find_in => [ name ]), + :class => 'see-more' ) if @results.size > 1 %> <% end %> <% partial = partial_for_class results.first.class %>

diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml index 6151bad..b74c153 100644 --- a/app/views/search/_product.rhtml +++ b/app/views/search/_product.rhtml @@ -1,6 +1,11 @@ <%# FIXME add more information %> -
  • +<% +product_item_pos = 0 if ! product_item_pos +product_item_pos += 1 +%> + +
  • <%= link_to_product product, :class => 'product-pic', :style => 'background-image:url(%s)' % ( product.image ? product.image.public_filename(:minor) : '/images/icons-app/product-default-pic-minor.png' ) %> diff --git a/app/views/search/_product_categories_menu.rhtml b/app/views/search/_product_categories_menu.rhtml index 491018e..c50cd10 100644 --- a/app/views/search/_product_categories_menu.rhtml +++ b/app/views/search/_product_categories_menu.rhtml @@ -1,3 +1,9 @@ +<% if @product_category %> +

    + <%= @product_category.hierarchy.map {|cat| ((cat == @product_category) ? content_tag('span', cat.name) : link_to((cat.name), params.merge({:product_category => cat.id}))) }.join(' → ') %> +

    +<% end %> + <% if product_categories_menu %>
    @@ -44,7 +50,7 @@ function prodCatMenuOver( li ) { li.opening = true; li.className = "cat-parent sub-opening"; li.subMenu.className = "opening"; - li.e = Effect.BlindDown(li.subMenu); + li.e = Effect.BlindDown(li.subMenu, { duration: 0.33 }); li.e._finish = li.e.finish; li.e.finish = function(){ this._finish(); @@ -68,7 +74,7 @@ function prodCatMenuOut( li ) { this.closeing = true; this.className = "cat-parent sub-closeing"; this.subMenu.className = "closeing"; - this.e = Effect.BlindUp(this.subMenu); + this.e = Effect.BlindUp(this.subMenu, { duration: 0.5 }); this.e._finish = this.e.finish; this.e.finish = function(){ this._finish(); diff --git a/app/views/search/enterprises.rhtml b/app/views/search/enterprises.rhtml index e6479c5..8a6715d 100644 --- a/app/views/search/enterprises.rhtml +++ b/app/views/search/enterprises.rhtml @@ -12,10 +12,18 @@ <%= render :partial => 'search_form', :locals => { :form_title => _("Refine your search"), :simple_search => true } %> +<% if @categories_menu %> +
    +<% end %> + <%= render :partial => 'product_categories_menu', :object => @categories_menu %> <%= display_results %> +<% if @categories_menu %> +
    +<% end %> + <%= pagination_links @results[:enterprises] %>
    diff --git a/app/views/search/products.rhtml b/app/views/search/products.rhtml index bd19a81..d4a7e76 100644 --- a/app/views/search/products.rhtml +++ b/app/views/search/products.rhtml @@ -10,12 +10,6 @@

    <%=h (_('Within %s km from %s') % [@radius, @region.name]) %>

    <% end %> -<% if @product_category %> -

    - <%= @product_category.hierarchy.map {|cat| ((cat == @product_category) ? cat.name : link_to((cat.name), params.merge({:product_category => cat.id}))) }.join(' → ') %> -

    -<% end %> - <%= render :partial => 'search_form', :locals => { :form_title => _("Refine your search"), :simple_search => true } %> <% if @categories_menu %> diff --git a/config/web2.0.yml.dist b/config/web2.0.yml.dist index 207aa2e..5584781 100644 --- a/config/web2.0.yml.dist +++ b/config/web2.0.yml.dist @@ -6,4 +6,5 @@ addthis: pub: your-user-name logo: http://localhost:3000/images/logo-200x50.png options: favorites, email, digg, delicious, technorati, slashdot, twitter, more - +googlemaps: + key: diff --git a/public/designs/themes/ecosol/stylesheets/controller_search.css b/public/designs/themes/ecosol/stylesheets/controller_search.css index a3ac917..b112f1a 100644 --- a/public/designs/themes/ecosol/stylesheets/controller_search.css +++ b/public/designs/themes/ecosol/stylesheets/controller_search.css @@ -225,3 +225,20 @@ body.category4 .category-innerbox { font-weight: bold; } + +/* * * Pagination * * * * * * * * * * * */ + +.pagination * { + padding: 0px 3px 2px 3px; + -moz-border-radius: 5px; +} + +.pagination a { + text-decoration: none; +} + +.pagination a:hover { + color: #FFF; + background: #729FCF; +} + diff --git a/public/stylesheets/controller_search.css b/public/stylesheets/controller_search.css index 6113bc7..342359a 100644 --- a/public/stylesheets/controller_search.css +++ b/public/stylesheets/controller_search.css @@ -2,6 +2,18 @@ position: relative; /* to the text appear on MSIE 6 */ } +#content .map-toggle-button { + float: right; + margin-top: -35px; +} + +.current-cat-path { + padding-left: 25px; +} +.current-cat-path * { + white-space: nowrap; +} + #search-results { margin-top: 10px; /* none by default, but... Who knows the future? :-) */ @@ -195,6 +207,14 @@ line-height: 12px; } +#content .only-one-result-box .search-results-type-product .product-item { + width: 50%; + height: 80px; + max-height: 70px; + overflow: hidden; + float: left; +} + .product-pic { display: block; float: left; @@ -225,3 +245,27 @@ .profile-info { text-align: left; } + + +/* * * Pagination * * * * * * * * * * * */ + +.pagination { + text-align: center; +} + +.pagination .disabled { + color: #888; +} + +.pagination .current { + font-weight: bold; +} + +.pagination a { + text-decoration: none; +} + +.pagination a:hover { + color: #026; +} + -- libgit2 0.21.2