Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
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
夏彬
yii2bootstrap
Commits
9d72ead1
Commit
9d72ead1
authored
Aug 07, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4595: more consistend use of "false" in "don't use" case
parent
83489d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
CHANGELOG.md
CHANGELOG.md
+2
-1
NavBar.php
NavBar.php
+8
-7
No files found.
CHANGELOG.md
View file @
9d72ead1
...
...
@@ -8,9 +8,10 @@ Yii Framework 2 bootstrap extension Change Log
-
Bug #3740: Fixed duplicate error message when client validation is enabled (tadaszelvys)
-
Bug #3749: Fixed invalid plugin registration and ensure clickable links in dropdown (kartik-v)
-
Enh #4024: Added ability to
`yii\bootstrap\Tabs`
to encode each
`Tabs::items['label']`
separately (creocoder, umneeq)
-
Chg #3036: Upgraded Twitter Bootstrap to 3.1.x (qiangxue)
-
Enh #4120: Added ability for each item to choose it's encoding option in
`Dropdown`
and
`Nav`
(Alex-Code)
-
Enh #4363: Added
`showIndicators`
property to make Carousel indicators optional (sdkiller)
-
Chg #3036: Upgraded Twitter Bootstrap to 3.1.x (qiangxue)
-
Chg #4595:
`yii\bootstrap\NavBar`
's
`brandLabel`
and
`brandUrl`
are taking
`false`
instead of
`null`
for "don't use" case (samdark)
2.
0.0-beta April 13, 2014
-------------------------
...
...
NavBar.php
View file @
9d72ead1
...
...
@@ -56,15 +56,16 @@ class NavBar extends Widget
*/
public
$containerOptions
=
[];
/**
* @var string
the text of the bran
d. Note that this is not HTML-encoded.
* @var string
|boolean the text of the brand of false if it's not use
d. Note that this is not HTML-encoded.
* @see http://getbootstrap.com/components/#navbar
*/
public
$brandLabel
;
public
$brandLabel
=
false
;
/**
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]]
* and will be used for the "href" attribute of the brand link. If not set, [[\yii\web\Application::homeUrl]] will be used.
* @param array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]]
* and will be used for the "href" attribute of the brand link. Default value is false that means
* [[\yii\web\Application::homeUrl]] will be used.
*/
public
$brandUrl
;
public
$brandUrl
=
false
;
/**
* @var array the HTML attributes of the brand link.
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
...
...
@@ -115,9 +116,9 @@ class NavBar extends Widget
$this
->
containerOptions
[
'id'
]
=
"
{
$this
->
options
[
'id'
]
}
-collapse"
;
}
echo
$this
->
renderToggleButton
();
if
(
$this
->
brandLabel
!==
null
)
{
if
(
$this
->
brandLabel
!==
false
)
{
Html
::
addCssClass
(
$this
->
brandOptions
,
'navbar-brand'
);
echo
Html
::
a
(
$this
->
brandLabel
,
$this
->
brandUrl
===
null
?
Yii
::
$app
->
homeUrl
:
$this
->
brandUrl
,
$this
->
brandOptions
);
echo
Html
::
a
(
$this
->
brandLabel
,
$this
->
brandUrl
===
false
?
Yii
::
$app
->
homeUrl
:
$this
->
brandUrl
,
$this
->
brandOptions
);
}
echo
Html
::
endTag
(
'div'
);
Html
::
addCssClass
(
$this
->
containerOptions
,
'collapse'
);
...
...
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