Sha256: 213ed8423c0b08aed6785aa38a6fe703a2505877675c812af1c6f509f5709c68

Contents?: true

Size: 744 Bytes

Versions: 7

Compression:

Stored size: 744 Bytes

Contents

<% if list.filters.present? %>
  <div class="filters pull-left" style="margin-right:40px;">
    <span class="filter label">Filter by:</span>

    <%= form_tag model.admin_index_path, method: :get, class: "form-inline" do %>
      <% list.filters.each do |attribute, filter| %>
        <%= select_tag attribute,
          options_for_select(filter.collection.call, params[:filter].present? ? params[:filter][attribute] : nil), include_blank: true,
          data: { placeholder: filter.title }, name: "filter[#{attribute}]", class: "input-medium" %>
      <% end %>

      <%= submit_tag "Go", class: "btn" %>
      <%= render "/outpost/shared/cancel_link", href: url_for(request.parameters.except("filter")) %>
    <% end %>
  </div>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.1.3 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.1.2 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.1.1 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.1.0 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.0.5 app/views/outpost/shared/_filters.html.erb
outpost-cms-0.0.4 app/views/outpost/shared/_filters.html.erb