Adds shared/filter_subnav partial to DRY filters

This commit is contained in:
kikito
2015-09-02 13:39:27 +02:00
parent ebacc8c9c7
commit 79febe7bb8
7 changed files with 23 additions and 72 deletions

View File

@@ -1,17 +1,6 @@
<h2><%= t("moderation.debates.index.title") %></h2>
<dl class="sub-nav">
<dt><%= t("moderation.debates.index.filter") %>:</dt>
<% @valid_filters.each do |filter| %>
<% if @current_filter == filter %>
<dd class="active"><%= t("moderation.debates.index.filters.#{filter}") %></dd>
<% else %>
<dd><%= link_to t("moderation.debates.index.filters.#{filter}"),
current_path_with_query_params(filter: filter) %></dd>
<% end %>
<% end %>
</dl>
<%= render 'shared/filter_subnav', i18n_namespace: "moderation.debates.index" %>
<h3><%= page_entries_info @debates %></h3>