From d300bb6bcbdc005d27b6ea3fa5642473cd57c2cd Mon Sep 17 00:00:00 2001 From: kikito Date: Sat, 12 Sep 2015 16:48:31 +0200 Subject: [PATCH] Refactors order_selector Moves the information about the current order to the selector, not to the container --- app/views/debates/index.html.erb | 4 ++-- app/views/proposals/index.html.erb | 4 ++-- ...lect.html.erb => _order_selector.html.erb} | 2 +- spec/features/debates_spec.rb | 20 +++++++++++++------ spec/features/proposals_spec.rb | 20 +++++++++++++------ 5 files changed, 33 insertions(+), 17 deletions(-) rename app/views/shared/{_order_select.html.erb => _order_selector.html.erb} (78%) diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index d099f8fd0..12dd4e684 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -1,7 +1,7 @@
-
+
<% if @search_terms %> @@ -27,7 +27,7 @@ <%= t("debates.index.select_order_long") %> <% end %> - <%= render 'shared/order_select', i18n_namespace: "debates.index" %> + <%= render 'shared/order_selector', i18n_namespace: "debates.index" %>
<%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %> diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 963f41428..691b2ad58 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -1,7 +1,7 @@
-
+
<% if @search_terms %> @@ -27,7 +27,7 @@ <%= t("proposals.index.select_order_long") %> <% end %> - <%= render 'shared/order_select', i18n_namespace: "proposals.index" %> + <%= render 'shared/order_selector', i18n_namespace: "proposals.index" %>
<%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: 'button radius expand' %> diff --git a/app/views/shared/_order_select.html.erb b/app/views/shared/_order_selector.html.erb similarity index 78% rename from app/views/shared/_order_select.html.erb rename to app/views/shared/_order_selector.html.erb index de1576199..489977718 100644 --- a/app/views/shared/_order_select.html.erb +++ b/app/views/shared/_order_selector.html.erb @@ -4,7 +4,7 @@ %>
- <% @valid_orders.each do |order| %>