Note this rule does still allow us to add new lines after opening tags; it just makes sure that if we do, we also add it in closing tags. Likewise, if we don't add it in the opening tag, it forces us not to add it in the closing tag either. I don't have a strong preference about either style; in these cases I've chosen the latter because it seemed more common in our code.
28 lines
1016 B
Plaintext
28 lines
1016 B
Plaintext
<% # Params:
|
|
#
|
|
# i18n_namespace: for example "moderation.debates.index" %>
|
|
|
|
<% if @valid_orders.present? && @valid_orders.count > 1 %>
|
|
<div class="wide-order-selector small-12 medium-8">
|
|
<form>
|
|
<div class="small-12 medium-6 float-left">
|
|
<label for="order-selector-participation">
|
|
<%= t("#{i18n_namespace}.select_order") %>
|
|
</label>
|
|
</div>
|
|
<div class="small-12 medium-6 float-left">
|
|
<select class="js-location-changer js-order-selector select-order"
|
|
data-order="<%= @current_order %>" name="order-selector"
|
|
id="order-selector-participation">
|
|
<% @valid_orders.each do |order| %>
|
|
<% value = current_path_with_query_params(order: order, page: 1) %>
|
|
<option value="<%= value %>" <%= "selected" if order == @current_order %>>
|
|
<%= t("#{i18n_namespace}.orders.#{order}") %>
|
|
</option>
|
|
<% end %>
|
|
</select>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<% end %>
|