Files
grecia/app/views/shared/_order_selector.html.erb
kikito d300bb6bcb Refactors order_selector
Moves the information about the current order to the selector, not to
the container
2015-09-12 16:48:41 +02:00

16 lines
520 B
Plaintext

<% # Params:
#
# i18n_namespace: for example "moderation.debates.index"
%>
<form class="inline-block">
<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) %>'>
<%= t("#{i18n_namespace}.orders.#{order}") %>
</option>
<% end %>
</select>
</form>