From 0f5237b52ff543495ea331f6db25449ddda68609 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 12 Jan 2016 18:38:31 +0100 Subject: [PATCH] Removes unused code for filters --- app/assets/stylesheets/admin.scss | 4 -- app/assets/stylesheets/layout.scss | 4 +- app/views/debates/index.html.erb | 50 ++++++++-------- .../proposals/_featured_proposal.html.erb | 2 +- app/views/proposals/index.html.erb | 60 +++++++++---------- app/views/welcome/highlights.html.erb | 21 +++---- 6 files changed, 65 insertions(+), 76 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 5d3418748..470885665 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -70,10 +70,6 @@ body.admin { .admin-content { margin-top: rem-calc(24); - .filters h2 { - margin-top: 0; - } - .proposal-new, .proposal-edit { padding-top: 0; } diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 6fa1b9695..7edd5e020 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -8,7 +8,7 @@ // 06. Forms // 07. Alerts // 08. User account -// 09. Filters & search +// 09. Search // 10. Official levels // 11. Pagination // 12. Tables @@ -1028,7 +1028,7 @@ img.avatar, img.admin-avatar, img.moderator-avatar, img.initialjs-avatar { } } -// 09. Filters & search +// 09. Search // - - - - - - - - - - - - - - - - - - - - - - - - - .search-form { diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 3312fa0e7..3d714828f 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -9,34 +9,32 @@
-
-
- <% if @search_terms %> -

- <%= page_entries_info @debates %> - <%= t("debates.index.search_results", count: @debates.size, search_term: @search_terms) %> -

- <% elsif @tag_filter %> -

- <%= page_entries_info @debates %> - <%= t("debates.index.filter_topic", count: @debates.size, topic: @tag_filter) %> -

- <% end %> -
- - <% unless @tag_filter || @search_terms %> - <%= render "featured_debates_static" %> +
+ <% if @search_terms %> +

+ <%= page_entries_info @debates %> + <%= t("debates.index.search_results", count: @debates.size, search_term: @search_terms) %> +

+ <% elsif @tag_filter %> +

+ <%= page_entries_info @debates %> + <%= t("debates.index.filter_topic", count: @debates.size, topic: @tag_filter) %> +

<% end %> - - <%= render 'shared/order_links', i18n_namespace: "debates.index" %> - -
- <%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %> -
- - <%= render @debates %> - <%= paginate @debates %>
+ + <% unless @tag_filter || @search_terms %> + <%= render "featured_debates_static" %> + <% end %> + + <%= render 'shared/order_links', i18n_namespace: "debates.index" %> + +
+ <%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %> +
+ + <%= render @debates %> + <%= paginate @debates %>
diff --git a/app/views/proposals/_featured_proposal.html.erb b/app/views/proposals/_featured_proposal.html.erb index 808ebf583..623932c38 100644 --- a/app/views/proposals/_featured_proposal.html.erb +++ b/app/views/proposals/_featured_proposal.html.erb @@ -1,4 +1,4 @@ -
+