Fixes for api documentation styling and manual urls.
This commit is contained in:
parent
48dbf08325
commit
d0c9c5774a
@ -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 }
|
||||
|
@ -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>
|
@ -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
|
||||
));
|
||||
|
||||
|
@ -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 }
|
||||
.toc { margin-left: 2em; padding-left: 0em }
|
||||
|
||||
#wrapper #content
|
||||
{
|
||||
margin-right: 250px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user