mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
Query ES, show results
This commit is contained in:
parent
7cd9f207f5
commit
2abba45f4c
8 changed files with 44 additions and 12 deletions
|
@ -12,8 +12,8 @@ body
|
|||
= content_tag :div, msg, class: name
|
||||
.row
|
||||
.large-8.columns
|
||||
h2#title
|
||||
= link_to 'Willkommen in Leipzig', root_path
|
||||
h1#title
|
||||
= link_to 'Stadtratmonitor Leipzig', root_path
|
||||
.large-4.columns
|
||||
ul.inline-list.right
|
||||
li = render 'login_button'
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
= form_tag(search_path, method: :get)
|
||||
= label_tag(:q, 'Suche:')
|
||||
= text_field_tag(:q)
|
||||
= submit_tag 'Suchen', class: 'button'
|
||||
= text_field_tag(:q, params[:q], placeholder: 'Suche…')
|
||||
|
||||
.row
|
||||
- if @result
|
||||
.small-9.columns
|
||||
| #{@result['hits']['total']} Treffer
|
||||
.small-3.columns
|
||||
button.button.right TODO: Suche Abbonieren
|
||||
|
||||
- if @result
|
||||
ul.no-bullet
|
||||
- @result['hits']['hits'].each do |doc|
|
||||
li.search-result
|
||||
small = doc['_source']['paperType']
|
||||
'
|
||||
small = doc['_source']['originator'].join(', ')
|
||||
'
|
||||
small = doc['_source']['publishedDate']
|
||||
= link_to "https://ratsinfo.leipzig.de/bi/#{doc['_source']['mainFile']}", target: '_blank' do
|
||||
div = doc['_source']['name']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue