mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: Add GridfieldLevelup component to files area
This commit is contained in:
parent
bb5e3e5fbd
commit
ef651d9d93
@ -146,7 +146,8 @@ JS
|
||||
new GridFieldPaginator(15),
|
||||
new GridFieldEditButton(),
|
||||
new GridFieldDeleteAction(),
|
||||
new GridFieldDetailForm()
|
||||
new GridFieldDetailForm(),
|
||||
GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d')
|
||||
);
|
||||
|
||||
$gridField = new GridField('File', $title, $this->getList(), $gridFieldConfig);
|
||||
|
@ -669,14 +669,16 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
public function ListViewForm() {
|
||||
$params = $this->request->requestVar('q');
|
||||
$list = $this->getList($params, $parentID = $this->request->requestVar('ParentID'));
|
||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||
new GridFieldSortableHeader(),
|
||||
new GridFieldDataColumns(),
|
||||
new GridFieldPaginator(15)
|
||||
);
|
||||
if($parentID){
|
||||
$gridFieldConfig->addComponent(
|
||||
new GridFieldLevelup($parentID)
|
||||
GridFieldLevelup::create($parentID)
|
||||
->setLinkSpec('?ParentID=%d&view=list')
|
||||
->setAttributes(array('data-pjax' => 'ListViewForm,Breadcrumbs'))
|
||||
);
|
||||
}
|
||||
$gridField = new GridField('Page','Pages', $list, $gridFieldConfig);
|
||||
|
Loading…
Reference in New Issue
Block a user