mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR "New <record title>" breadcrumb for GridFieldPopupForm
This commit is contained in:
parent
0117b32fee
commit
e2c21cce8e
@ -329,11 +329,16 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler {
|
||||
if(!($this->popupController instanceof LeftAndMain)) return false;
|
||||
|
||||
$items = $this->popupController->Breadcrumbs($unlinked);
|
||||
if($this->record) {
|
||||
if($this->record && $this->record->ID) {
|
||||
$items->push(new ArrayData(array(
|
||||
'Title' => $this->record->Title,
|
||||
'Link' => false
|
||||
)));
|
||||
} else {
|
||||
$items->push(new ArrayData(array(
|
||||
'Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->singular_name()),
|
||||
'Link' => false
|
||||
)));
|
||||
}
|
||||
|
||||
// TODO Remove once ViewableData->First()/Last() is fixed
|
||||
|
Loading…
Reference in New Issue
Block a user