diff --git a/app/controllers/concerns/commentable_actions.rb b/app/controllers/concerns/commentable_actions.rb index 12283d781..86f47b4d6 100644 --- a/app/controllers/concerns/commentable_actions.rb +++ b/app/controllers/concerns/commentable_actions.rb @@ -10,7 +10,6 @@ module CommentableActions @resources = @current_order == "recommendations" && current_user.present? ? @resources.recommendations(current_user) : @resources.for_render @resources = @resources.search(@search_terms) if @search_terms.present? @resources = @advanced_search_terms.present? ? @resources.filter(@advanced_search_terms) : @resources - @resources = @resources.tagged_with(@tag_filter) if @tag_filter @resources = @resources.page(params[:page]).send("sort_by_#{@current_order}") @@ -103,12 +102,6 @@ module CommentableActions @categories = Tag.category.order(:name) end - def parse_tag_filter - if params[:tag].present? - @tag_filter = params[:tag] if Tag.named(params[:tag]).exists? - end - end - def set_resource_votes(instance) send("set_#{resource_name}_votes", instance) end diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index 4d4eb0e1d..a4898e5c4 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -4,7 +4,6 @@ class DebatesController < ApplicationController include FlagActions include Translatable - before_action :parse_tag_filter, only: :index before_action :authenticate_user!, except: [:index, :show, :map] before_action :set_view, only: :index before_action :debates_recommendations, only: :index, if: :current_user diff --git a/app/controllers/legislation/proposals_controller.rb b/app/controllers/legislation/proposals_controller.rb index 74b9799da..10ffdf44a 100644 --- a/app/controllers/legislation/proposals_controller.rb +++ b/app/controllers/legislation/proposals_controller.rb @@ -3,7 +3,6 @@ class Legislation::ProposalsController < Legislation::BaseController include FlagActions include ImageAttributes - before_action :parse_tag_filter, only: :index before_action :load_categories, only: [:index, :new, :create, :edit, :map, :summary] before_action :load_geozones, only: [:edit, :map, :summary] diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index 65ba3b145..b09ce01a2 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -5,7 +5,6 @@ class ProposalsController < ApplicationController include ImageAttributes include Translatable - before_action :parse_tag_filter, only: :index before_action :load_categories, only: [:index, :new, :create, :edit, :map, :summary] before_action :load_geozones, only: [:edit, :map, :summary] before_action :authenticate_user!, except: [:index, :show, :map, :summary] @@ -152,7 +151,7 @@ class ProposalsController < ApplicationController end def load_featured - return unless !@advanced_search_terms && @search_terms.blank? && @tag_filter.blank? && params[:retired].blank? && @current_order != "recommendations" + return unless !@advanced_search_terms && @search_terms.blank? && params[:retired].blank? && @current_order != "recommendations" if Setting["feature.featured_proposals"] @featured_proposals = Proposal.not_archived.unsuccessful diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 7da27cfcd..31f08a8a0 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -9,7 +9,7 @@ <% end %>
- <% if @search_terms || @advanced_search_terms || @tag_filter %> + <% if @search_terms || @advanced_search_terms %>
@@ -23,12 +23,6 @@ ) %> <% end %>

- <% elsif @tag_filter %> -

<%= t("shared.search_results") %>

-

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

<% end %>
@@ -50,7 +44,7 @@ <%= render "shared/banner" %> <% end %> - <% unless @tag_filter || @search_terms || !has_featured? %> + <% unless @search_terms || !has_featured? %> <%= render "featured_debates" %> <% end %> @@ -81,7 +75,7 @@ <% end %> <%= paginate @debates %> - <% unless @search_terms || @advanced_search_terms || @tag_filter %> + <% unless @search_terms || @advanced_search_terms %>

<%= t("debates.index.section_footer.title") %> diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index d1098672a..ddfb6ff08 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -12,7 +12,6 @@ <% if [ @search_terms, @advanced_search_terms, - @tag_filter, params[:retired].present?, params[:selected].present? ].any? %> @@ -29,12 +28,6 @@ ) %> <% end %>

- <% elsif @tag_filter %> -

<%= t("shared.search_results") %>

-

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

<% elsif params[:retired].present? %>

<%= t("proposals.index.retired_proposals") %>

<% elsif params[:selected].present? %> @@ -112,7 +105,7 @@ <% end %> <%= paginate @proposals %> - <% unless @search_terms || @advanced_search_terms || @tag_filter %> + <% unless @search_terms || @advanced_search_terms %>

<%= t("proposals.index.section_footer.title") %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 6bce96762..4f92799e8 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -95,9 +95,6 @@ en: tags_placeholder: "Enter the tags you would like to use, separated by commas (',')" index: featured_debates: Featured - filter_topic: - one: " with topic '%{topic}'" - other: " with topic '%{topic}'" orders: confidence_score: highest rated created_at: newest @@ -351,9 +348,6 @@ en: map_skip_checkbox: "This proposal doesn't have a concrete location or I'm not aware of it." index: featured_proposals: Featured - filter_topic: - one: " with topic '%{topic}'" - other: " with topic '%{topic}'" orders: confidence_score: highest rated created_at: newest diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 3dc27bd72..fb88107af 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -95,9 +95,6 @@ es: tags_placeholder: "Escribe las etiquetas que desees separadas por coma (',')" index: featured_debates: Destacar - filter_topic: - one: " con el tema '%{topic}'" - other: " con el tema '%{topic}'" orders: confidence_score: Mejor valorados created_at: Nuevos @@ -351,9 +348,6 @@ es: map_skip_checkbox: "Esta propuesta no tiene una ubicación concreta o no la conozco." index: featured_proposals: Destacadas - filter_topic: - one: " con el tema '%{topic}'" - other: " con el tema '%{topic}'" orders: confidence_score: Más apoyadas created_at: Nuevas