mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: use the grid field compoent GridFieldLevelup for pages listveiw when the view is the children listing of a page
This commit is contained in:
parent
f545f52c1a
commit
4b6c21b940
@ -668,12 +668,17 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
public function ListViewForm() {
|
||||
$params = $this->request->requestVar('q');
|
||||
$list = $this->getList($params, $this->request->requestVar('ParentID'));
|
||||
$list = $this->getList($params, $parentID = $this->request->requestVar('ParentID'));
|
||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||
new GridFieldSortableHeader(),
|
||||
new GridFieldDataColumns(),
|
||||
new GridFieldPaginator(15)
|
||||
);
|
||||
if($parentID){
|
||||
$gridFieldConfig->addComponent(
|
||||
new GridFieldLevelup($parentID)
|
||||
);
|
||||
}
|
||||
$gridField = new GridField('Page','Pages', $list, $gridFieldConfig);
|
||||
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user