diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 6f2795a..e9ad2e9 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -278,6 +278,7 @@ function comment_menu() { 'page arguments' => array(1), 'access arguments' => array('administer comments'), 'type' => MENU_LOCAL_TASK, + 'context' => MENU_CONTEX_INLINE, 'file' => 'comment.admin.inc', 'weight' => 2, ); @@ -933,11 +934,6 @@ function comment_links(Comment $comment, Node $node) { $links = array(); if ($node->comment == COMMENT_NODE_OPEN) { if (user_access('administer comments') && user_access('post comments')) { - $links['comment-delete'] = array( - 'title' => t('delete'), - 'href' => "comment/{$comment->id()}/delete", - 'html' => TRUE, - ); $links['comment-edit'] = array( 'title' => t('edit'), 'href' => "comment/{$comment->id()}/edit", diff --git a/core/modules/comment/lib/Drupal/comment/CommentRenderController.php b/core/modules/comment/lib/Drupal/comment/CommentRenderController.php index dab8dc4..26d7b10 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentRenderController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentRenderController.php @@ -99,6 +99,10 @@ protected function alterBuild(array &$build, EntityInterface $comment, EntityDis $build['#suffix'] = str_repeat('', $comment->divs_final); } } + + if (!empty($comment->cid)) { + $build['#contextual_links']['comment'] = array('comment', array($comment->cid)); + } } }