Sha256: 34baa1e7fd40d03126c24c1f767df46fa8c022d2e1c81cd87d958f767fee9a92

Contents?: true

Size: 1.88 KB

Versions: 3

Compression:

Stored size: 1.88 KB

Contents

<% if params.dig("filter", "with_availability").present? && params["filter"]["with_availability"] == "withdrawn" %>
  <%= cell("decidim/announcement", t("decidim.proposals.proposals.index.text_banner",
                                     go_back_link: link_to(t("decidim.proposals.proposals.index.click_here"), proposals_path("filter[with_availability]" => nil))
  ).html_safe, callout_class: "warning [&>a]:text-secondary") %>
<% end %>

<% if @proposals.empty? %>
  <%= cell("decidim/announcement", params[:filter].present? ? t(".empty_filters") : t(".empty")) %>
<% else %>
  <div class="flex items-center justify-between">
    <h2 class="h5 md:h3 decorator"><%= t("count", scope: "decidim.proposals.proposals.index", count: @proposals.total_count) %></h2>
    <div class="view-layout__links flex view_mode__links">
      <%= toggle_view_mode_link(@view_mode, "list", t("list_mode", scope: "decidim.proposals.proposals.index")) %>
      <%= toggle_view_mode_link(@view_mode, "grid", t("grid_mode", scope: "decidim.proposals.proposals.index")) %>
    </div>
  </div>

  <%= order_selector available_orders, i18n_scope: "decidim.proposals.proposals.orders" %>

  <div class="<%= proposals_container_class(@view_mode) %>">
    <%= render partial: "proposal", collection: @proposals, as: :proposal, locals: { card_size: card_size_for_view_mode(@view_mode) } %>
  </div>

  <%= decidim_paginate @proposals %>
<% end %>

<% if params.dig("filter", "with_availability").present? && params["filter"]["with_availability"] == "withdrawn" %>
  <%= link_to t("decidim.proposals.proposals.index.see_all"), proposals_path("filter[with_availability]" => nil), class: "button button__sm button__text-secondary" %>
<% else %>
  <%= link_to t("decidim.proposals.proposals.index.see_all_withdrawn"), proposals_path(filter: { with_availability: "withdrawn", with_any_state: [] }), class: "button button__sm button__text-secondary" %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-proposals-0.29.0.rc3 app/views/decidim/proposals/proposals/_proposals.html.erb
decidim-proposals-0.29.0.rc2 app/views/decidim/proposals/proposals/_proposals.html.erb
decidim-proposals-0.29.0.rc1 app/views/decidim/proposals/proposals/_proposals.html.erb