mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Fixed breadcrumbs in CMSFileAddController
This commit is contained in:
parent
915dc7f27c
commit
9981c929e0
@ -546,8 +546,14 @@ JS
|
||||
public function Breadcrumbs($unlinked = false) {
|
||||
$items = parent::Breadcrumbs($unlinked);
|
||||
|
||||
// The root element should explicitly point to the root node
|
||||
$items[0]->Link = Controller::join_links($this->Link('show'), 'root');
|
||||
// The root element should explicitly point to the root node.
|
||||
// Used in CMSFileAddController subclass as well, so specifically link to AssetAdmin
|
||||
$items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 'root');
|
||||
|
||||
// HACK Force linkage to AssetAdmin, even when current controller is CMSFileAddController
|
||||
foreach($items as $item) {
|
||||
if($item->Link) $item->Link = str_replace('assets/add/show/', 'assets/show/', $item->Link);
|
||||
}
|
||||
|
||||
// If a search is in progress, don't show the path
|
||||
if($this->request->requestVar('q')) {
|
||||
|
Loading…
Reference in New Issue
Block a user