mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
NEW: Add Thumbnails to 'Choose another file' dialogue
Very difficult to choose an image based on file name alone. Added thumbnail and reduced rows from 10 to 8 to compensate for increased height of rows with thumbnail included.
This commit is contained in:
parent
8da41f4250
commit
34bc067400
@ -1548,8 +1548,13 @@ class UploadField_SelectHandler extends RequestHandler {
|
||||
$config = GridFieldConfig::create();
|
||||
$config->addComponent(new GridFieldSortableHeader());
|
||||
$config->addComponent(new GridFieldFilterHeader());
|
||||
$config->addComponent(new GridFieldDataColumns());
|
||||
$config->addComponent(new GridFieldPaginator(10));
|
||||
$config->addComponent($columns = new GridFieldDataColumns());
|
||||
$columns->setDisplayFields(array(
|
||||
'StripThumbnail' => '',
|
||||
'Name' => 'Name',
|
||||
'Title' => 'Title'
|
||||
));
|
||||
$config->addComponent(new GridFieldPaginator(8));
|
||||
|
||||
// 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