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

Version Path
iugu-ux-1.0.25 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.24 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.23 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.22 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.21 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.20 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.19 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.18 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.17 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.16 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.15 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.14 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.13 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.12 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.11 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.10 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.9 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.8 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.7 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco
iugu-ux-1.0.6 vendor/assets/javascripts/iugu-ux/components/presenters/iugu-ui-search-filter.jst.eco