Merge pull request #1615 from open-sausages/pulls/4.0/fix-level-up

BUG Fix pages level up link
This commit is contained in:
Ingo Schommer 2016-09-20 14:57:45 +12:00 committed by GitHub
commit 402c6879a3

View File

@ -859,9 +859,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
new GridFieldPaginator(self::config()->page_length)
);
if($parentID){
$linkSpec = $this->Link();
$linkSpec = $linkSpec . (strstr($linkSpec, '?') ? '&' : '?') . 'ParentID=%d&view=list';
$gridFieldConfig->addComponent(
GridFieldLevelup::create($parentID)
->setLinkSpec('?ParentID=%d&view=list')
->setLinkSpec($linkSpec)
->setAttributes(array('data-pjax' => 'ListViewForm,Breadcrumbs'))
);
}