Sha256: 8010480ba6618db91b464319e3af989d39bc9d262554b1efe781304a1a7d6b56

Contents?: true

Size: 1.88 KB

Versions: 3

Compression:

Stored size: 1.88 KB

Contents

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

  <% if component_settings.official_proposals_enabled %>
    <%= form.collection_radio_buttons :origin, [["all", t(".all")], ["official", t(".official")], ["citizens", t(".citizens")]], :first, :last, legend_title: t(".origin") %>
  <% end %>

  <% if component_settings.proposal_answering_enabled && current_settings.proposal_answering_enabled %>
    <%= form.collection_radio_buttons :state, [["all", t(".all")], ["accepted", t(".accepted")], ["rejected", t(".rejected")], ["evaluating", t(".evaluating")]], :first, :last, legend_title: t(".state") %>
  <% end %>

  <% if linked_classes_for(Decidim::Proposals::Proposal).any? %>
    <%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::Proposals::Proposal), :first, :last, legend_title: t(".related_to") %>
  <% end %>

  <% if current_user && current_settings.votes_enabled? %>
    <%= form.collection_check_boxes :activity, [["voted", t(".voted")]], :first, :last, legend_title: t(".activity") %>
  <% end %>

  <% if current_participatory_space.has_subscopes? %>
    <%= scopes_picker_filter form, :scope_id %>
  <% end %>

  <% if current_component.categories.any? %>
    <%= form.categories_select :category_id, current_component.categories, legend_title: t(".category"), disable_parents: false, label: false, prompt: t(".category_prompt") %>
  <% end %>

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-proposals-0.11.2 app/views/decidim/proposals/proposals/_filters.html.erb
decidim-proposals-0.11.1 app/views/decidim/proposals/proposals/_filters.html.erb
decidim-proposals-0.11.0.pre1 app/views/decidim/proposals/proposals/_filters.html.erb