mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-06 09:41:36 +02:00
BUGFIX: Make sure CMS link knows when its currently in the CMS (from r97403) (from r99049)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102825 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9284d63827
commit
c1165c2ca0
@ -14,11 +14,15 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
|
|||||||
static $priority = 10;
|
static $priority = 10;
|
||||||
|
|
||||||
function getHTML($controller) {
|
function getHTML($controller) {
|
||||||
|
if(is_a(Controller::curr(), 'CMSMain')) {
|
||||||
|
return '<a class="current">CMS</a>';
|
||||||
|
} else {
|
||||||
$cmsLink = 'admin/show/' . $controller->ID;
|
$cmsLink = 'admin/show/' . $controller->ID;
|
||||||
$cmsLink = "<a href=\"$cmsLink\" target=\"cms\">". _t('ContentController.CMS', 'CMS') ."</a>";
|
$cmsLink = "<a href=\"$cmsLink\" target=\"cms\">". _t('ContentController.CMS', 'CMS') ."</a>";
|
||||||
|
|
||||||
return $cmsLink;
|
return $cmsLink;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
|
class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
|
||||||
|
Loading…
Reference in New Issue
Block a user