Sha256: 2b4d6ba554593a8f510deea06453cb4c6810c72cade3422bec96d46da7d60735

Contents?: true

Size: 1.4 KB

Versions: 12

Compression:

Stored size: 1.4 KB

Contents

<%- url ||= resource_url_proxy.url_for({ action: 'index' }.merge(search_filter_params.except(:q, :page))) -%>

<%= search_form_for @query, url: url, class: 'search_form' do |f| %>
  <div class="search_field">
    <button type="submit">
      <%= render_icon('search') %>
    </button>
    <%= f.search_field resource_handler.search_field_name,
      class: 'search_input_field',
      placeholder: Alchemy.t(:search) %>
    <% local_assigns.fetch(:additional_query_fields, []).each do |field| %>
      <%= f.hidden_field field, id: nil %>
    <% end %>
    <%= link_to render_icon(:times, size: '1x'), url,
        class: 'search_field_clear',
        id: 'search_field_clear',
        title: Alchemy.t(:click_to_show_all),
        style: search_filter_params.fetch(:q, {}).fetch(resource_handler.search_field_name, '').present? ? 'visibility: visible' : 'visibility: hidden' %>

    <% search_filter_params.fetch(:filter, []).each do |filter_param| %>
      <%= hidden_field_tag "filter[#{filter_param[0]}]", filter_param[1], id: nil %>
    <% end %>

    <% if search_filter_params.fetch(:tagged_with, nil) %>
      <%= hidden_field_tag :tagged_with, search_filter_params.fetch(:tagged_with), id: nil %>
    <% end %>

    <% local_assigns.fetch(:additional_params, []).each do |additional_param| %>
      <%= hidden_field_tag additional_param, search_filter_params[additional_param], id: nil %>
    <% end %>
  </div>
<% end %>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.7 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.6 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.5 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.4 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.3 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.2 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.2.1 app/views/alchemy/admin/partials/_search_form.html.erb