Sha256: 22b53b5054174baa86258e0d260c53898923af069993b189e9ec07710785787b

Contents?: true

Size: 1.53 KB

Versions: 12

Compression:

Stored size: 1.53 KB

Contents

<%
  url_options ||= params_for(action: :index, id: nil, search: nil)
  submit_text ||= :search
  xhr ||= request.xhr?
  options = {
    id: element_form_id(action: 'search'),
    class: "as_form search",
    remote: xhr,
    data: {loading: true},
    method: :get
  }
-%>
<%= form_tag url_options, options %>
  <ol class="form">
    <% visibles, hiddens = visibles_and_hiddens(active_scaffold_config.field_search) %>
    <% visibles.each do |column| -%>
      <li class="form-element <%= column.css_class unless column.css_class.is_a?(Proc) %>"><%= search_attribute(column, @record) %></li>
    <% end -%>
    <% unless hiddens.empty?  -%>
      <li class="sub-section">
      <% further_options_id = sub_section_id(:sub_section => 'further_options') %>
      <h5>
        <%= as_(:optional_attributes) %>
        <%= link_to_visibility_toggle(further_options_id, {:default_visible => false}) %>
      </h5>
      <ol id ="<%= further_options_id %>" class="form" style="display:none;">
      <% hiddens.each do |column| -%>
        <li class="form-element <%= column.css_class unless column.css_class.is_a?(Proc) %>"><%= search_attribute(column, @record) %></li>
      <% end -%>
      </ol>
      </li>
  <% end -%>
  </ol>
  <p class="form-footer">
    <%= submit_tag as_(submit_text), :class => "submit" %>
    <%= link_to as_(:reset), url_for(url_options.merge(:search => '')), :class => 'as_cancel reset', :remote => true, :data => {:refresh => true} unless local_assigns[:skip_reset] %>
    <%= loading_indicator_tag(:action => :search) %>
  </p>
</form>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
active_scaffold-3.6.2 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.6.1 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.6.0 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.6.0.rc2 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.6.0.rc1 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.5 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.6.0.pre app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.4 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.3 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.2 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.1 app/views/active_scaffold_overrides/_field_search.html.erb
active_scaffold-3.5.0 app/views/active_scaffold_overrides/_field_search.html.erb