From e2c21cce8e6a2ae0c87e0b23f89fece91c03d2fe Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 5 Mar 2012 18:21:08 +0100 Subject: [PATCH] MINOR "New " breadcrumb for GridFieldPopupForm --- forms/gridfield/GridFieldPopupForms.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forms/gridfield/GridFieldPopupForms.php b/forms/gridfield/GridFieldPopupForms.php index 0a71bf8ee..4f955cb5c 100755 --- a/forms/gridfield/GridFieldPopupForms.php +++ b/forms/gridfield/GridFieldPopupForms.php @@ -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