commentslayout fix

This commit is contained in:
2014-08-13 15:02:48 +05:30
committed by Andreas Stephanides
parent 0dfc58f125
commit 753d4e212f
3 changed files with 16 additions and 7 deletions

View File

@@ -1,9 +1,14 @@
<div id="<%= comment.divid %>">
<a class="pull-left media-object" href="#"><%= image_tag comment.thumb_url %></a>
<div class="media-body">
<b><%= comment.user.try(:email) %></b> (<%= I18n.l(comment.created_at) %>): <%= comment.text %>
<%= link_to "comment" , new_comment_path( commentable_type: "Comment", commentable_id: comment.id), remote:true %>
<%= render partial:"comments/comments", object: comment.children if comment.children.size >0 %>
<b><%= comment.user.try(:email) %></b> (<%= I18n.l(comment.created_at) %>):
<p><%= comment.text %>
<% if can?(:comment, comment.commentable) %>
<br><%= link_to "comment" , new_comment_path( commentable_type: "Comment", commentable_id: comment.id), remote:true %>
<% end %>
</p>
<%= render partial:"comments/comments", object: comment.children.order(:created_at).reverse_order if comment.children.size >0 %>
</div>

View File

@@ -1,7 +1,9 @@
<div class="contentbox">
<% unless comments.empty? %>
<div class="contentbox" style="border-right:none;border-bottom:none; border-top:none">
<ul class="unstyled media-list">
<% comments.each do |c| %>
<li class="media"><%= render c %></li>
<% end %>
</ul>
</div>
<% end %>