From d0c9c5774ae0149517da4ea3611b7ed745133c60 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Thu, 6 Sep 2007 19:21:21 +0000 Subject: [PATCH] Fixes for api documentation styling and manual urls. --- website/apps/frontend/config/routing.yml | 4 ++++ .../main/templates/_key_features_list.php | 17 ++++++++--------- .../modules/manual/actions/actions.class.php | 16 +++++++++------- website/web/css/api_documentation.css | 7 ++++++- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/website/apps/frontend/config/routing.yml b/website/apps/frontend/config/routing.yml index d68d9fbd7..a5e421276 100644 --- a/website/apps/frontend/config/routing.yml +++ b/website/apps/frontend/config/routing.yml @@ -23,6 +23,10 @@ download: url: /download param: { module: main, action: download } +manual_chapter: + url: /documentation/manual/:chapter + param: { module: manual, action: index } + manual: url: /documentation/manual/* param: { module: manual, action: index } diff --git a/website/apps/frontend/modules/main/templates/_key_features_list.php b/website/apps/frontend/modules/main/templates/_key_features_list.php index a49ec7a44..08fd4512b 100644 --- a/website/apps/frontend/modules/main/templates/_key_features_list.php +++ b/website/apps/frontend/modules/main/templates/_key_features_list.php @@ -1,11 +1,10 @@ \ No newline at end of file diff --git a/website/apps/frontend/modules/manual/actions/actions.class.php b/website/apps/frontend/modules/manual/actions/actions.class.php index 956f29816..2ad6ab83a 100644 --- a/website/apps/frontend/modules/manual/actions/actions.class.php +++ b/website/apps/frontend/modules/manual/actions/actions.class.php @@ -213,10 +213,12 @@ class manualActions extends sfActions $this->toc = new Sensei_Doc_Toc($manualPath.'/new/docs/en.txt'); $cache->save($this->toc, 'toc'); } - + + $format = $this->getRequestParameter('format'); + // Which format to output docs - if (isset($_GET['format'])) { - $format = ucfirst(strtolower($_GET['format'])); + if ($format) { + $format = ucfirst(strtolower($format)); switch ($format) { case 'Xhtml': @@ -276,12 +278,12 @@ class manualActions extends sfActions $viewIndex = true; - if (isset($_GET['one-page'])) { + if ($this->getRequest()->hasParameter('one-page')) { $viewIndex = false; } - if (isset($_GET['chapter'])) { - $section = $this->toc->findByPath($_GET['chapter']); + if ($this->getRequest()->hasParameter('chapter')) { + $section = $this->toc->findByPath($this->getRequestParameter('chapter')); if ($section && $section->getLevel() === 1) { $title = $this->renderer->getOption('title') . ' - Chapter ' @@ -289,7 +291,7 @@ class manualActions extends sfActions $this->renderer->setOptions(array( 'section' => $section, - 'url_prefix' => '?chapter=', + 'url_prefix' => 'manual/', 'title' => $title )); diff --git a/website/web/css/api_documentation.css b/website/web/css/api_documentation.css index 774776f18..ddc15285d 100644 --- a/website/web/css/api_documentation.css +++ b/website/web/css/api_documentation.css @@ -126,4 +126,9 @@ td.type,.folder-title,.method-result,.include-type{ font-style: italic; } color: #333333; } .cmd-synopsis { margin: 1em 0em } .cmd-title { font-weight: bold } -.toc { margin-left: 2em; padding-left: 0em } \ No newline at end of file +.toc { margin-left: 2em; padding-left: 0em } + +#wrapper #content +{ + margin-right: 250px; +} \ No newline at end of file