diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index d516f4c44..800e38119 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -929,12 +929,13 @@ .debate-featured { background: $votes-bg; + margin: rem-calc(12) 0 !important; .panel h3 a { color: #0D3F54; } - .info { + .info, .info a { color: white !important; } @@ -960,7 +961,6 @@ } .debate-featured, .proposal-featured { - margin-bottom: 0; margin-top: 0; padding-left: 0; diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index b75274b7d..8a5def88b 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -12,24 +12,11 @@ class DebatesController < ApplicationController load_and_authorize_resource respond_to :html, :js - def index_customization - @featured_debates = Debate.all.sort_by_confidence_score.limit(3) if (@search_terms.blank? && @tag_filter.blank?) - if @featured_debates.present? - set_featured_debate_votes(@featured_debates) - @resources = @resources.where('debates.id NOT IN (?)', @featured_debates.map(&:id)) - end - end - def vote @debate.register_vote(current_user, params[:value]) set_debate_votes(@debate) end - def vote_featured - @debate.register_vote(current_user, 'yes') - set_featured_debate_votes(@debate) - end - private def debate_params @@ -40,7 +27,4 @@ class DebatesController < ApplicationController Debate end - def set_featured_debate_votes(debates) - @featured_debates_votes = current_user ? current_user.debate_votes(debates) : {} - end end diff --git a/app/views/debates/_featured_debate.html.erb b/app/views/debates/_featured_debate.html.erb deleted file mode 100644 index ddf8f4e40..000000000 --- a/app/views/debates/_featured_debate.html.erb +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/app/views/debates/_featured_debates_static.html.erb b/app/views/debates/_featured_debates_static.html.erb new file mode 100644 index 000000000..69fdecf91 --- /dev/null +++ b/app/views/debates/_featured_debates_static.html.erb @@ -0,0 +1,27 @@ + + + diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 17db79cc7..01d986af3 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -44,23 +44,19 @@ <%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button radius expand' %> - <% if @featured_debates.present? %> -