Hide order selectors when only one order available

This commit is contained in:
Bertocq
2018-01-29 20:51:21 +01:00
parent b5cb5e2563
commit e5ce55b1cd
2 changed files with 39 additions and 36 deletions

View File

@@ -1,4 +1,5 @@
<form class="inline-block"> <% if @valid_orders.present? && @valid_orders.count > 1 %>
<form class="inline-block">
<label for="order-selector-participation" class="show-for-sr"><%= t("#{i18n_namespace}.select_order") %></label> <label for="order-selector-participation" class="show-for-sr"><%= t("#{i18n_namespace}.select_order") %></label>
<select class="js-location-changer js-order-selector select-order" <select class="js-location-changer js-order-selector select-order"
data-order="<%= @current_order %>" data-order="<%= @current_order %>"
@@ -11,4 +12,5 @@
</option> </option>
<% end %> <% end %>
</select> </select>
</form> </form>
<% end %>

View File

@@ -2,8 +2,8 @@
# #
# i18n_namespace: for example "moderation.debates.index" # i18n_namespace: for example "moderation.debates.index"
%> %>
<% if @valid_orders.present? && @valid_orders.count > 1 %>
<div class="wide-order-selector small-12 medium-8"> <div class="wide-order-selector small-12 medium-8">
<form> <form>
<div class="small-12 medium-6 float-left"> <div class="small-12 medium-6 float-left">
<label for="order-selector-participation"> <label for="order-selector-participation">
@@ -23,4 +23,5 @@
</select> </select>
</div> </div>
</form> </form>
</div> </div>
<% end %>