Sha256: e1ea467aa8dcbf9e6ec5746632cda713284afcee2449a65bf08a500785d96da5

Contents?: true

Size: 1.19 KB

Versions: 14

Compression:

Stored size: 1.19 KB

Contents

<div class="active-filters">
  <h3 class="active-filters-title">
    <% if current_scope %>
      <%= I18n.t("active_admin.search_status.title_with_scope", name: scope_name(current_scope)) %>
    <% else %>
      <%= I18n.t("active_admin.search_status.title") %>
    <% end %>
  </h3>
  <ul class="active-filters-list">
    <% if active_filters.all_blank? %>
      <li><%= I18n.t("active_admin.search_status.no_current_filters") %></li>
    <% else %>
      <% active_filters.filters.each do |filter| %>
        <%= content_tag :li, filter.html_options do %>
          <span>
            <%= filter.label %>
            <strong><%= to_sentence(filter.values.map { |v| pretty_format(v) }) %></strong>
          </span>
        <% end %>
      <% end %>
      <% active_filters.scopes.each do |name, value| %>
        <% filter_name = name.gsub(/_eq$/, "") %>
        <% filter = active_admin_config.filters[filter_name.to_sym] %>
        <% label = filter.try(:[], :label) || filter_name.titleize %>
        <li data-filter="<%= name %>">
          <span><%= "#{label} #{Ransack::Translate.predicate('eq')}" %></span>
          <strong><%= value %></strong>
        </li>
      <% end %>
    <% end %>
  </ul>
</div>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activeadmin-4.0.0.beta14 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta13 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta12 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta11 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta10 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta9 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta8 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta7 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta6 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta5 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta4 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta3 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta2 app/views/active_admin/resource/_active_filters.html.erb
activeadmin-4.0.0.beta1 app/views/active_admin/resource/_active_filters.html.erb