Issue #2226923 by pakmanlh, mandar.harkare, mortendk, galooph: Views: remove wrapper around more link - add class to the link.
parent
e81a0a7a19
commit
242ac392d8
|
@ -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 @@ class DisplayTest extends PluginTestBase {
|
||||||
$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 @@ class DisplayTest extends PluginTestBase {
|
||||||
$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 @@ class DisplayTest extends PluginTestBase {
|
||||||
$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 @@ class DisplayTest extends PluginTestBase {
|
||||||
$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 @@
|
||||||
* @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>
|
|
||||||
|
|
Loading…
Reference in New Issue