Skip to content
Snippets Groups Projects
Commit 242ac392 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2226923 by pakmanlh, mandar.harkare, mortendk, galooph: Views: remove...

Issue #2226923 by pakmanlh, mandar.harkare, mortendk, galooph: Views: remove wrapper around more link - add class to the link.
parent e81a0a7a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -124,6 +124,7 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed { ...@@ -124,6 +124,7 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed {
* Markup generated by theme_more_link(). * Markup generated by theme_more_link().
*/ */
.more-link { .more-link {
display: block;
text-align: right; /* LTR */ text-align: right; /* LTR */
} }
[dir="rtl"] .more-link { [dir="rtl"] .more-link {
......
...@@ -182,7 +182,7 @@ public function testReadMore() { ...@@ -182,7 +182,7 @@ public function testReadMore() {
$output = drupal_render($output); $output = drupal_render($output);
$this->drupalSetContent($output); $this->drupalSetContent($output);
$result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $result = $this->xpath('//a[@class=:class]', array(':class' => 'more-link'));
$this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.'); $this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.');
$this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.'); $this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.');
...@@ -191,7 +191,7 @@ public function testReadMore() { ...@@ -191,7 +191,7 @@ public function testReadMore() {
$more_link = $view->display_handler->renderMoreLink(); $more_link = $view->display_handler->renderMoreLink();
$more_link = drupal_render($more_link); $more_link = drupal_render($more_link);
$this->drupalSetContent($more_link); $this->drupalSetContent($more_link);
$result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $result = $this->xpath('//a[@class=:class]', array(':class' => 'more-link'));
$this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.'); $this->assertEqual($result[0]->attributes()->href, url('test_display_more'), 'The right more link is shown.');
$this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.'); $this->assertEqual(trim($result[0][0]), $expected_more_text, 'The right link text is shown.');
...@@ -207,7 +207,7 @@ public function testReadMore() { ...@@ -207,7 +207,7 @@ public function testReadMore() {
$output = $view->preview(); $output = $view->preview();
$output = drupal_render($output); $output = drupal_render($output);
$this->drupalSetContent($output); $this->drupalSetContent($output);
$result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $result = $this->xpath('//a[@class=:class]', array(':class' => 'more-link'));
$this->assertTrue(empty($result), 'The more link is not shown.'); $this->assertTrue(empty($result), 'The more link is not shown.');
$view = Views::getView('test_display_more'); $view = Views::getView('test_display_more');
...@@ -225,7 +225,7 @@ public function testReadMore() { ...@@ -225,7 +225,7 @@ public function testReadMore() {
$output = $view->preview(); $output = $view->preview();
$output = drupal_render($output); $output = drupal_render($output);
$this->drupalSetContent($output); $this->drupalSetContent($output);
$result = $this->xpath('//div[@class=:class]/a', array(':class' => 'more-link')); $result = $this->xpath('//a[@class=:class]', array(':class' => 'more-link'));
$this->assertTrue(empty($result), 'The more link is not shown when view has more records.'); $this->assertTrue(empty($result), 'The more link is not shown when view has more records.');
// Test the default value of use_more_always. // Test the default value of use_more_always.
......
...@@ -11,8 +11,4 @@ ...@@ -11,8 +11,4 @@
* @ingroup themeable * @ingroup themeable
*/ */
#} #}
<div class="more-link"> <a href="{{ more_url }}" class="more-link">{{ link_text }}</a>
<a href="{{ more_url }}">
{{ link_text }}
</a>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment