Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
a8c3e6a1
Commit
a8c3e6a1
authored
Nov 11, 2013
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2128399
by olli: View preview is broken in UI if more link is displayed.
parent
089c38c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
...b/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+7
-1
core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php
...dules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php
+1
-0
No files found.
core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
View file @
a8c3e6a1
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\display
;
use
Drupal\Component\Utility\String
;
use
Drupal\Core\Language\Language
;
use
Drupal\views\Plugin\views\area\AreaPluginBase
;
use
Drupal\views\ViewExecutable
;
...
...
@@ -2482,7 +2483,12 @@ public function renderMoreLink() {
$theme
=
$this
->
view
->
buildThemeFunctions
(
'views_more'
);
$path
=
check_url
(
url
(
$path
,
$url_options
));
return
theme
(
$theme
,
array
(
'more_url'
=>
$path
,
'link_text'
=>
check_plain
(
$this
->
useMoreText
()),
'view'
=>
$this
->
view
));
return
array
(
'#theme'
=>
$theme
,
'#more_url'
=>
$path
,
'#link_text'
=>
String
::
checkPlain
(
$this
->
useMoreText
()),
'#view'
=>
$this
->
view
,
);
}
}
}
...
...
core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php
View file @
a8c3e6a1
...
...
@@ -187,6 +187,7 @@ public function testReadMore() {
// Test the renderMoreLink method directly. This could be directly unit
// tested.
$more_link
=
$view
->
display_handler
->
renderMoreLink
();
$more_link
=
drupal_render
(
$more_link
);
$this
->
drupalSetContent
(
$more_link
);
$result
=
$this
->
xpath
(
'//div[@class=:class]/a'
,
array
(
':class'
=>
'more-link'
));
$this
->
assertEqual
(
$result
[
0
]
->
attributes
()
->
href
,
url
(
'test_display_more'
),
'The right more link is shown.'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment