diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index 48aeb9167..7d2149cad 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -22,7 +22,7 @@ class DebatesController < ApplicationController def index_customization @featured_debates = @debates.featured - @proposal_ballots = Proposal.successfull.sort_by_confidence_score + @proposal_successfull_exists = Proposal.successfull.exists? end def show diff --git a/app/controllers/proposals_controller.rb b/app/controllers/proposals_controller.rb index ee241c49b..f49666507 100644 --- a/app/controllers/proposals_controller.rb +++ b/app/controllers/proposals_controller.rb @@ -28,7 +28,7 @@ class ProposalsController < ApplicationController def index_customization load_retired load_proposal_ballots - load_featured if @proposal_ballots.blank? + load_featured unless @proposal_successfull_exists end def vote @@ -99,7 +99,7 @@ class ProposalsController < ApplicationController end def load_proposal_ballots - @proposal_ballots = Proposal.successfull.sort_by_confidence_score + @proposal_successfull_exists = Proposal.successfull.exists? end end diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index ce9978172..22d628c65 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -29,11 +29,11 @@ <%= render "shared/banner" %> <% end %> - <% if @proposal_ballots.present? %> + <% if @proposal_successfull_exists %> <%= render "proposals/proposal_ballots_banner" %> <% end %> - <% unless @tag_filter || @search_terms || !has_featured? || @proposal_ballots.present? %> + <% unless @tag_filter || @search_terms || !has_featured? || @proposal_ballots.present? || @proposal_successfull_exists %> <%= render "featured_debates" %> <% end %> diff --git a/app/views/proposal_ballots/index.html.erb b/app/views/proposal_ballots/index.html.erb index 76155d181..00a07fb9e 100644 --- a/app/views/proposal_ballots/index.html.erb +++ b/app/views/proposal_ballots/index.html.erb @@ -5,8 +5,7 @@ <%= t("proposal_ballots.title") %>
- <%= t("proposal_ballots.description_html", - supports: Setting['votes_for_proposal_success'].to_i).html_safe %> + <%= t("proposal_ballots.description_html").html_safe %>
diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index d4756b87b..da429b578 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -31,7 +31,7 @@ <%= render "shared/banner" %> <% end %> - <% if @proposal_ballots.present? %> + <% if @proposal_successfull_exists %> <%= render "proposal_ballots_banner" %> <% elsif @featured_proposals.present? %>