Sha256: e6307a8a9db6f925106345fa9f5b032a93ebd4ccda1a63430abf2411be96175d

Contents?: true

Size: 1.57 KB

Versions: 20

Compression:

Stored size: 1.57 KB

Contents

<%= search_form_for @q do |f| %>
  <fieldset style="display:table;border-spacing:10px;">
    <% index_filter_attributes
            .reject { |filter_attribute| exclude_index_filter_attributes.find { |eifa| (filter_attribute.is_a?(Array) ? filter_attribute[0] : filter_attribute ) =~ /#{eifa}/ } }
            .in_groups_of(5, false).each do |filter_attributes| %>
      <div class="fields" style="display:table-row">

        <% filter_attributes.each do |filter_attribute| %>
          <div class="field" style="display:table-cell">
            <% attribute_name   = filter_attribute.is_a?(Array) ? filter_attribute[0] : filter_attribute %>
            <% attribute_values = filter_attribute.is_a?(Array) ? filter_attribute[1] : [] %>

            <label> <b><%= t(attribute_name) %>:</b></label><br />
            <% if !attribute_values.blank? %>
              <%= f.select attribute_name, attribute_values.map { |k,v| [v,k] }, { include_blank: t(:all_field), selected: params[:q] ? params[:q][attribute_name] : '' } %>
            <% elsif attribute_name =~ /true/ %>
              <%= f.select attribute_name, [[t(:true_field), 1], [t(:false_field), 0]], { include_blank: t(:all_field), selected: params[:q] ? params[:q][attribute_name] : '' } %>
            <% elsif attribute_name =~ /cont/ %>
              <%= f.search_field attribute_name %>
            <% else %>
              <%= render "#{attribute_name}_filter" %>
            <% end %>
            <br /><br />
          </div>
        <% end %>
        <br /><br />
      </div>
    <% end %>

    <%= f.submit %>
  </fieldset>
<% end %>

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
cruj_cruj_cruj_visagio-1.0.5 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj_visagio-1.0.3 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj_visagio-1.0.2 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj_visagio-1.0.1 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj_visagio-1.0.0 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.15 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.14 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.13 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.12 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.11 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.10 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.9 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.8 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.7 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.6 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.5 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.4 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.3 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.2 app/views/cruj_cruj_cruj/_filters.html.erb
cruj_cruj_cruj-0.0.1 app/views/cruj_cruj_cruj/_filters.html.erb