mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 12:05:56 +00:00
ENHANCEMENT: add usage of GridFieldPaginatorWithShowAll for documents grid field
This commit is contained in:
parent
c6c116a8b3
commit
c708551982
@ -38,12 +38,19 @@ class DMSSiteTreeExtension extends DataExtension {
|
|||||||
new GridFieldFilterHeader(),
|
new GridFieldFilterHeader(),
|
||||||
new GridFieldSortableHeader(),
|
new GridFieldSortableHeader(),
|
||||||
new GridFieldDataColumns(),
|
new GridFieldDataColumns(),
|
||||||
$paginatorComponent = new GridFieldPaginator(15),
|
|
||||||
new GridFieldEditButton(),
|
new GridFieldEditButton(),
|
||||||
new DMSGridFieldDeleteAction(), //special delete dialog to handle custom behaviour of unlinking and deleting
|
new DMSGridFieldDeleteAction(), //special delete dialog to handle custom behaviour of unlinking and deleting
|
||||||
new GridFieldDetailForm()
|
new GridFieldDetailForm()
|
||||||
//GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d')
|
//GridFieldLevelup::create($folder->ID)->setLinkSpec('admin/assets/show/%d')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(class_exists('GridFieldPaginatorWithShowAll')){
|
||||||
|
$paginatorComponent = new GridFieldPaginatorWithShowAll(15);
|
||||||
|
}else{
|
||||||
|
$paginatorComponent = new GridFieldPaginator(15);
|
||||||
|
}
|
||||||
|
$gridFieldConfig->addComponent($paginatorComponent);
|
||||||
|
|
||||||
if(class_exists('GridFieldSortableRows')) {
|
if(class_exists('GridFieldSortableRows')) {
|
||||||
$sortableComponent = new GridFieldSortableRows('DocumentSort');
|
$sortableComponent = new GridFieldSortableRows('DocumentSort');
|
||||||
$sortableComponent->setUsePagination(false)->setForceRedraw(true);
|
$sortableComponent->setUsePagination(false)->setForceRedraw(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user