parent
97261cd8bd
commit
57a0b0005e
|
@ -2,5 +2,5 @@
|
||||||
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= /** @type \Icinga\Module\Doc\DocSectionRenderer $section */ $section ?>
|
<?= /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<h1><?= $docName ?> <?= $this->translate('Documentation'); ?></h1>
|
<div class="content">
|
||||||
<div class="toc">
|
<h1><?= /** @type string $title */ $title ?></h1>
|
||||||
<?= $tocRenderer->render($this, $this->getHelper('Url')); ?>
|
<?= /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
||||||
</div>
|
<?= /** @type \Icinga\Module\Doc\Renderer\DocSectionRenderer $section */ $section ?>
|
||||||
<div class="chapter">
|
|
||||||
<?= $sectionRenderer->render($this, $this->getHelper('Url')); ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
<h1><?= /** @type string $title */ $title ?></h1>
|
<h1><?= /** @type string $title */ $title ?></h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?= /** @type \Icinga\Module\Doc\DocTocRenderer $toc */ $toc ?>
|
<?= /** @type \Icinga\Module\Doc\Renderer\DocTocRenderer $toc */ $toc ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,6 @@ class DocController extends ModuleActionController
|
||||||
->setUrl($url)
|
->setUrl($url)
|
||||||
->setUrlParams($urlParams);
|
->setUrlParams($urlParams);
|
||||||
$name = ucfirst($name);
|
$name = ucfirst($name);
|
||||||
$this->view->docName = $name;
|
|
||||||
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
|
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
|
||||||
$this->render('toc', null, true);
|
$this->render('toc', null, true);
|
||||||
}
|
}
|
||||||
|
@ -61,17 +60,16 @@ class DocController extends ModuleActionController
|
||||||
protected function renderPdf($path, $name, $url, array $urlParams = array())
|
protected function renderPdf($path, $name, $url, array $urlParams = array())
|
||||||
{
|
{
|
||||||
$parser = new DocParser($path);
|
$parser = new DocParser($path);
|
||||||
$docTree = $parser->getDocTree();
|
$toc = new DocTocRenderer($parser->getDocTree()->getIterator());
|
||||||
$this->view->tocRenderer = new TocRenderer($docTree, $url, $urlParams);
|
$this->view->toc = $toc
|
||||||
$this->view->sectionRenderer = new SectionRenderer(
|
->setUrl($url)
|
||||||
$docTree,
|
->setUrlParams($urlParams);
|
||||||
null,
|
$section = new DocSectionRenderer($parser->getDocTree());
|
||||||
null,
|
$this->view->section = $section
|
||||||
$url,
|
->setUrl($url)
|
||||||
$urlParams
|
->setUrlParams($urlParams);
|
||||||
);
|
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
|
||||||
$this->view->docName = $name;
|
|
||||||
$this->_request->setParam('format', 'pdf');
|
$this->_request->setParam('format', 'pdf');
|
||||||
$this->render('pdf', null, true);
|
$this->_helper->viewRenderer->setRender('pdf', null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue