adds featured proposals to public home
This commit is contained in:
30
app/views/welcome/_featured_proposal.html.erb
Normal file
30
app/views/welcome/_featured_proposal.html.erb
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<% cache [locale_and_user_status, featured_proposal, @proposal_votes[featured_proposal.id],'featured'] do %>
|
||||||
|
<div class="small-12 medium-4 column end">
|
||||||
|
<div id="<%= dom_id featured_proposal %>" class="proposal-featured">
|
||||||
|
<div class="panel">
|
||||||
|
|
||||||
|
<div class="proposal-content">
|
||||||
|
<span class="label left"><%= t("proposals.proposal.proposal") %></span>
|
||||||
|
<i class="icon-proposals right"></i>
|
||||||
|
<h3><%= link_to featured_proposal.title, featured_proposal %></h3>
|
||||||
|
<p class="proposal-info">
|
||||||
|
<i class="icon-comments"></i>
|
||||||
|
<%= link_to t("proposals.show.comments", count: featured_proposal.comments_count), proposal_path(featured_proposal, anchor: "comments") %>
|
||||||
|
</p>
|
||||||
|
<div class="proposal-description">
|
||||||
|
<%= link_to featured_proposal.description, featured_proposal %>
|
||||||
|
<div class="truncate"></div>
|
||||||
|
</div>
|
||||||
|
<%= render "shared/tags", proposal: featured_proposal, limit: 5 %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div id="<%= dom_id(featured_proposal) %>_votes" class="small-12 column">
|
||||||
|
<%= render 'proposals/votes', proposal: featured_proposal %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -1,5 +1,15 @@
|
|||||||
<% cache [locale_and_user_status, @featured_debates, @debate_votes, 'featured'] do %>
|
<% cache [locale_and_user_status, @featured_debates, @debate_votes, 'featured'] do %>
|
||||||
<section role="main">
|
<section role="main">
|
||||||
|
|
||||||
|
<div class="filters row">
|
||||||
|
<div class="small-12 column">
|
||||||
|
<h2><%= t("welcome.last_proposals") %></h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="featured-proposals" class="row">
|
||||||
|
<%= render partial: "featured_proposal", collection: @featured_proposals %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="filters row">
|
<div class="filters row">
|
||||||
<div class="small-12 column">
|
<div class="small-12 column">
|
||||||
<h2><%= t("welcome.last_debates") %></h2>
|
<h2><%= t("welcome.last_debates") %></h2>
|
||||||
@@ -8,5 +18,6 @@
|
|||||||
<div id="featured-debates" class="row">
|
<div id="featured-debates" class="row">
|
||||||
<%= render partial: "featured_debate", collection: @featured_debates %>
|
<%= render partial: "featured_debate", collection: @featured_debates %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user