Sha256: 2f126f5efe9f9c03db76245faab16556f7b206f3ad8db44363a43e49e1411944
Contents?: true
Size: 1.74 KB
Versions: 23
Compression:
Stored size: 1.74 KB
Contents
<% if @collection.facets: %> <% facets = _.pick(@collection.facets, @filterNames) %> <% end %> <% facets = [] unless facets %> <% printed = [] %> <% for facet in _.pairs(facets): %> <% if facet[1]._type == 'terms': %> <% for term in facet[1].terms: %> <% printed.push(term.term.toString()) %> <a href="#" data-filter=<%= term.term %> data-action="search-filter-button" class="button tal <%= "active" unless _.indexOf(@selected, term.term.toString()) == -1 %>"> <% if @translateTerms: %> <%= _t("#{@translationPrefix}.#{term.term.toString()}") %> <% else: %> <%= term.term.toString() %> <% end %> <div class="badge right"> <%= term.count %> </div> </a> <% end %> <% end %> <% if facet[1]._type == 'filter': %> <% printed.push(facet[0]) %> <a href="#" data-filter=<%= facet[0] %> data-action="search-filter-button" class="button tal <%= "active" unless _.indexOf(@selected, facet[0].toString()) == -1 %>"> <% if @translateTerms: %> <%= _t("#{@translationPrefix}.#{facet[0].toString()}") %> <% else: %> <%= facet[0].toString() %> <% end %> <div class="badge right"> <%= facet[1].count %> </div> </a> <% end %> <% end %> <% for term in @fixedFilters: %> <% if _.indexOf(printed, term) == -1: %> <a href="#" data-filter=<%= term %> data-action="search-filter-button" class="button tal <%= "active" unless _.indexOf(@selected, term) == -1 %>"> <% if @translateTerms: %> <%= _t("#{@translationPrefix}.#{term}") %> <% else: %> <%= term %> <% end %> <div class="badge right"> 0 </div> </a> <% end %> <% end %>
Version data entries
23 entries across 23 versions & 1 rubygems