% # must pass in locals: # * 'item' that's a BentoSearch::ResultItem # * 'results' that's the BentoSearch::Results (optional, actually) # * 'item_counter', 1-based collection counter, passed in automatically # by rails render collection (little known rails feature), # can be used with results.start to calculate actual result set # index. # # Custom partials meant to take this place of this one should # use same convention, local 'item'. # # By default we're passing index to item_title partial to display # counter for results, not sure if that's going to be generally # wanted, but to begin with I'm often taking what I need locally # based on user-testing and stuff for my use cases, and making # it default. %> <% bento_decorate(item) do |item| %>
<% if item.authors.length > 0 %> — <%= item.year %> <% end %>
<% end %> <% if item.abstract %> <% end %> <% if item.year.present? %><%= bento_truncate( item.abstract ) %>
<% end %> <% if item.has_source_info? %><%= item.render_source_info %>
<% end %> <% if item.other_links.present? %><%= render :partial => "bento_search/link", :collection => item.other_links %>
<% end %>