Merge pull request #3325 from Icinga/bugfix/unreachable-pdf-export-documentation-1716

Doc: make PDF export action reachable
This commit is contained in:
Eric Lippmann 2018-06-08 08:42:49 -04:00 committed by GitHub
commit 23248a4f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 10 deletions

View File

@ -7,6 +7,7 @@ use Icinga\Module\Doc\Renderer\DocSectionRenderer;
use Icinga\Module\Doc\Renderer\DocTocRenderer;
use Icinga\Web\Controller;
use Icinga\Web\Url;
use Icinga\Web\Widget\Tabextension\OutputFormat;
class DocController extends Controller
{
@ -52,11 +53,13 @@ class DocController extends Controller
}
$title = $first === null ? ucfirst($chapter) : $first->getTitle();
$this->view->title = $title;
$this->getTabs()->add('toc', array(
'active' => true,
'title' => $title,
'url' => Url::fromRequest()
));
$this->getTabs()
->add('toc', array(
'active' => true,
'title' => $title,
'url' => Url::fromRequest()
))
->extend(new OutputFormat(array(OutputFormat::TYPE_CSV, OutputFormat::TYPE_JSON)));
$this->render('chapter', null, true);
}
@ -77,11 +80,13 @@ class DocController extends Controller
->setUrlParams($urlParams);
$name = ucfirst($name);
$title = sprintf($this->translate('%s Documentation'), $name);
$this->getTabs()->add('toc', array(
'active' => true,
'title' => $title,
'url' => Url::fromRequest()
));
$this->getTabs()
->add('toc', array(
'active' => true,
'title' => $title,
'url' => Url::fromRequest()
))
->extend(new OutputFormat(array(OutputFormat::TYPE_CSV, OutputFormat::TYPE_JSON)));
$this->render('toc', null, true);
}