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
fca81434
Commit
fca81434
authored
10 years ago
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved guide and api doc header and titles
fixes #7069 fixes #7031
parent
4e39381d
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
7 deletions
+22
-7
api.php
extensions/apidoc/templates/bootstrap/layouts/api.php
+1
-1
guide.php
extensions/apidoc/templates/bootstrap/layouts/guide.php
+11
-1
main.php
extensions/apidoc/templates/bootstrap/layouts/main.php
+9
-1
ApiRenderer.php
extensions/apidoc/templates/html/ApiRenderer.php
+0
-3
GuideRenderer.php
extensions/apidoc/templates/html/GuideRenderer.php
+1
-1
No files found.
extensions/apidoc/templates/bootstrap/layouts/api.php
View file @
fca81434
...
...
@@ -11,7 +11,7 @@ use yii\helpers\StringHelper;
/** @var $renderer ApiRenderer */
$renderer
=
$this
->
context
;
$this
->
beginContent
(
'@yii/apidoc/templates/bootstrap/layouts/main.php'
);
?>
$this
->
beginContent
(
'@yii/apidoc/templates/bootstrap/layouts/main.php'
,
isset
(
$type
)
?
[
'type'
=>
$type
]
:
[]
);
?>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
...
...
This diff is collapsed.
Click to expand it.
extensions/apidoc/templates/bootstrap/layouts/guide.php
View file @
fca81434
...
...
@@ -6,7 +6,17 @@ use yii\apidoc\templates\bootstrap\SideNavWidget;
/* @var $content string */
/* @var $chapters array */
$this
->
beginContent
(
'@yii/apidoc/templates/bootstrap/layouts/main.php'
);
?>
if
(
isset
(
$currentFile
))
{
foreach
(
$chapters
as
$chapter
)
{
foreach
(
$chapter
[
'content'
]
as
$chContent
)
{
if
(
$chContent
[
'file'
]
==
basename
(
$currentFile
))
{
$guideHeadline
=
"
{
$chContent
[
'headline'
]
}
-
{
$chapter
[
'headline'
]
}
"
;
}
}
}
}
$this
->
beginContent
(
'@yii/apidoc/templates/bootstrap/layouts/main.php'
,
isset
(
$guideHeadline
)
?
[
'guideHeadline'
=>
$guideHeadline
]
:
[]);
?>
<div
class=
"row"
>
<div
class=
"col-md-2"
>
...
...
This diff is collapsed.
Click to expand it.
extensions/apidoc/templates/bootstrap/layouts/main.php
View file @
fca81434
...
...
@@ -3,6 +3,7 @@
use
yii\bootstrap\Nav
;
use
yii\bootstrap\NavBar
;
use
yii\helpers\Html
;
use
yii\helpers\StringHelper
;
/* @var $this yii\web\View */
...
...
@@ -29,7 +30,14 @@ $this->beginPage();
<meta
name=
"language"
content=
"en"
/>
<?=
Html
::
csrfMetaTags
()
?>
<?php
$this
->
head
()
?>
<title>
<?=
Html
::
encode
(
$this
->
context
->
pageTitle
)
?>
</title>
<title>
<?php
if
(
isset
(
$type
))
{
echo
Html
::
encode
(
StringHelper
::
basename
(
$type
->
name
)
.
",
{
$type
->
name
}
-
{
$this
->
context
->
pageTitle
}
"
);
}
elseif
(
isset
(
$guideHeadline
))
{
echo
Html
::
encode
(
"
$guideHeadline
-
{
$this
->
context
->
pageTitle
}
"
);
}
else
{
echo
Html
::
encode
(
$this
->
context
->
pageTitle
);
}
?>
</title>
</head>
<body>
...
...
This diff is collapsed.
Click to expand it.
extensions/apidoc/templates/html/ApiRenderer.php
View file @
fca81434
...
...
@@ -102,9 +102,7 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
Console
::
startProgress
(
0
,
$typeCount
,
'Rendering files: '
,
false
);
}
$done
=
0
;
$oldTitle
=
$this
->
pageTitle
;
foreach
(
$types
as
$type
)
{
$this
->
pageTitle
=
StringHelper
::
basename
(
$type
->
name
)
.
",
{
$type
->
name
}
-
$oldTitle
"
;
$fileContent
=
$this
->
renderWithLayout
(
$this
->
typeView
,
[
'type'
=>
$type
,
'apiContext'
=>
$context
,
...
...
@@ -116,7 +114,6 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
Console
::
updateProgress
(
++
$done
,
$typeCount
);
}
}
$this
->
pageTitle
=
$oldTitle
;
$indexFileContent
=
$this
->
renderWithLayout
(
$this
->
indexView
,
[
'apiContext'
=>
$context
,
...
...
This diff is collapsed.
Click to expand it.
extensions/apidoc/templates/html/GuideRenderer.php
View file @
fca81434
...
...
@@ -43,7 +43,7 @@ abstract class GuideRenderer extends BaseGuideRenderer
parent
::
init
();
if
(
$this
->
pageTitle
===
null
)
{
$this
->
pageTitle
=
'
Yii Framework 2.0 API Documentation'
;
// TODO guess page title
$this
->
pageTitle
=
'
The Definitive Guide to Yii 2.0'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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