Sha256: 7fde0b8b778318346144ff66efe5788a24cbeeeab5091142067c3ff8e6f58c87

Contents?: true

Size: 1.41 KB

Versions: 86

Compression:

Stored size: 1.41 KB

Contents

<div data-controller="toggle-panel">
  <div class="relative w-full flex justify-between">
    <%= 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-40 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 @applied_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

86 entries across 86 versions & 1 rubygems

Version Path
avo-2.53.0 app/components/avo/filters_component.html.erb
avo-2.52.0 app/components/avo/filters_component.html.erb
avo-2.49.0 app/components/avo/filters_component.html.erb
avo-2.48.0 app/components/avo/filters_component.html.erb
avo-2.47.0 app/components/avo/filters_component.html.erb
avo-2.46.0 app/components/avo/filters_component.html.erb
avo-2.45.0 app/components/avo/filters_component.html.erb
avo-2.44.0 app/components/avo/filters_component.html.erb
avo-2.43.0 app/components/avo/filters_component.html.erb
avo-2.42.2 app/components/avo/filters_component.html.erb
avo-2.42.1 app/components/avo/filters_component.html.erb
avo-2.42.0 app/components/avo/filters_component.html.erb
avo-2.41.0 app/components/avo/filters_component.html.erb
avo-2.40.0 app/components/avo/filters_component.html.erb
avo-2.39.0 app/components/avo/filters_component.html.erb
avo-2.38.0 app/components/avo/filters_component.html.erb
avo-2.37.2 app/components/avo/filters_component.html.erb
avo-2.37.1 app/components/avo/filters_component.html.erb
avo-2.37.0 app/components/avo/filters_component.html.erb
avo-2.36.3 app/components/avo/filters_component.html.erb