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