Files
grecia/app/views/debates/index.html.erb
kikito 55c48e3719 Fixes randomly-failing travis specs
The problem was that after changing page with the selects, capybara
needs to “find something which has changed on the page” in order to
“wait”. The “have_selects” did not wait because they did not change
(you change them, then the page changes, and they stay the same)
2015-09-04 17:44:32 +02:00

53 lines
1.7 KiB
Plaintext

<section role="main">
<div class="filters row">
<div class="small-12 medium-9 column">
<% if @tag_filter %>
<div class="inline-block small-12 medium-8" >
<h2>
<%= t("debates.index.filter_topic",
count: @debates.size,
topic: @tag_filter) %>
</h2>
</div>
<% end %>
<div class="inline-block <%= 'right' if @tag_filter %>">
<% if @tag_filter %>
<h6 class="inline-block">
<%= t("debates.index.select_order") %>
</h6>
<% else %>
<h2 class="inline-block">
<%= t("debates.index.select_order_long") %>
</h2>
<% end %>
<form class="inline-block">
<select class="js-location-changer" name="order-selector">
<% @valid_orders.each do |order| %>
<option <%= 'selected' if order == @order %>
value='<%= current_path_with_query_params(order: order) %>'>
<%= t("debates.index.orders.#{order}") %>
</option>
<% end %>
</select>
</form>
</div>
</div>
</div>
<div class="row">
<div id="debates" class="debates-list small-12 medium-9 column js-order-<%= @order.dasherize %>">
<%= render @debates %>
<%= paginate @debates %>
</div>
<div class="small-12 medium-3 column">
<aside class="sidebar" role="complementary">
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %>
<%= render "shared/tag_cloud" %>
</aside>
</div>
</div>
</section>