Uses order_links in proposals/index and debates/index

This commit is contained in:
kikito
2016-01-05 19:37:40 +01:00
parent 5e9240e25c
commit 7eda0b2889
3 changed files with 9 additions and 30 deletions

View File

@@ -24,21 +24,7 @@
<% end %>
</div>
<% if @tag_filter || @search_terms %>
<div class="small-12 medium-5 margin-top inline-block debates-order">
<h6 class="inline-block">
<%= t("debates.index.select_order") %>
</h6>
<%= render 'shared/order_selector', i18n_namespace: "debates.index" %>
</div>
<% else %>
<div class="small-12 inline-block">
<h2 class="inline-block">
<%= t("debates.index.select_order_long") %>
</h2>
<%= render 'shared/order_selector', i18n_namespace: "debates.index" %>
</div>
<% end %>
<%= render 'shared/order_links', i18n_namespace: "debates.index" %>
<div class="show-for-small-only">
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %>

View File

@@ -24,21 +24,7 @@
<% end %>
</div>
<% if @tag_filter || @search_terms %>
<div class="small-12 medium-5 margin-top margin-top inline-block proposals-order">
<h6 class="inline-block">
<%= t("proposals.index.select_order") %>
</h6>
<%= render 'shared/order_selector', i18n_namespace: "proposals.index" %>
</div>
<% else %>
<div class="small-12 inline-block">
<h2 class="inline-block">
<%= t("proposals.index.select_order_long") %>
</h2>
<%= render 'shared/order_selector', i18n_namespace: "proposals.index" %>
</div>
<% end %>
<%= render 'shared/order_links', i18n_namespace: "proposals.index" %>
<div class="show-for-small-only">
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %>

View File

@@ -0,0 +1,7 @@
<section class="subnavigation row">
<% valid_orders.each do |order| %>
<%= link_to t("#{i18n_namespace}.orders.#{order}"),
current_path_with_query_params(order: order, page: 1),
class: order == @current_order ? 'active' : '' %>
<% end %>
</section>