Improves styles for debate show and comments

This commit is contained in:
Alberto Garcia Cabeza
2015-08-11 13:16:24 +02:00
parent f9e0dad7a2
commit d5c27b36d5
4 changed files with 78 additions and 34 deletions

View File

@@ -1,25 +1,29 @@
<div class="row">
<div id="comment-<%= comment.id %>" class="small-12 column comment">
<div id="comment-<%= comment.id %>" class="comment small-12 column">
<%= image_tag('user_default_2.jpg', class: 'user-photo left', size: '32x32') %>
<%= image_tag('user_default_2.jpg', class: 'user-photo left', size: '32x32') %>
<div class="comment-body">
<span class="comment-info">
<%= comment.user.name %>&nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %>
</span>
<p><%= comment.body %></p>
<div class="comment-body">
<span class="comment-info">
<span><%= comment.user.name %></span>&nbsp;&bullet;&nbsp;<%= time_ago_in_words(comment.created_at) %>
</span>
<p><%= comment.body %></p>
<span id="<%= dom_id(comment) %>_votes">
<%= render 'comments/votes', comment: comment %>
</span>
<span id="<%= dom_id(comment) %>_votes" class="comment-votes right">
<%= render 'comments/votes', comment: comment %>
</span>
<% if user_signed_in? %>
<p class="reply"><%= render 'comments/form', {parent: comment, toggeable: true} %></p>
<% end %>
</div>
<p class="reply">
númerototal respuestas
<% if user_signed_in? %>
&nbsp;|&nbsp;
<%= render 'comments/form', {parent: comment, toggeable: true} %></p>
<% end %>
</div>
<div class="comment-children">
<%= render comment.children %>
</div>
</div>
<div class="comment-children">
<%= render comment.children %>
</div>
</div>
</div>

View File

@@ -1,11 +1,19 @@
<span>
númerototal votos
</span>
&nbsp;|&nbsp;
<span class="in_favor">
<%= link_to "up", vote_comment_path(comment, value: 'yes'),
method: "post", remote: true %>
<%= link_to vote_comment_path(comment, value: 'yes'),
method: "post", remote: true do %>
<i class="icon-angle-up"></i>
<% end %>
<%= comment.get_likes.size %>
</span>
<span class="against">
<%= link_to "down", vote_comment_path(comment, value: 'no'),
method: "post", remote: true %>
<%= link_to vote_comment_path(comment, value: 'no'),
method: "post", remote: true do %>
<i class="icon-angle-down"></i>
<% end %>
<%= comment.get_dislikes.size %>
</span>