diff --git a/core/modules/comment/src/Tests/CommentLinksTest.php b/core/modules/comment/src/Tests/CommentLinksTest.php index 68f9f0e..7b1f229 100644 --- a/core/modules/comment/src/Tests/CommentLinksTest.php +++ b/core/modules/comment/src/Tests/CommentLinksTest.php @@ -70,7 +70,7 @@ public function testCommentLinks() { 'subject' => $this->randomMachineName(), 'hostname' => '127.0.0.1', 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, - 'comment_body' => array(LanguageInterface::LANGCODE_NOT_SPECIFIED => array($this->randomMachineName())), + 'comment_body' => array(array('value' => $this->randomMachineName())), )); $comment->save(); $this->comment = $comment; @@ -105,6 +105,26 @@ public function testCommentLinks() { $this->assertLink('Add new comment'); } + // Change weight to make links go before comment body. + entity_get_display('comment', 'comment', 'default') + ->setComponent('links', array('weight' => -100)) + ->save(); + $this->drupalGet($this->node->urlInfo()); + $element = $this->cssSelect('article.js-comment > div'); + // Get last child element. + $element = end($element[0]); + $this->assertIdentical($element[0]->getName(), 'div', 'Last element is comment body.'); + + // Change weight to make links go after comment body. + entity_get_display('comment', 'comment', 'default') + ->setComponent('links', array('weight' => 100)) + ->save(); + $this->drupalGet($this->node->urlInfo()); + $element = $this->cssSelect('article.js-comment > div'); + // Get last child element. + $element = end($element[0]); + $this->assertIdentical($element[0]->getName(), 'ul', 'Last element is comment links.'); + // Make sure we can hide node links. entity_get_display('node', $this->node->bundle(), 'default') ->removeComponent('links') diff --git a/core/themes/bartik/css/components/comments.css b/core/themes/bartik/css/components/comments.css index c0c0c92..9cd977b 100644 --- a/core/themes/bartik/css/components/comments.css +++ b/core/themes/bartik/css/components/comments.css @@ -105,9 +105,6 @@ margin-bottom: 0.45em; font-size: 1.171em; } -.comment__content nav { - padding-top: 1px; -} .comment .indented { margin-left: 40px; /* LTR */ } diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig index 8927db4..ed32a2c 100644 --- a/core/themes/bartik/templates/comment.html.twig +++ b/core/themes/bartik/templates/comment.html.twig @@ -106,9 +106,6 @@ {{ title }} {{ title_suffix }} {% endif %} - {{ content|without('links') }} - {% if content.links %} - - {% endif %} + {{ content }}