div
  = render 'search/form'

.clearfix
  - if params[:q].present?
    .left
      | #{@papers.total} Treffer
  - else
    | #{pluralize(@papers.total, "Dokument", "Dokumente")} in der Datenbank
div
  ul.no-bullet#search_results
    - @papers.each do |doc|
      li.search-result
        article
          h4 = doc.name
          - if @sub[doc.reference]
            ul
              - @sub[doc.reference].each do |sub|
                li class="#{'current' if sub.reference == doc.reference}"
                  div = link_to "#{l sub.published_at.to_date}: #{sub.paper_type} von #{sub.originator.join(", ")}", sub.url, target: '_blank'
              

div#pagination
  = paginate @papers
