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
afda91e0
Commit
afda91e0
authored
Feb 07, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2361: `yii\bootstrap\NavBar::brandUrl` should default to the home URL of application
parent
89f9f0e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGELOG.md
extensions/bootstrap/CHANGELOG.md
+1
-0
NavBar.php
extensions/bootstrap/NavBar.php
+4
-3
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
No files found.
extensions/bootstrap/CHANGELOG.md
View file @
afda91e0
...
@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -4,6 +4,7 @@ Yii Framework 2 bootstrap extension Change Log
2.
0.0 beta under development
2.
0.0 beta under development
----------------------------
----------------------------
-
Bug #2361:
`yii\bootstrap\NavBar::brandUrl`
should default to the home URL of application (qiangxue)
-
Enh #1474: Added option to make NavBar 100% width (cebe)
-
Enh #1474: Added option to make NavBar 100% width (cebe)
-
Enh #1553: Only add navbar-default class to NavBar when no other class is specified (cebe)
-
Enh #1553: Only add navbar-default class to NavBar when no other class is specified (cebe)
-
Enh #1601: Added support for tagName and encodeLabel parameters in ButtonDropdown (omnilight)
-
Enh #1601: Added support for tagName and encodeLabel parameters in ButtonDropdown (omnilight)
...
...
extensions/bootstrap/NavBar.php
View file @
afda91e0
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
yii\bootstrap
;
namespace
yii\bootstrap
;
use
Yii
;
use
yii\helpers\Html
;
use
yii\helpers\Html
;
/**
/**
...
@@ -43,9 +44,9 @@ class NavBar extends Widget
...
@@ -43,9 +44,9 @@ class NavBar extends Widget
public
$brandLabel
;
public
$brandLabel
;
/**
/**
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Html::url()]]
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Html::url()]]
* and will be used for the "href" attribute of the brand link.
Defaults to site root
.
* and will be used for the "href" attribute of the brand link.
If not set, [[\yii\web\Application::homeUrl]] will be used
.
*/
*/
public
$brandUrl
=
'/'
;
public
$brandUrl
;
/**
/**
* @var array the HTML attributes of the brand link.
* @var array the HTML attributes of the brand link.
*/
*/
...
@@ -84,7 +85,7 @@ class NavBar extends Widget
...
@@ -84,7 +85,7 @@ class NavBar extends Widget
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'navbar-header'
]);
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'navbar-header'
]);
echo
$this
->
renderToggleButton
();
echo
$this
->
renderToggleButton
();
if
(
$this
->
brandLabel
!==
null
)
{
if
(
$this
->
brandLabel
!==
null
)
{
echo
Html
::
a
(
$this
->
brandLabel
,
$this
->
brandUrl
,
$this
->
brandOptions
);
echo
Html
::
a
(
$this
->
brandLabel
,
$this
->
brandUrl
===
null
?
Yii
::
$app
->
homeUrl
:
$this
->
brandUrl
,
$this
->
brandOptions
);
}
}
echo
Html
::
endTag
(
'div'
);
echo
Html
::
endTag
(
'div'
);
...
...
framework/CHANGELOG.md
View file @
afda91e0
...
@@ -45,6 +45,7 @@ Yii Framework 2 Change Log
...
@@ -45,6 +45,7 @@ Yii Framework 2 Change Log
-
Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
-
Bug #2298: Fixed the bug that Gii controller generator did not allow digit in the controller ID (qiangxue)
-
Bug #2303: Fixed the bug that
`yii\base\Theme::pathMap`
did not support dynamic update with path aliases (qiangxue)
-
Bug #2303: Fixed the bug that
`yii\base\Theme::pathMap`
did not support dynamic update with path aliases (qiangxue)
-
Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
-
Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
-
Bug #2361:
`yii\bootstrap\NavBar::brandUrl`
should default to the home URL of application (qiangxue)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
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