summaryrefslogtreecommitdiffstats
path: root/application/layouts/scripts/pdf.phtml
blob: 87d07f8198ef863e839c20942ea3e01e09127d1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

use Icinga\Application\Icinga;
use Icinga\Web\StyleSheet;


$moduleName = $this->layout()->moduleName;
if ($moduleName !== 'default') {
    $moduleClass = ' icinga-module module-' . $moduleName;
} else {
    $moduleClass = '';
}

$logoPath = Icinga::app()->getBootstrapDirectory() . '/img/icinga-logo-big-dark.png';
$logo = base64_encode(file_get_contents($logoPath));


?><!DOCTYPE html>
<html>
<head>
<style>
<?= StyleSheet::forPdf() ?>
</style>
<base href="<?= $this->serverUrl() ?>">
</head>
<body>
<div id="header">
  <table>
    <tbody>
      <tr>
        <th class="title"><?= $this->escape($this->title) ?></th>
        <td style="text-align: right;"><img width="75" src="data:image/png;base64,<?= $logo ?>"></td>
      </tr>
    </tbody>
  </table>
</div>
<div id="footer">
  <div class="page-number"></div>
</div>
<div class="<?= $moduleClass ?>">
    <?= $this->render('inline.phtml') ?>
</div>
</body>
</html>