use dsl for search definition and fix pagination

This commit is contained in:
Lars Henrik Mai 2015-06-01 23:53:45 +02:00 committed by Andreas Haller
parent aa644818c4
commit 5b677ab3ca
5 changed files with 28 additions and 37 deletions

View file

@ -1,6 +1,6 @@
= form_tag(search_path, method: :get)
= text_field_tag(:q, params[:q], placeholder: 'Suche…', autofocus: true)
- if @show_filters
- if false #@show_filters
fieldset
legend Ergebnisse filtern
.row

View file

@ -2,13 +2,13 @@ div
= render 'search/form'
.clearfix
- if @show_search_result
- if params[:q].present?
.left
| #{@papers_count} Treffer
| #{@papers.total} Treffer
.right
/ button.button. TODO: Suche Abbonieren
- else
| #{@papers_count} Dokumente in der Datenbank
| #{@papers.total} Dokumente in der Datenbank
div
ul.no-bullet
- @papers.each do |doc|