<% # 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| %>
<%= render :partial => "bento_search/item_title", :object => item, :as => 'item', :locals => {:index => bento_item_counter(local_assigns[:item_counter], local_assigns[:results]) } %>
<% if item.authors.length > 0 || item.year.present? %>

<% if item.authors.length > 0 %> <%= bento_item_authors(item) %> <% end %> <% if item.year.present? %> — <%= item.year %> <% end %>

<% end %> <% if item.abstract %>

<%= bento_truncate( item.abstract ) %>

<% end %> <% if item.published_in %>

<%= item.published_in %>

<% end %> <% if item.other_links.present? %> <% end %>
<% end %>