% # 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| %> <%# for debugging purposes, we'll include the vendor-specific unique_id, if we have one, in a data-unique-id attribute. %>
<% if item.authors.present? %> <%= I18n.t("bento_search.author_date_seperator", :default=>"—") %> <% end %> <% if item.display_date.present? %> <%= item.display_date %> <% end %>
<% end %> <% if item.abstract %> <% end %> <% if item.authors.present? && item.display_date.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 %>