|
|
|
@ -34,7 +34,9 @@ class Widget::Filters < Widget::Base |
|
|
|
|
def render_filters |
|
|
|
|
active_filters = @query.filters.select { |f| f.class.display? } |
|
|
|
|
engine::Filter.all.collect do |filter| |
|
|
|
|
opts = {:id => "tr_#{filter.underscore_name}", :class => "#{filter.underscore_name} filter"} |
|
|
|
|
opts = {:id => "tr_#{filter.underscore_name}", |
|
|
|
|
:class => "#{filter.underscore_name} filter", |
|
|
|
|
:"data-filter-name" => filter.underscore_name } |
|
|
|
|
active_instance = active_filters.detect { |f| f.class == filter } |
|
|
|
|
if active_instance |
|
|
|
|
opts[:"data-selected"] = true |
|
|
|
|