From 7eda0b2889c160ba587cf0bbf87f40b3fb5bced4 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 5 Jan 2016 19:37:40 +0100 Subject: [PATCH] Uses order_links in proposals/index and debates/index --- app/views/debates/index.html.erb | 16 +--------------- app/views/proposals/index.html.erb | 16 +--------------- app/views/shared/_order_links.html.erb | 7 +++++++ 3 files changed, 9 insertions(+), 30 deletions(-) create mode 100644 app/views/shared/_order_links.html.erb diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index b1a4b8007..16197f221 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -24,21 +24,7 @@ <% end %> - <% if @tag_filter || @search_terms %> -
-
- <%= t("debates.index.select_order") %> -
- <%= render 'shared/order_selector', i18n_namespace: "debates.index" %> -
- <% else %> -
-

- <%= t("debates.index.select_order_long") %> -

- <%= render 'shared/order_selector', i18n_namespace: "debates.index" %> -
- <% end %> + <%= render 'shared/order_links', 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 77a0a79a0..6db5e3fc1 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -24,21 +24,7 @@ <% end %>
- <% if @tag_filter || @search_terms %> -
-
- <%= t("proposals.index.select_order") %> -
- <%= render 'shared/order_selector', i18n_namespace: "proposals.index" %> -
- <% else %> -
-

- <%= t("proposals.index.select_order_long") %> -

- <%= render 'shared/order_selector', i18n_namespace: "proposals.index" %> -
- <% end %> + <%= render 'shared/order_links', 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_links.html.erb b/app/views/shared/_order_links.html.erb new file mode 100644 index 000000000..bea821859 --- /dev/null +++ b/app/views/shared/_order_links.html.erb @@ -0,0 +1,7 @@ +