mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
This forces the browser (in case of the pdfexport module) to perform a network request. Otherwise there's no way (currently) to know what the browser does or cannot do. File resource loading isn't logged through the CDP.
53 lines
1.1 KiB
PHTML
53 lines
1.1 KiB
PHTML
<?php
|
|
|
|
use Icinga\Web\StyleSheet;
|
|
|
|
|
|
$moduleName = $this->layout()->moduleName;
|
|
if ($moduleName !== 'default') {
|
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
|
} else {
|
|
$moduleClass = '';
|
|
}
|
|
|
|
|
|
?><!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
<?= StyleSheet::forPdf() ?>
|
|
</style>
|
|
<base href="<?= $this->serverUrl() ?>">
|
|
</head>
|
|
<body>
|
|
<script type="text/php">
|
|
// This attempt doesn't work :(
|
|
if ( isset($pdf) )
|
|
{
|
|
$w = $pdf->get_width();
|
|
$h = $pdf->get_height();
|
|
$font = Font_Metrics::get_font("helvetica");
|
|
$pdf->page_text($w -100, $h - 40, "Page {PAGE_NUM} of {PAGE_COUNT}", $font, 10, array(0,0,0));
|
|
}
|
|
|
|
</script>
|
|
<?= $this->img('img/icinga-logo-big-dark.png', null, array('align' => 'right', 'width' => '75')) ?>
|
|
<!--<div id="page-header">
|
|
<table>
|
|
<tr>
|
|
<td><?= $this->escape($this->title) ?></td>
|
|
<td style="text-align: right;"></td>
|
|
</tr>
|
|
</table>
|
|
</div>-->
|
|
<h1><?= $this->escape($this->title) ?></h1>
|
|
<div id="col1" class="container<?= $moduleClass ?>">
|
|
<?= $this->render('inline.phtml') ?>
|
|
</div>
|
|
|
|
<div id="page-footer">
|
|
<div class="page-number"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|