<% if @controller.action_name != 'assets' %>
<% if @results.size != 1 %>
<%= @names[name] %>
<% end %>
<%# FIXME: don't hardcode an asset like this %>
<% if name == :most_commented_articles %>
<%= link_to( results.respond_to?(:total_entries) ? _('see all (%d)') % results.total_entries : _('see all...'),
params.merge(:action => 'index',
:asset => 'articles' ),
:class => 'see-more' ) if @results.size > 1 %>
<% else %>
<%= link_to( results.respond_to?(:total_entries) ? _('see all (%d)') % results.total_entries : _('see all...'),
params.merge(:action => 'index',
:asset => name ),
:class => 'see-more' ) if @results.size > 1 %>
<% end %>
<% end %>
<% partial = partial_for_class results.first.class %>
<% hit_pos = 0 %>
<% results.each do |hit| %>
<% next if hit.respond_to?(:visible) && !hit.visible? %>
<%= render :partial => partial_for_class(hit.class),
:object => hit,
:locals => { :pos => ( hit_pos += 1 ) } %>
<% end %>
<% else %>