mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Correct breadcrumbs in ModelAdmin when managing multiple models (#7240)
This commit is contained in:
parent
38ff6d4398
commit
dc659543a1
@ -113,6 +113,11 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ModelAdmin.js');
|
||||
}
|
||||
|
||||
public function Link($action = null) {
|
||||
if(!$action) $action = $this->modelClass;
|
||||
return parent::Link($action);
|
||||
}
|
||||
|
||||
function getEditForm($id = null, $fields = null) {
|
||||
$list = $this->getList();
|
||||
$exportButton = new GridFieldExportButton('before');
|
||||
@ -408,6 +413,7 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
} else {
|
||||
$items[0]->Title = singleton($this->modelClass)->i18n_singular_name();
|
||||
}
|
||||
$items[0]->Link = $this->Link($this->modelClass);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user