Commit 5ed7a39d authored by Robert Speicher's avatar Robert Speicher

Fix tooltips for event filter links

parent 5b3c823f
...@@ -25,12 +25,16 @@ module EventsHelper ...@@ -25,12 +25,16 @@ module EventsHelper
def event_filter_link(key, tooltip) def event_filter_link(key, tooltip)
key = key.to_s key = key.to_s
active = if @event_filter.active? key active = 'active' if @event_filter.active?(key)
'active' link_opts = {
end 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 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) icon(icon_for_event[key]) + content_tag(:span, ' ' + tooltip)
end end
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