Sha256: de6d7d4c398547ef4e81ecd25f587e591e75cf5fde23f98f610f285fd9ca019d

Contents?: true

Size: 1007 Bytes

Versions: 7

Compression:

Stored size: 1007 Bytes

Contents

<%
  begin
    decoded_filters_param = JSON.parse(Base64.decode64(params[:filters]))
    set_value = decoded_filters_param[filter.class.to_s]
  rescue => exception
    set_value = filter.default
  end
%>
<div data-controller="text-filter">
  <%= filter_wrapper name: filter.name do %>
    <%= text_field_tag filter.id, set_value,
      class: input_classes('w-full mb-0'),
      id: "avo_filters_#{filter.id.parameterize.underscore}",
      'data-filter-class': filter.class.to_s,
      'data-text-filter-target': 'text',
      'data-action': 'keypress->text-filter#tryToSubmit'
    %>
    <div class="flex justify-end">
      <%= a_button class: 'mt-4', color: :blue, data: { action: "text-filter#changeFilter" }, size: :sm do %>
        <%= filter.button_label || "Filter by #{filter.name}" %>
      <% end %>
    </div>
    <%= link_to 'url_redirect', request.url, data: { 'text-filter-target': 'urlRedirect', 'turbo-frame': params[:turbo_frame] }, style: 'hidden', class: 'hidden' %>
  <% end %>
</div>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avo-2.2.1 app/views/avo/base/_text_filter.html.erb
avo-2.2.0 app/views/avo/base/_text_filter.html.erb
avo-2.1.2.pre2 app/views/avo/base/_text_filter.html.erb
avo-2.1.2.pre1 app/views/avo/base/_text_filter.html.erb
avo-2.1.1 app/views/avo/base/_text_filter.html.erb
avo-2.1.0 app/views/avo/base/_text_filter.html.erb
avo-2.0.0 app/views/avo/base/_text_filter.html.erb