mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Fixed page tree view
This commit is contained in:
parent
bfe354de5e
commit
e7ecdf4b35
@ -701,8 +701,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
$controller = $this;
|
||||
$columns->setFieldFormatting(array(
|
||||
'listChildrenLink' => function(&$item) use($controller) {
|
||||
$num = $item->numChildren();
|
||||
'listChildrenLink' => function($value, &$item) use($controller) {
|
||||
$num = $item ? $item->numChildren() : null;
|
||||
if($num) {
|
||||
return sprintf(
|
||||
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
|
||||
@ -712,8 +712,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
);
|
||||
}
|
||||
},
|
||||
'getTreeTitle' => '<a class=\"cms-panel-link\" href=\"' .
|
||||
singleton('CMSPageEditController')->Link('show') . '/$ID\">$value</a>'
|
||||
'getTreeTitle' => function($value, &$item) use($controller) {
|
||||
return '<a class="cms-panel-link" href="' . $controller->Link('show') . '/' . $item->ID . '">' . $item->TreeTitle . '</a>';
|
||||
}
|
||||
));
|
||||
|
||||
$listview = new Form(
|
||||
|
Loading…
Reference in New Issue
Block a user