Closed silverstripe-issues closed 11 years ago
comment by: @jakr (jak) created at: 2012-08-05
Created pull request for the first idea at https://github.com/silverstripe/sapphire/pull/696. I would like to discuss if it would be better to add summary_fields to File instead.
created by: @jakr (jak) assigned to: @jakr (jak) created at: 2012-08-05 original ticket: http://open.silverstripe.org/ticket/7738
When you create an
ImageUploadField
, there is an option to attach an existingImage
. Selecting this option displays a popup with a form that allows you to browse for existing files. Currently, this form displays only filename and title. It would be nice, if this form would also display a thumbmail.The list inside this form is a
GridField
(created byUploadField->getListField
and accessible via the URLItemEditForm/field/MyUploadField/select
), so the easiest way to add thumbnails would be to add the static field$summary_fields
toframework/model/Image
:Another idea would be to add
$summary_fields
to/framework/filesystem/File
instead. In this case, it could perhaps also include the information thatAssetAdmin
(cms/code/controllers/AssetAdmin
) wants to display. Currently,AssetAdmin->getEditForm
does this by callingGridFieldDataColumns->setDisplayFields
: