app/views/talkie/comments/_comment.html.erb in talkie-0.1.0 vs app/views/talkie/comments/_comment.html.erb in talkie-0.1.1
- old
+ new
@@ -18,14 +18,18 @@
<p class="talkie-comment-body">
<%= comment.body %>
</p>
<div class="talkie-comment-footer">
+ <% if !nested_enabled? && deletable_and_allowed?(comment) %>
+ <%= link_to_delete_comment comment %>
+ <% end %>
+
<% if nested_enabled? %>
<div class="talkie-comment-reply">
<a href="#" class="talkie-comment-reply-link"><%= t("talkie.comment.reply") %></a>
- <% if allow? :destroy, comment %>
- <%= link_to t("talkie.comment.delete"), [talkie, comment], method: :delete, class: "talkie-comment-delete" %>
+ <% if deletable_and_allowed? comment %>
+ <%= link_to_delete_comment comment %>
<% end %>
</div>
<div class="talkie-comments-reply-form-container" style="display:none">
<%= form_for [talkie, Talkie::Comment.new] do |f| %>
<%= f.hidden_field :commentable_id, value: commentable.id %>