Sha256: 946d1df966d5bcb1d1f0aa01e6586bc29c5c24276afe5778b49058f4239364cc

Contents?: true

Size: 1.42 KB

Versions: 20

Compression:

Stored size: 1.42 KB

Contents

<div data-controller="toggle-panel">
  <div class="relative w-full flex justify-between z-30">
    <%= a_button class: 'focus:outline-none',
      color: :primary,
      size: :sm,
      icon: 'filter',
      title: t('avo.click_to_reveal_filters'),
      'data-button': 'resource-filters',
      'data-action': 'click->toggle-panel#togglePanel',
      'data-tippy': 'tooltip' do %>
      <%= t 'avo.filters' %>
      <% if @applied_filters.present? %>
        <span class="ml-1">(<%= @applied_filters.count %> applied)</span>
      <% end %>
    <% end %>
    <div
      class="absolute block inset-auto sm:right-0 top-full bg-white min-w-[300px] mt-2 z-20 shadow-modal rounded divide-y divide-gray-300 <%= 'hidden' unless params[:keep_filters_panel_open] == '1' %>"
      data-toggle-panel-target="panel"
    >
      <% @filters.each do |filter| %>
        <%= render partial: filter.class.template, locals: {filter: filter} %>
      <% end %>
      <div class="p-4 border-gray-300 border-t">
        <% if params[:filters].present? %>
          <%= a_link reset_path, data: {turbo_frame: params[:turbo_frame]}, color: :gray, size: :sm, class: 'w-full justify-center' do %>
            <%= t('avo.reset_filters') %>
          <% end %>
        <% else %>
          <%= a_button class: 'w-full justify-center', disabled: true do %>
            <%= t('avo.reset_filters') %>
          <% end %>
        <% end %>
      </div>
    </div>
  </div>
</div>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
avo-2.16.1.pre.1.nativefields app/components/avo/filters_component.html.erb
avo-2.16.0 app/components/avo/filters_component.html.erb
avo-2.15.3 app/components/avo/filters_component.html.erb
avo-2.15.3.pre.1.data.attrs.to.sidebar.items app/components/avo/filters_component.html.erb
avo-2.15.2 app/components/avo/filters_component.html.erb
avo-2.15.2.pre.1 app/components/avo/filters_component.html.erb
avo-2.15.1 app/components/avo/filters_component.html.erb
avo-2.15.0 app/components/avo/filters_component.html.erb
avo-2.14.3.pre.7.polytranslations1 app/components/avo/filters_component.html.erb
avo-2.14.3.pre.6.nosprockets app/components/avo/filters_component.html.erb
avo-2.14.3.pre.5.nosprockets app/components/avo/filters_component.html.erb
avo-2.14.3.pre.4.tosqlfix app/components/avo/filters_component.html.erb
avo-2.14.3.pre.3.jsbundling app/components/avo/filters_component.html.erb
avo-2.14.3.pre.2.tailwindcss app/components/avo/filters_component.html.erb
avo-2.14.3.pre.1.branding app/components/avo/filters_component.html.erb
avo-2.14.2 app/components/avo/filters_component.html.erb
avo-2.14.2.pre.1 app/components/avo/filters_component.html.erb
avo-2.14.1 app/components/avo/filters_component.html.erb
avo-2.14.1.pre.1 app/components/avo/filters_component.html.erb
avo-2.14.0 app/components/avo/filters_component.html.erb