     'downvote': -> DiscussionUtil.urlFor("downvote_#{@get('type')}", @id)
     'endorse': -> DiscussionUtil.urlFor('endorse_comment', @id)
     'update': -> DiscussionUtil.urlFor('update_comment', @id)
+    'delete': -> DiscussionUtil.urlFor('delete_comment', @id)
 
   permalink: ->
     thread_id = @get('thread').id

    @$(".discussion-content-edit").hide()
    @$(".discussion-content-wrapper").show()

  delete: ->
    if $content.hasClass("thread")
      url = Discussion.urlFor('delete_thread', id)
      c = confirm "Are you sure to delete thread \"" + $content.find("a.thread-title").text() + "\"?"
    else
      url = Discussion.urlFor('delete_comment', id)
      c = confirm "Are you sure to delete this comment? "
    if c != true
      return
    Discussion.safeAjax
      $elem: $(elem)
      url: url
      type: "POST"
      dataType: "json"
      data: {}
      success: (response, textStatus) =>
        if textStatus == "success"
          $(content).remove()
      error: (response, textStatus, e) ->
        console.log e

  events:
    "click .thread-title": "toggleSingleThread"
    "click .discussion-show-comments": "toggleSingleThread"

    'downvote': -> DiscussionUtil.urlFor("downvote_#{@get('type')}", @id)
    'close': -> DiscussionUtil.urlFor('openclose_thread', @id)
    'update': -> DiscussionUtil.urlFor('update_thread', @id)
    'delete': -> DiscussionUtil.urlFor('delete_thread', @id)

  initialize: ->
    @set('thread', @)
