Permalink
Browse files

MINOR Correct breadcrumbs in ModelAdmin when managing multiple models…

… (#7240)
  • Loading branch information...
1 parent 38ff6d4 commit dc659543a12d70cbf0538ba92e171d27ca03f3c6 @chillu chillu committed May 2, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 admin/code/ModelAdmin.php
@@ -113,6 +113,11 @@ public function init() {
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 @@ public function Breadcrumbs($unlinked = false) {
} else {
$items[0]->Title = singleton($this->modelClass)->i18n_singular_name();
}
+ $items[0]->Link = $this->Link($this->modelClass);
return $items;
}

0 comments on commit dc65954

Please sign in to comment.