stadtratmonitor/app/views/search/index.html.slim
2017-01-01 13:41:28 +01:00

24 lines
689 B
Text

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