diff --git a/app/controllers/legislation/proposals_controller.rb b/app/controllers/legislation/proposals_controller.rb
index 10ffdf44a..d924f43ec 100644
--- a/app/controllers/legislation/proposals_controller.rb
+++ b/app/controllers/legislation/proposals_controller.rb
@@ -3,16 +3,15 @@ class Legislation::ProposalsController < Legislation::BaseController
include FlagActions
include ImageAttributes
- before_action :load_categories, only: [:index, :new, :create, :edit, :map, :summary]
+ before_action :load_categories, only: [:new, :create, :edit, :map, :summary]
before_action :load_geozones, only: [:edit, :map, :summary]
- before_action :authenticate_user!, except: [:index, :show, :map, :summary]
+ before_action :authenticate_user!, except: [:show, :map, :summary]
load_and_authorize_resource :process, class: "Legislation::Process"
load_and_authorize_resource :proposal, class: "Legislation::Proposal", through: :process
invisible_captcha only: [:create, :update], honeypot: :subtitle
- has_orders %w[confidence_score created_at], only: :index
has_orders %w[most_voted newest oldest], only: :show
helper_method :resource_model, :resource_name
@@ -38,11 +37,6 @@ class Legislation::ProposalsController < Legislation::BaseController
end
end
- def index_customization
- load_successful_proposals
- load_featured unless @proposal_successful_exists
- end
-
def vote
@proposal.register_vote(current_user, params[:value])
legislation_proposal_votes(@proposal)
@@ -65,8 +59,4 @@ class Legislation::ProposalsController < Legislation::BaseController
def resource_name
"proposal"
end
-
- def load_successful_proposals
- @proposal_successful_exists = Legislation::Proposal.successful.exists?
- end
end
diff --git a/app/models/abilities/common.rb b/app/models/abilities/common.rb
index ce55d8734..da8fa7197 100644
--- a/app/models/abilities/common.rb
+++ b/app/models/abilities/common.rb
@@ -88,7 +88,6 @@ module Abilities
can :vote_featured, Proposal
can :vote, Legislation::Proposal
- can :vote_featured, Legislation::Proposal
can :create, Legislation::Answer
can :create, Budget::Investment, budget: { phase: "accepting" }
diff --git a/app/views/legislation/proposals/_featured_proposal.html.erb b/app/views/legislation/proposals/_featured_proposal.html.erb
deleted file mode 100644
index 4733f3488..000000000
--- a/app/views/legislation/proposals/_featured_proposal.html.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
<%= link_to proposal.title, proposal %>
-
- <% if proposal.author.hidden? || proposal.author.erased? %>
- <%= t("proposals.show.author_deleted") %>
- <% else %>
- <%= proposal.author.name %>
- <% end %>
-
- •
-
- <% if proposal.author.display_official_position_badge? %>
-
- <%= proposal.author.official_position %>
-
- •
- <% end %>
-
- <%= t("proposals.proposal.votes", count: proposal.total_votes) %>
-
-
-
-
- <%= render "featured_votes", proposal: proposal %>
-
-
diff --git a/app/views/legislation/proposals/_featured_votes.html.erb b/app/views/legislation/proposals/_featured_votes.html.erb
deleted file mode 100644
index 4c42406b0..000000000
--- a/app/views/legislation/proposals/_featured_votes.html.erb
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- <% if voted_for?(@featured_proposals_votes, proposal) %>
-
- <%= t("proposals.proposal.already_supported") %>
-
- <% else %>
- <%= link_to vote_featured_proposal_path(proposal, value: "yes"),
- class: "button button-support small expanded",
- title: t("proposals.proposal.support_title"), method: "post", remote: true do %>
- <%= t("proposals.proposal.support") %>
- <% end %>
- <% end %>
-
-
- <% if user_signed_in? && current_user.organization? %>
-
-
- <%= t("votes.organizations") %>
-
-
- <% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
-
-
- <%= sanitize(t("votes.verified_only", verify_account: link_to_verify_account)) %>
-
-
- <% elsif !user_signed_in? %>
- <%= render "shared/login_to_vote" %>
- <% end %>
-
- <% if voted_for?(@featured_proposals_votes, proposal) %>
- <% if setting["twitter_handle"] %>
-
- <%= render "shared/social_share",
- title: proposal.title,
- url: proposal_url(proposal),
- description: proposal.summary,
- mobile: proposal.title %>
-
- <% end %>
- <% end %>
-
diff --git a/app/views/legislation/proposals/_geozones.html.erb b/app/views/legislation/proposals/_geozones.html.erb
deleted file mode 100644
index 4a8d8ee95..000000000
--- a/app/views/legislation/proposals/_geozones.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-<%= link_to map_proposals_path, id: "map", title: t("shared.tags_cloud.districts_list") do %>
- <%= image_tag(image_path_for("map.jpg", alt: t("shared.tags_cloud.districts_list"))) %>
-<% end %>
diff --git a/app/views/legislation/proposals/_popular.html.erb b/app/views/legislation/proposals/_popular.html.erb
deleted file mode 100644
index 7f46ea802..000000000
--- a/app/views/legislation/proposals/_popular.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
- <%= link_to t("proposals.index.top_link_proposals"), summary_proposals_path, class: "small" %>
-
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml
index 6758c457c..c6f99722b 100644
--- a/config/locales/en/general.yml
+++ b/config/locales/en/general.yml
@@ -376,7 +376,6 @@ en:
select_order_long: "You are viewing proposals according to:"
start_proposal: Create a proposal
title: Proposals
- top: Top weekly
top_link_proposals: The most supported proposals by category
section_header:
icon_alt: Proposals icon
diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml
index e802f7178..aaae524ca 100644
--- a/config/locales/es/general.yml
+++ b/config/locales/es/general.yml
@@ -376,7 +376,6 @@ es:
select_order_long: "Estas viendo las propuestas"
start_proposal: Crea una propuesta
title: Propuestas ciudadanas
- top: Top semanal
top_link_proposals: Propuestas más apoyadas por categoría
section_header:
icon_alt: Icono de Propuestas
diff --git a/config/routes/legislation.rb b/config/routes/legislation.rb
index ee92ce26c..0a06ad511 100644
--- a/config/routes/legislation.rb
+++ b/config/routes/legislation.rb
@@ -14,7 +14,7 @@ namespace :legislation do
resources :answers, only: [:create]
end
- resources :proposals do
+ resources :proposals, except: [:index] do
member do
post :vote
put :flag