1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Fixes for api documentation styling and manual urls.

This commit is contained in:
Jonathan.Wage 2007-09-06 19:21:21 +00:00
parent 48dbf08325
commit d0c9c5774a
4 changed files with 27 additions and 17 deletions

View File

@ -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 }

View File

@ -1,11 +1,10 @@
<ul>
<li>DQL (Doctrine Query Language)</li>
<li>Native SQL</li>
<li>Class Templates</li>
<li>Hierarchical Data</li>
<li>Supports most database types</li>
<li>Transactions</li>
<li>Caching</li>
<li>Fulltext Indexing/Searching</li>
<li>Plugins</li>
<li><?php echo link_to('DQL (Doctrine Query Language)', '@manual_chapter?chapter=dql-doctrine-query-language'); ?></li>
<li><?php echo link_to('Native SQL', '@manual_chapter?chapter=native-sql'); ?></li>
<li><?php echo link_to('Class Templates', '@manual_chapter?chapter=class-templates'); ?></li>
<li><?php echo link_to('Hierarchical Data', '@manual_chapter?chapter=hierarchical-data'); ?></li>
<li><?php echo link_to('Transactions', '@manual_chapter?chapter=transactions'); ?></li>
<li><?php echo link_to('Caching', '@manual_chapter?chapter=caching'); ?></li>
<li><?php echo link_to('Searching', '@manual_chapter?chapter=searching'); ?></li>
<li><?php echo link_to('Plugins', '@manual_chapter?chapter=Plugins'); ?></li>
</ul>

View File

@ -214,9 +214,11 @@ class manualActions extends sfActions
$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
));

View File

@ -127,3 +127,8 @@ td.type,.folder-title,.method-result,.include-type{ font-style: italic; }
.cmd-synopsis { margin: 1em 0em }
.cmd-title { font-weight: bold }
.toc { margin-left: 2em; padding-left: 0em }
#wrapper #content
{
margin-right: 250px;
}