Moves banner to a partial and includes it on debates index
This commit is contained in:
@@ -22,6 +22,7 @@ class DebatesController < ApplicationController
|
|||||||
|
|
||||||
def index_customization
|
def index_customization
|
||||||
@featured_debates = @debates.featured
|
@featured_debates = @debates.featured
|
||||||
|
@proposal_ballots = Proposal.successfull.sort_by_confidence_score
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
@@ -29,7 +29,11 @@
|
|||||||
<%= render "shared/banner" %>
|
<%= render "shared/banner" %>
|
||||||
<% end %>
|
<% 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" %>
|
<%= render "featured_debates" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
9
app/views/proposals/_proposal_ballots_banner.html.erb
Normal file
9
app/views/proposals/_proposal_ballots_banner.html.erb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<div id="next-voting" class="row featured-proposals-ballot-banner">
|
||||||
|
<%= link_to proposal_ballots_path do %>
|
||||||
|
<div class="small-12 column padding">
|
||||||
|
<div class="icon-successfull"></div>
|
||||||
|
<h2><%= t("proposal_ballots.featured_title") %></h2>
|
||||||
|
<p><%= t("proposal_ballots.info") %></p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
@@ -32,15 +32,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @proposal_ballots.present? %>
|
<% if @proposal_ballots.present? %>
|
||||||
<div id="next-voting" class="row featured-proposals-ballot-banner">
|
<%= render "proposal_ballots_banner" %>
|
||||||
<%= link_to proposal_ballots_path do %>
|
|
||||||
<div class="small-12 column padding">
|
|
||||||
<div class="icon-successfull"></div>
|
|
||||||
<h2><%= t("proposal_ballots.featured_title") %></h2>
|
|
||||||
<p><%= t("proposal_ballots.info") %></p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% elsif @featured_proposals.present? %>
|
<% elsif @featured_proposals.present? %>
|
||||||
<div id="featured-proposals" class="row featured-proposals">
|
<div id="featured-proposals" class="row featured-proposals">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ en:
|
|||||||
title: "Votings"
|
title: "Votings"
|
||||||
description_html: "The proposals that have reached the <strong>required supports <em>(%{supports})</em></strong> will be voted."
|
description_html: "The proposals that have reached the <strong>required supports <em>(%{supports})</em></strong> will be voted."
|
||||||
date_title: "Dates of participation"
|
date_title: "Dates of participation"
|
||||||
date: "November 21 to November 27, 2016"
|
date: "Soon we'll announce the date of vote these proposals."
|
||||||
successfull: "This proposal has reached the required supports and will be voted in the %{voting}."
|
successfull: "This proposal has reached the required supports and will be voted in the %{voting}."
|
||||||
voting: "next voting"
|
voting: "next voting"
|
||||||
featured_title: "#VotingProposal"
|
featured_title: "#VotingProposal"
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ es:
|
|||||||
title: "Votaciones"
|
title: "Votaciones"
|
||||||
description_html: "Las propuestas que han alcanzado el <strong>número de apoyos necesarios <em>(%{supports})</em></strong> pasarán a votación."
|
description_html: "Las propuestas que han alcanzado el <strong>número de apoyos necesarios <em>(%{supports})</em></strong> pasarán a votación."
|
||||||
date_title: "Fechas de participación"
|
date_title: "Fechas de participación"
|
||||||
date: "Del 21 de noviembre al 27 de noviembre de 2016"
|
date: "En breve anunciaremos la fecha de votación de estas propuestas."
|
||||||
successfull: "Esta propuesta ha alcanzado los apoyos necesarios y pasará a la %{voting}."
|
successfull: "Esta propuesta ha alcanzado los apoyos necesarios y pasará a la %{voting}."
|
||||||
voting: "próxima votación"
|
voting: "próxima votación"
|
||||||
featured_title: "#VotaUnaPropuesta"
|
featured_title: "#VotaUnaPropuesta"
|
||||||
|
|||||||
Reference in New Issue
Block a user