_display_results.html.erb
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<div id="search-results" class="<%= !multiple_search? ? 'only-one-result-box' : 'multiple-results-boxes' %>">
<% @assets.each do |name| %>
<% search = @searches[name] %>
<div class="search-results-<%= name %> search-results-box <%= "search-results-empty" if search[:results].blank? %>">
<% if !search[:results].blank? %>
<% if multiple_search?(@searches) %>
<h3><%= @names[name] %></h3>
<% if search[:results].total_entries > SearchController::MULTIPLE_SEARCH_LIMIT %>
<%= link_to(_('see all (%d)') % search[:results].total_entries, params.merge(:action => name), :class => 'see-more' ) %>
<% end %>
<% end %>
<% display = display_filter(name, params[:display]) %>
<div class="search-results-innerbox search-results-type-<%= name.to_s.singularize %> <%= 'common-profile-list-block' if SearchHelper::COMMON_PROFILE_LIST_BLOCK.include?(name) %>">
<ul>
<% search[:results].each do |hit| %>
<%= render_for_class hit.class do |klass| %>
<% name = klass.name.underscore %>
<%= render partial_name_for(name, display), name.split('/').last.to_sym => hit %>
<% end %>
<% end %>
</ul>
</div>
<% else %>
<% if multiple_search? %>
<h3><%= @names[name] %></h3>
<% end %>
<div class="search-results-innerbox search-results-type-empty">
<div> <%= _('None') %> </div>
</div>
<% end %>
</div>
<% end %>
<div style="clear:both"></div>
<%= add_zoom_to_images %>
</div>