mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
layout.phtml: Setup the Icinga js object with the user's locale and timezone
This commit is contained in:
parent
c202eccf65
commit
04b906bff5
@ -11,6 +11,7 @@ if (array_key_exists('_dev', $_GET)) {
|
|||||||
$cssfile = 'css/icinga.min.css';
|
$cssfile = 'css/icinga.min.css';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$timezone = date_default_timezone_get();
|
||||||
$lang = Translator::splitLocaleCode()->language;
|
$lang = Translator::splitLocaleCode()->language;
|
||||||
$isIframe = $this->layout()->isIframe;
|
$isIframe = $this->layout()->isIframe;
|
||||||
$showFullscreen = $this->layout()->showFullscreen;
|
$showFullscreen = $this->layout()->showFullscreen;
|
||||||
@ -93,7 +94,9 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.name = '<?= $this->protectId('Icinga') ?>';
|
window.name = '<?= $this->protectId('Icinga') ?>';
|
||||||
var icinga = new Icinga({
|
var icinga = new Icinga({
|
||||||
baseUrl: '<?= $this->baseUrl(); ?>'
|
baseUrl: '<?= $this->baseUrl(); ?>',
|
||||||
|
locale: '<?= $lang; ?>',
|
||||||
|
timezone: '<?= $timezone ?>'
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user