Commit baf90832bf5ba942f0c6acd11b4f3b5fd6a0f1c9
1 parent
719f909f
Exists in
master
and in
28 other branches
Fix "Display in map" search view
Showing
7 changed files
with
25 additions
and
10 deletions
Show diff stats
app/helpers/search_helper.rb
@@ -85,7 +85,7 @@ module SearchHelper | @@ -85,7 +85,7 @@ module SearchHelper | ||
85 | content_tag('table', | 85 | content_tag('table', |
86 | content_tag('tr', | 86 | content_tag('tr', |
87 | content_tag('td', content_tag('div', image_tag(product.image ? product.image.public_filename(:thumb) : '/images/icons-app/product-default-pic-portrait.png'), :class => 'profile-info-picture')) + | 87 | content_tag('td', content_tag('div', image_tag(product.image ? product.image.public_filename(:thumb) : '/images/icons-app/product-default-pic-portrait.png'), :class => 'profile-info-picture')) + |
88 | - content_tag('td', content_tag('strong', link_to(product.name, :controller => 'catalog', :profile => product.enterprise.identifier, :action => 'show', :id => product)) + '<br/>' + data) | 88 | + content_tag('td', content_tag('strong', link_to(product.name, :controller => 'catalog', :profile => product.enterprise.identifier, :id => product.id)) + '<br/>' + data) |
89 | ), :class => 'profile-info') | 89 | ), :class => 'profile-info') |
90 | end | 90 | end |
91 | 91 |
app/views/search/_results_header.rhtml
1 | <div class="results-header"> | 1 | <div class="results-header"> |
2 | <%= label_total_found(asset, results.total_entries) %> | 2 | <%= label_total_found(asset, results.total_entries) %> |
3 | - <span class="current-page"><%= _("Showing page %s of %s") % [results.current_page, results.total_pages] %></div> | 3 | + <% if params[:display] != 'map' %> |
4 | + <span class="current-page"><%= _("Showing page %s of %s") % [results.current_page, results.total_pages] %></span> | ||
5 | + <% end %> | ||
6 | + | ||
4 | <%= facets_unselect_menu(asset) %> | 7 | <%= facets_unselect_menu(asset) %> |
5 | - <%= order_by(asset) %> | 8 | + |
9 | + <%= order_by(asset) if params[:display] != 'map' %> | ||
6 | </div> | 10 | </div> |
app/views/search/communities.rhtml
@@ -21,7 +21,9 @@ | @@ -21,7 +21,9 @@ | ||
21 | <%# FIXME ARMENGUE %> | 21 | <%# FIXME ARMENGUE %> |
22 | <%= display_results(false) %> | 22 | <%= display_results(false) %> |
23 | 23 | ||
24 | - <%= pagination_links @results.values.first %> | 24 | + <% if params[:display] != 'map' %> |
25 | + <%= pagination_links @results.values.first %> | ||
26 | + <% end %> | ||
25 | </div> | 27 | </div> |
26 | 28 | ||
27 | <br style="clear:both" /> | 29 | <br style="clear:both" /> |
app/views/search/enterprises.rhtml
@@ -34,6 +34,8 @@ | @@ -34,6 +34,8 @@ | ||
34 | </div><!-- class="has_cat_list" --> | 34 | </div><!-- class="has_cat_list" --> |
35 | <% end %> | 35 | <% end %> |
36 | 36 | ||
37 | -<%= pagination_links @results[:enterprises] %> | 37 | +<% if params[:display] != 'map' %> |
38 | + <%= pagination_links @results[:enterprises] %> | ||
39 | +<% end %> | ||
38 | 40 | ||
39 | <br style="clear:both" /> | 41 | <br style="clear:both" /> |
app/views/search/people.rhtml
@@ -15,6 +15,8 @@ | @@ -15,6 +15,8 @@ | ||
15 | <%# FIXME ARMENGUE %> | 15 | <%# FIXME ARMENGUE %> |
16 | <%= display_results(false) %> | 16 | <%= display_results(false) %> |
17 | 17 | ||
18 | -<%= pagination_links @results.values.first %> | 18 | +<% if params[:display] != 'map' %> |
19 | + <%= pagination_links @results.values.first %> | ||
20 | +<% end %> | ||
19 | 21 | ||
20 | <br style="clear:both" /> | 22 | <br style="clear:both" /> |
app/views/search/products.rhtml
@@ -24,6 +24,8 @@ | @@ -24,6 +24,8 @@ | ||
24 | </div><!-- class="has_cat_list" --> | 24 | </div><!-- class="has_cat_list" --> |
25 | <% end %> | 25 | <% end %> |
26 | 26 | ||
27 | -<%= pagination_links @results[:products] %> | 27 | +<% if params[:display] != 'map' %> |
28 | + <%= pagination_links @results[:products] %> | ||
29 | +<% end %> | ||
28 | 30 | ||
29 | <br style="clear:both" /> | 31 | <br style="clear:both" /> |
public/stylesheets/application.css
@@ -1890,6 +1890,9 @@ input.disabled { | @@ -1890,6 +1890,9 @@ input.disabled { | ||
1890 | #map { | 1890 | #map { |
1891 | height: 500px; | 1891 | height: 500px; |
1892 | } | 1892 | } |
1893 | +.map { | ||
1894 | + clear: both; | ||
1895 | +} | ||
1893 | /*********************************************************** | 1896 | /*********************************************************** |
1894 | * style for blocks | 1897 | * style for blocks |
1895 | ***********************************************************/ | 1898 | ***********************************************************/ |
@@ -4615,7 +4618,7 @@ float: right; | @@ -4615,7 +4618,7 @@ float: right; | ||
4615 | overflow: auto; | 4618 | overflow: auto; |
4616 | } | 4619 | } |
4617 | 4620 | ||
4618 | -.search-results-type-product li.product-item { | 4621 | +li.product-item { |
4619 | position: relative; | 4622 | position: relative; |
4620 | height: 60px; | 4623 | height: 60px; |
4621 | overflow: hidden; | 4624 | overflow: hidden; |
@@ -6313,7 +6316,7 @@ float: right; | @@ -6313,7 +6316,7 @@ float: right; | ||
6313 | color: #007788; | 6316 | color: #007788; |
6314 | font-size: 1.2em; | 6317 | font-size: 1.2em; |
6315 | } | 6318 | } |
6316 | -.controller-search #content #search-results .search-results-type-product li.product-item { | 6319 | +li.product-item { |
6317 | display:block; | 6320 | display:block; |
6318 | float:none | 6321 | float:none |
6319 | overflow:visible; | 6322 | overflow:visible; |
@@ -6323,7 +6326,7 @@ float: right; | @@ -6323,7 +6326,7 @@ float: right; | ||
6323 | height:auto; | 6326 | height:auto; |
6324 | max-height:none; | 6327 | max-height:none; |
6325 | } | 6328 | } |
6326 | -.controller-search .search-results-innerbox li.product-item hr { | 6329 | +li.product-item hr { |
6327 | display:block; | 6330 | display:block; |
6328 | margin:0; | 6331 | margin:0; |
6329 | clear: both; | 6332 | clear: both; |