stadtratmonitor/app/helpers/search_helper.rb

14 lines
332 B
Ruby
Raw Normal View History

2015-06-22 20:38:13 +02:00
module SearchHelper
def facet_list(facets)
return unless facets.present?
content_tag(:ul) do
2015-06-22 20:58:25 +02:00
facets.each do |facet|
2015-06-22 20:38:13 +02:00
concat content_tag(:li,
2015-06-22 20:58:25 +02:00
"#{facet['key']} (#{facet['doc_count']})",
2015-06-22 20:38:13 +02:00
class: "facet"
)
end
end
end
end