Files
nairobi/app/views/debates/show.html.erb
Alberto García Cabeza 20a762e556 Modifies debates show
2015-07-26 23:14:43 +02:00

44 lines
1.2 KiB
Plaintext

<article>
<div class="row">
<div id="debate-<%= @debate.id %>" class="small-12 medium-2 large-4 colum">
<h3><%= @debate.title %></h3>
<p><%= @debate.description %></p>
<p>
Creado el: <%= l @debate.created_at.to_date %>
por: <%= @debate.author.name %>
</p>
</div>
<span style="width:30%;float:left">
<div id='in_favor'>
<%= link_to "up", debate_votes_path(@debate, value: 'yes'), method: "post" %>
<%= percentage('likes', @debate) %>
</div>
<div id='against'>
<%= link_to "down", debate_votes_path(@debate, value: 'no'), method: "post" %>
<%= percentage('dislikes', @debate) %>
</div>
Votos <%= @debate.total_votes %>
</span>
<div style="display: block; width:300px">
<%= render 'shared/tags', debate: @debate %>
</div>
<br/><br/>
<div id="comments" style="padding-top:20px">
<h2>Comentarios</h2>
<div style="padding-bottom:60px">
Deja tu comentario
<%= render 'comments/form', parent: @debate %>
</div>
<%= render @debate.root_comments %>
</div>
<% if current_user && @debate.editable_by?(current_user) %>
<%= link_to 'Edit', edit_debate_path(@debate) %> |
<% end %>
<%= link_to 'Back', debates_path %>
</article>