app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.20.1 vs app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.21.0

- old
+ new

@@ -1,61 +1,21 @@ -<div class="filters row"> - <div class="column medium-3"> - <span class="dropdown-menu-inverted_label"><%= t(".filter_by") %> :</span> - <ul class="dropdown menu dropdown-inverted" data-dropdown-menu data-close-on-click-inside="false"> - <li class="is-dropdown-submenu-parent"> - <a href="#"> - <% if @state.present? %> - <%= t(".filter.#{@state}") %> - <% else %> - <%= t(".filter.all") %> - <% end %> - </a> - <ul class="menu is-dropdown-submenu"> - <li><%= link_to t(".filter.created"), url_for(state: "created", q: @query) %></li> - <li><%= link_to t(".filter.validating"), url_for(state: "validating", q: @query) %></li> - <li><%= link_to t(".filter.discarded"), url_for(state: "discarded", q: @query) %></li> - <li><%= link_to t(".filter.published"), url_for(state: "published", q: @query) %></li> - <li><%= link_to t(".filter.rejected"), url_for(state: "rejected", q: @query) %></li> - <li><%= link_to t(".filter.accepted"), url_for(state: "accepted", q: @query) %></li> - <li><%= link_to t(".filter.all"), url_for(q: @query) %></li> - </ul> - </li> - </ul> - </div> - <div class="column medium-4"> - <%= form_tag "", method: :get do %> - <div class="filters__search"> - <div class="input-group"> - <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %> - <%= hidden_field_tag :state, @state %> - <div class="input-group-button"> - <button type="submit" class="button button--muted"> - <%= icon "magnifying-glass", aria_label: t(".search") %> - </button> - </div> - </div> - </div> - <% end %> - </div> -</div> - -<div class="card" id="initiatives"> +<div class="card with-overflow" id="initiatives"> <div class="card-divider"> <h2 class="card-title"> <%= t "decidim.admin.titles.initiatives" %> </h2> </div> + <%= admin_filter_selector %> <div class="card-section"> <div class="table-scroll"> <table class="table-list"> <thead> <tr> <th><%= t("models.initiatives.fields.id", scope: "decidim.admin") %></th> <th><%= t("models.initiatives.fields.title", scope: "decidim.admin") %></th> <th><%= t("models.initiatives.fields.state", scope: "decidim.admin") %></th> <th><%= t("models.initiatives.fields.supports_count", scope: "decidim.admin") %></th> - <th><%= t("models.initiatives.fields.created_at", scope: "decidim.admin") %></th> + <th><%= sort_link(query, :created_at, t("models.initiatives.fields.created_at", scope: "decidim.admin"), default_order: :desc) %></th> <th class="actions"><%= t ".actions_title" %></th> </tr> </thead> <tbody> <% @initiatives.each do |initiative| %>