mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5013 from Legin76/patch-2
This commit is contained in:
commit
31a4e184f7
@ -1498,6 +1498,14 @@ class UploadField_SelectHandler extends RequestHandler {
|
||||
*/
|
||||
protected $folderName;
|
||||
|
||||
/**
|
||||
* Set pagination quantity for file list field
|
||||
*
|
||||
* @config
|
||||
* @var int
|
||||
*/
|
||||
private static $page_size = 11;
|
||||
|
||||
private static $url_handlers = array(
|
||||
'$Action!' => '$Action',
|
||||
'' => 'index',
|
||||
@ -1580,7 +1588,10 @@ class UploadField_SelectHandler extends RequestHandler {
|
||||
$colsComponent->setFieldCasting(array(
|
||||
'Created' => 'SS_Datetime->Nice'
|
||||
));
|
||||
$config->addComponent(new GridFieldPaginator(11));
|
||||
|
||||
// Set configurable pagination for file list field
|
||||
$pageSize = Config::inst()->get(get_class($this), 'page_size');
|
||||
$config->addComponent(new GridFieldPaginator($pageSize));
|
||||
|
||||
// If relation is to be autoset, we need to make sure we only list compatible objects.
|
||||
$baseClass = $this->parent->getRelationAutosetClass();
|
||||
|
Loading…
Reference in New Issue
Block a user