Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
39a2e1ef
Commit
39a2e1ef
authored
May 04, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted guide renderer to new guide structure
parent
bfaa5f31
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
GuideController.php
extensions/apidoc/commands/GuideController.php
+0
-3
guide.php
extensions/apidoc/templates/bootstrap/layouts/guide.php
+8
-3
main.php
extensions/apidoc/templates/bootstrap/layouts/main.php
+1
-1
No files found.
extensions/apidoc/commands/GuideController.php
View file @
39a2e1ef
...
@@ -83,9 +83,6 @@ class GuideController extends BaseController
...
@@ -83,9 +83,6 @@ class GuideController extends BaseController
*/
*/
protected
function
findFiles
(
$path
,
$except
=
[])
protected
function
findFiles
(
$path
,
$except
=
[])
{
{
if
(
empty
(
$except
))
{
$except
=
[
'README.md'
];
}
$path
=
FileHelper
::
normalizePath
(
$path
);
$path
=
FileHelper
::
normalizePath
(
$path
);
$options
=
[
$options
=
[
'only'
=>
[
'*.md'
],
'only'
=>
[
'*.md'
],
...
...
extensions/apidoc/templates/bootstrap/layouts/guide.php
View file @
39a2e1ef
...
@@ -14,11 +14,16 @@ $this->beginContent('@yii/apidoc/templates/bootstrap/layouts/main.php'); ?>
...
@@ -14,11 +14,16 @@ $this->beginContent('@yii/apidoc/templates/bootstrap/layouts/main.php'); ?>
<?php
<?php
asort
(
$headlines
);
asort
(
$headlines
);
$nav
=
[];
$nav
=
[];
foreach
(
$headlines
as
$file
=>
$headline
)
{
if
(
basename
(
$file
)
==
'README.md'
)
{
$nav
[]
=
[
$nav
[]
=
[
'label'
=>
'Index'
,
'label'
=>
$headline
,
'url'
=>
$this
->
context
->
generateGuideUrl
(
'index.md'
),
'url'
=>
$this
->
context
->
generateGuideUrl
(
$file
),
'active'
=>
isset
(
$currentFile
)
&&
(
basename
(
$currentFile
)
==
'index.md'
),
'active'
=>
isset
(
$currentFile
)
&&
(
$file
==
$currentFile
),
];
];
unset
(
$headlines
[
$file
]);
}
}
foreach
(
$headlines
as
$file
=>
$headline
)
{
foreach
(
$headlines
as
$file
=>
$headline
)
{
$nav
[]
=
[
$nav
[]
=
[
'label'
=>
$headline
,
'label'
=>
$headline
,
...
...
extensions/apidoc/templates/bootstrap/layouts/main.php
View file @
39a2e1ef
...
@@ -64,7 +64,7 @@ $this->beginPage();
...
@@ -64,7 +64,7 @@ $this->beginPage();
}
}
if
(
$this
->
context
->
guideUrl
!==
null
)
{
if
(
$this
->
context
->
guideUrl
!==
null
)
{
$nav
[]
=
[
'label'
=>
'Guide'
,
'url'
=>
rtrim
(
$this
->
context
->
guideUrl
,
'/'
)
.
'/'
.
BaseRenderer
::
GUIDE_PREFIX
.
'
index
.html'
];
$nav
[]
=
[
'label'
=>
'Guide'
,
'url'
=>
rtrim
(
$this
->
context
->
guideUrl
,
'/'
)
.
'/'
.
BaseRenderer
::
GUIDE_PREFIX
.
'
README
.html'
];
}
}
echo
Nav
::
widget
([
echo
Nav
::
widget
([
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment