diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index e077e5e8a..48aeb9167 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -22,6 +22,7 @@ class DebatesController < ApplicationController def index_customization @featured_debates = @debates.featured + @proposal_ballots = Proposal.successfull.sort_by_confidence_score end def show diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 6809782b1..ce9978172 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -29,7 +29,11 @@ <%= render "shared/banner" %> <% end %> - <% unless @tag_filter || @search_terms || !has_featured? %> + <% if @proposal_ballots.present? %> + <%= render "proposals/proposal_ballots_banner" %> + <% end %> + + <% unless @tag_filter || @search_terms || !has_featured? || @proposal_ballots.present? %> <%= render "featured_debates" %> <% end %> diff --git a/app/views/proposals/_proposal_ballots_banner.html.erb b/app/views/proposals/_proposal_ballots_banner.html.erb new file mode 100644 index 000000000..df210a535 --- /dev/null +++ b/app/views/proposals/_proposal_ballots_banner.html.erb @@ -0,0 +1,9 @@ + diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index e314b7ad4..d4756b87b 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -32,15 +32,7 @@ <% end %> <% if @proposal_ballots.present? %> - + <%= render "proposal_ballots_banner" %> <% elsif @featured_proposals.present? %>