Refactors order_selector
Moves the information about the current order to the selector, not to the container
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<section role="main">
|
||||
|
||||
<div class="wrap row">
|
||||
<div id="debates" class="debates-list small-12 medium-9 column js-order-<%= @current_order.dasherize %>">
|
||||
<div id="debates" class="debates-list small-12 medium-9 column">
|
||||
<div class="filters">
|
||||
<div class="small-12 medium-7 column">
|
||||
<% if @search_terms %>
|
||||
@@ -27,7 +27,7 @@
|
||||
<%= t("debates.index.select_order_long") %>
|
||||
</h2>
|
||||
<% end %>
|
||||
<%= render 'shared/order_select', i18n_namespace: "debates.index" %>
|
||||
<%= render 'shared/order_selector', i18n_namespace: "debates.index" %>
|
||||
</div>
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<section role="main">
|
||||
|
||||
<div class="wrap row">
|
||||
<div id="proposals" class="Proposals-list small-12 medium-9 column js-order-<%= @current_order.dasherize %>">
|
||||
<div id="proposals" class="Proposals-list small-12 medium-9 column">
|
||||
<div class="filters">
|
||||
<div class="small-12 medium-7 column">
|
||||
<% if @search_terms %>
|
||||
@@ -27,7 +27,7 @@
|
||||
<%= t("proposals.index.select_order_long") %>
|
||||
</h2>
|
||||
<% end %>
|
||||
<%= render 'shared/order_select', i18n_namespace: "proposals.index" %>
|
||||
<%= render 'shared/order_selector', i18n_namespace: "proposals.index" %>
|
||||
</div>
|
||||
<div class="show-for-small-only">
|
||||
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
%>
|
||||
|
||||
<form class="inline-block">
|
||||
<select class="js-location-changer" name="order-selector">
|
||||
<select class="js-location-changer js-order-selector" data-order="<%= @current_order %>" name="order-selector">
|
||||
<% @valid_orders.each do |order| %>
|
||||
<option <%= 'selected' if order == @current_order %>
|
||||
value='<%= current_path_with_query_params(order: order, page: 1) %>'>
|
||||
Reference in New Issue
Block a user