From 7a444df0401a2bf726029d56a5ab410c6e057308 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 26 Jan 2018 12:12:27 +0100 Subject: [PATCH] Doc: make PDF export action reachable refs #1716 --- modules/doc/library/Doc/DocController.php | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/doc/library/Doc/DocController.php b/modules/doc/library/Doc/DocController.php index 47c96b1a9..0caf3adc9 100644 --- a/modules/doc/library/Doc/DocController.php +++ b/modules/doc/library/Doc/DocController.php @@ -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); }