Sha256: 3472b624fee08fe95aeb86b278263e5f50fb83ac5155b9d48b1117ed1797ad6a

Contents?: true

Size: 1.39 KB

Versions: 74

Compression:

Stored size: 1.39 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: 'xs'), 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? ? 'display: block' : 'display: none' %>

    <% 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

74 entries across 74 versions & 1 rubygems

Version Path
alchemy_cms-7.1.12 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.15 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-6.1.10 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.11 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.10 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.9 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.14 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.13 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.8 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.7 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.12 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.11 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.6 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.5 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.10 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.4 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.0.9 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.3 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.2 app/views/alchemy/admin/partials/_search_form.html.erb
alchemy_cms-7.1.1 app/views/alchemy/admin/partials/_search_form.html.erb