removes old proposals successful banner

This commit is contained in:
decabeza
2017-06-05 16:29:48 +02:00
parent f374478ddf
commit c76bd65b40
7 changed files with 2 additions and 31 deletions

View File

@@ -19,7 +19,6 @@ class DebatesController < ApplicationController
def index_customization
@featured_debates = @debates.featured
@proposal_successfull_exists = Proposal.successful.exists?
end
def show

View File

@@ -35,8 +35,6 @@ class ProposalsController < ApplicationController
def index_customization
discard_archived
load_retired
load_successful_proposals
load_featured unless @proposal_successful_exists
end
def vote
@@ -115,9 +113,4 @@ class ProposalsController < ApplicationController
@resources = @resources.where('proposals.id NOT IN (?)', @featured_proposals.map(&:id))
end
end
def load_successful_proposals
@proposal_successful_exists = Proposal.successful.exists?
end
end

View File

@@ -42,11 +42,7 @@
<%= render "shared/banner" %>
<% end %>
<% if @proposal_successful_exists %>
<%= render "proposals/successful_banner" %>
<% end %>
<% unless @tag_filter || @search_terms || !has_featured? || @proposal_successful_exists %>
<% unless @tag_filter || @search_terms || !has_featured? %>
<%= render "featured_debates" %>
<% end %>

View File

@@ -1,9 +0,0 @@
<div id="next-voting" class="row sucessfull-proposals-banner">
<%= link_to polls_path do %>
<div class="small-12 column padding">
<div class="icon-successful"></div>
<h2><%= t("poll_questions.banner.featured_title") %></h2>
<p><%= t("poll_questions.banner.info") %></p>
</div>
<% end %>
</div>

View File

@@ -44,9 +44,7 @@
<%= render "shared/banner" %>
<% end %>
<% if @proposal_successful_exists %>
<%= render "successful_banner" %>
<% elsif @featured_proposals.present? %>
<% if @featured_proposals.present? %>
<div id="featured-proposals" class="row featured-proposals">
<div class="small-12 column">
<h2>

View File

@@ -448,9 +448,6 @@ en:
vote_answer: "Vote %{answer}"
voted: "You have voted %{answer}"
poll: "Poll"
banner:
featured_title: "#NextVoting"
info: "New proposals that have reached the voting phase."
proposal_notifications:
new:
title: "Send message"

View File

@@ -448,9 +448,6 @@ es:
vote_answer: "Votar %{answer}"
voted: "Has votado %{answer}"
poll: "Votación"
banner:
featured_title: "#PróximaVotación"
info: "Nuevas propuestas ciudadanas han llegado a la fase de votación."
proposal_notifications:
new:
title: "Enviar mensaje"