BigW Consortium Gitlab

Commit c4aa7003 by Robert Speicher

Merge branch 'rs-fix-filter-tooltips' into 'master'

Fix tooltips for event filter links See merge request !618
parents f5f097b7 5ed7a39d
......@@ -25,12 +25,16 @@ module EventsHelper
def event_filter_link(key, tooltip)
key = key.to_s
active = if @event_filter.active? key
'active'
end
active = 'active' if @event_filter.active?(key)
link_opts = {
class: 'event_filter_link',
id: "#{key}_event_filter",
title: "Filter by #{tooltip.downcase}",
data: { toggle: 'tooltip', placement: 'top' }
}
content_tag :li, class: "filter_icon #{active}" do
link_to request.path, class: 'has_tooltip event_filter_link', id: "#{key}_event_filter", 'data-original-title' => 'Filter by ' + tooltip.downcase do
link_to request.path, link_opts do
icon(icon_for_event[key]) + content_tag(:span, ' ' + tooltip)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment