Commit 8bc4669ddfed2a8872e9eed708960dd76c2f3463
1 parent
c0ae7ebe
Exists in
master
and in
29 other branches
Single column searchs
Showing
1 changed file
with
4 additions
and
16 deletions
Show diff stats
app/views/search/_display_results.rhtml
1 | 1 | <div id="search-results" class="<%= 'only-one-result-box' if @results.size == 1 %>"> |
2 | 2 | |
3 | -<% | |
4 | - pos2 = :odd # allow to format in a two columns layout | |
5 | - pos3 = 3 # allow to format in a thre columns layout | |
6 | -%> | |
7 | 3 | <% @order.each do |name| %> |
8 | 4 | <% results = @results[name] %> |
9 | - <% | |
10 | - pos3 += 1; pos3 = 1 if pos3 > 3 | |
11 | - pos2==:odd ? pos2=:even : pos2=:odd | |
12 | - %> | |
13 | 5 | <% if !results.nil? and !results.empty? %> |
14 | - <div class="search-results-<%= name %> search-results-box <%= pos2 %> <%= 'col%s_of3' % pos3.to_s %>"> | |
6 | + <div class="search-results-<%= name %> search-results-box"> | |
15 | 7 | <% if @controller.action_name != 'assets' %> |
16 | 8 | <% if @results.size != 1 %> |
17 | 9 | <h3> |
... | ... | @@ -36,13 +28,9 @@ |
36 | 28 | <div class="search-results-innerbox search-results-type-<%= partial %> <%= 'common-profile-list-block' if partial == 'profile' %>"> |
37 | 29 | <div class="search-results-innerbox2"><!-- the innerbox2 is a workarround for MSIE --> |
38 | 30 | <ul> |
39 | - <% hit_pos = 0 %> | |
40 | 31 | <% results.each do |hit| %> |
41 | - <% next if hit.respond_to?(:visible) && !hit.visible? %> | |
42 | - <%= render :partial => partial_for_class(hit.class), | |
43 | - | |
44 | - :object => hit, | |
45 | - :locals => { :pos => ( hit_pos += 1 ) } %> | |
32 | + <% next if hit.respond_to?(:visible) && !hit.visible? %> | |
33 | + <%= render :partial => partial_for_class(hit.class), :object => hit %> | |
46 | 34 | <% end %> |
47 | 35 | </ul> |
48 | 36 | <hr /> |
... | ... | @@ -50,7 +38,7 @@ |
50 | 38 | </div><!-- end class="search-results-innerbox" --> |
51 | 39 | </div><!-- end class="search-results-<%= name %>" --> |
52 | 40 | <% else %> |
53 | - <div class="search-results-<%= name %> search-results-empty search-results-box <%= pos2 %> <%= 'col%s_of3' % pos3.to_s %>"> | |
41 | + <div class="search-results-<%= name %> search-results-empty search-results-box"> | |
54 | 42 | <% if @controller.action_name != 'assets' %> |
55 | 43 | <% if @results.size != 1 %> |
56 | 44 | <h3><%= @names[name] %></h3> | ... | ... |