Skip to content

Commit

Permalink
Fix comment view
Browse files Browse the repository at this point in the history
  • Loading branch information
scaffeinate committed Apr 28, 2017
1 parent c03c6a3 commit 1c85d7e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions app/views/comments/_comment.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<div id="comment-<%= comment.id %>">
<div class="info">
<%= render 'shared/avatar', user: comment.user %>
<h4 class="name"><%= link_to comment.user.name, user_path(comment.user) %></h4>
</div>
<div class="content">
<div class="row">
<span class="text"><%= comment.comment_html %></span>
<% if comment.user %>
<div id="comment-<%= comment.id %>">
<div class="info">
<%= render 'shared/avatar', user: comment.user %>
<h4 class="name"><%= link_to comment.user.name, user_path(comment.user) %></h4>
</div>
<div class="pull-right">
<% if belongs_to_user?(comment) %>
<%= link_to comment_path(comment), method: :delete, class: 'btn btn-danger btn-sm', remote: true do %>
<% fa_icon 'trash' %>
<div class="content">
<div class="row">
<span class="text"><%= comment.comment_html %></span>
</div>
<div class="pull-right">
<% if belongs_to_user?(comment) %>
<%= link_to comment_path(comment), method: :delete, class: 'btn btn-danger btn-sm', remote: true do %>
<% fa_icon 'trash' %>
<% end %>
<% end %>
<% end %>
</div>
</div>
<br>
<hr>
</div>
<br>
<hr>
</div>
<% end %>

0 comments on commit 1c85d7e

Please sign in to comment.