mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Metadata for GridField and Folder->getCMSFields() to allow opening folder references in the UI
This commit is contained in:
parent
6e6fdaf79e
commit
cbc2891c80
@ -441,6 +441,10 @@ class Folder extends File {
|
||||
$gridField->setFieldFormatting(array(
|
||||
'Date' => 'Nice'
|
||||
));
|
||||
$gridField->setAttribute(
|
||||
'data-url-folder-template',
|
||||
Controller::join_links(singleton('AssetAdmin')->Link('show'), '%s')
|
||||
);
|
||||
|
||||
$titleField = ($this->ID && $this->ID != "root") ? new TextField("Title", _t('Folder.TITLE')) : new HiddenField("Title");
|
||||
|
||||
|
@ -335,7 +335,9 @@ class GridField extends FormField {
|
||||
'tr',
|
||||
array(
|
||||
"class" => 'ss-gridfield-item ' . $record->FirstLast() . " " . $record->EvenOdd(),
|
||||
'data-id' => $record->ID
|
||||
'data-id' => $record->ID,
|
||||
// TODO Allow per-row customization similar to GridFieldDefaultColumns
|
||||
'data-class' => $record->ClassName,
|
||||
),
|
||||
$rowContent
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user