Sha256: a641a788b23f1010182eab6bf9c9489837076504d25a590bdba94e781f38b656

Contents?: true

Size: 1.82 KB

Versions: 5

Compression:

Stored size: 1.82 KB

Contents

<%= initiatives_filter_form_for filter do |form| %>
  <div class="filters__section">
    <div class="filters__search">
      <div class="input-group">
        <%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search") %>
        <div class="input-group-button">
          <button type="submit" class="button button--muted">
            <%= icon "magnifying-glass", aria_label: t(".search") %>
          </button>
        </div>
      </div>
    </div>
  </div>

  <%= form.collection_radio_buttons :state,
                                    [["open", t(".open")], ["closed", t(".closed")]],
                                    :first,
                                    :last,
                                    legend_title: t(".state") %>

  <% if current_user %>
    <%= form.collection_radio_buttons :author,
                                    [["any", t(".any")], ["myself", t(".myself")]],
                                    :first,
                                    :last,
                                    legend_title: t(".author") %>
  <% end %>

  <div class="filters__section">
    <fieldset>
      <legend><h6 class="heading6"><%= t ".type" %></h6></legend>
      <%= form.initiative_types_select :type,
                                       Decidim::InitiativesType.where(organization: current_organization),
                                       legend_title: t(".type"),
                                       label: false,
                                       prompt: t(".type_prompt"),
                                       remote_path: initiative_types_search_path,
                                       multiple: true %>
    </fieldset>
  </div>

  <%= scopes_picker_field form, :scope_id, root: nil %>

  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-initiatives-0.21.0 app/views/decidim/initiatives/initiatives/_filters.html.erb
decidim-initiatives-0.20.1 app/views/decidim/initiatives/initiatives/_filters.html.erb
decidim-initiatives-0.20.0 app/views/decidim/initiatives/initiatives/_filters.html.erb
decidim-initiatives-0.19.1 app/views/decidim/initiatives/initiatives/_filters.html.erb
decidim-initiatives-0.19.0 app/views/decidim/initiatives/initiatives/_filters.html.erb