mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Added Requirements for SilverStripeNavigator (see r99080)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@99098 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
801161369e
commit
3377198bc4
@ -219,6 +219,10 @@ class LeftAndMain extends Controller {
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LangSelector.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/TranslationTab.js');
|
||||
|
||||
// navigator
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/SilverStripeNavigator.js');
|
||||
|
||||
Requirements::themedCSS('typography');
|
||||
|
||||
foreach (self::$extra_requirements['javascript'] as $file) {
|
||||
@ -1087,6 +1091,16 @@ JS;
|
||||
return "cms: $cmsVersion, sapphire: $sapphireVersion";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function SwitchView() {
|
||||
if($page = $this->currentPage()) {
|
||||
$nav = SilverStripeNavigator::get_for_record($page);
|
||||
return $nav['items'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The application name. Customisable by calling
|
||||
|
Loading…
Reference in New Issue
Block a user