diff --git a/filesystem/Folder.php b/filesystem/Folder.php index d693c9315..479aa8928 100644 --- a/filesystem/Folder.php +++ b/filesystem/Folder.php @@ -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"); diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php index aa2b31dea..8ede986dd 100755 --- a/forms/gridfield/GridField.php +++ b/forms/gridfield/GridField.php @@ -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 );