mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
helper for facet lists
This commit is contained in:
parent
cb877d510e
commit
7a7083c2ad
2 changed files with 20 additions and 11 deletions
13
app/helpers/search_helper.rb
Normal file
13
app/helpers/search_helper.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module SearchHelper
|
||||
def facet_list(facets)
|
||||
return unless facets.present?
|
||||
content_tag(:ul) do
|
||||
facets.each do |term, count|
|
||||
concat content_tag(:li,
|
||||
"#{term} (#{count})",
|
||||
class: "facet"
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue