osunyorg/admin

View on GitHub
app/views/faceted_search/facets/taxonomy/_all.html.erb

Summary

Maintainability
Test Coverage
<% anchor ||= '' %>
<% if facet.values.any? %>
  <li>
    <% unless facet.title.blank? %><b><%= facet.title %></b><% end %>
    <ol class="faceted__facet__list list-unstyled">
      <% facet.values.each do |taxon| %>
        <%
        identifier = taxon.id
        display_value = taxon.to_s_in(current_language)
        %>
        <li class="faceted__facet__list__value <%= 'faceted__facet__list__value--selected' if facet.value_selected?(identifier) %>">
          <%= render 'faceted_search/link',
                     display_value: display_value,
                     path: facet.facets.path_for(facet, identifier) + anchor,
                     searchable: facet.searchable %>
        </li>
      <% end %>
    </ol>
  </li>
<% end %>