Skip to content

Commit

Permalink
Allow deleting a comment from the threaded view.
Browse files Browse the repository at this point in the history
  • Loading branch information
nud committed Feb 11, 2012
1 parent 606aa61 commit d23852b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/views/comments/_comment.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
= comment.user.try(:signature)
%footer.actions
= link_to "Répondre", "/nodes/#{comment.node_id}/comments/#{comment.id}/answer#new_comment", :class => 'action'
- if current_account && current_account.can_update?(comment)
= link_to "Modifier", "/nodes/#{comment.node_id}/comments/#{comment.id}/modifier", :class => 'action'
- if current_account
- if current_account.can_update?(comment)
= link_to "Modifier", "/nodes/#{comment.node_id}/comments/#{comment.id}/modifier", :class => 'action'
- if current_account.can_destroy?(comment)
= button_to "Supprimer", [comment.node, comment], :method => :delete, :confirm => "Êtes-vous sûr de vouloir supprimer ce commentaire ?", :class => 'action'
- if current_account && current_account.can_vote?(comment)
%div.vote
Ce commentaire est-il #{button_to "pertinent", "/nodes/#{comment.node_id}/comments/#{comment.id}/relevance/for", :remote => true, :disabled => comment.score >= 10, :class => "relevant"}
Expand Down

0 comments on commit d23852b

Please sign in to comment.