mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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;
|
$controller = $this;
|
||||||
$columns->setFieldFormatting(array(
|
$columns->setFieldFormatting(array(
|
||||||
'listChildrenLink' => function(&$item) use($controller) {
|
'listChildrenLink' => function($value, &$item) use($controller) {
|
||||||
$num = $item->numChildren();
|
$num = $item ? $item->numChildren() : null;
|
||||||
if($num) {
|
if($num) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
|
'<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=\"' .
|
'getTreeTitle' => function($value, &$item) use($controller) {
|
||||||
singleton('CMSPageEditController')->Link('show') . '/$ID\">$value</a>'
|
return '<a class="cms-panel-link" href="' . $controller->Link('show') . '/' . $item->ID . '">' . $item->TreeTitle . '</a>';
|
||||||
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
$listview = new Form(
|
$listview = new Form(
|
||||||
|
Loading…
Reference in New Issue
Block a user