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
17807874
Commit
17807874
authored
May 07, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue #53: implemented Menu.
parent
b703169d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
main.php
apps/bootstrap/protected/views/layouts/main.php
+11
-10
Controller.php
framework/base/Controller.php
+0
-1
Menu.php
framework/widgets/Menu.php
+0
-0
No files found.
apps/bootstrap/protected/views/layouts/main.php
View file @
17807874
...
@@ -23,16 +23,17 @@ $this->registerAssetBundle('app');
...
@@ -23,16 +23,17 @@ $this->registerAssetBundle('app');
<div
class=
"navbar"
>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<div
class=
"container"
>
<ul
class=
"nav"
>
<?php
$this
->
widget
(
'yii\widgets\Menu'
,
array
(
<li>
<?php
echo
Html
::
a
(
'Home'
,
Yii
::
$app
->
homeUrl
);
?>
</li>
'options'
=>
array
(
'class'
=>
'nav'
),
<li>
<?php
echo
Html
::
a
(
'About'
,
array
(
'/site/about'
));
?>
</li>
'items'
=>
array
(
<li>
<?php
echo
Html
::
a
(
'Contact'
,
array
(
'/site/contact'
));
?>
</li>
array
(
'label'
=>
'Home'
,
'url'
=>
array
(
'/site/index'
)),
<?php
if
(
Yii
::
$app
->
user
->
isGuest
)
:
?>
array
(
'label'
=>
'About'
,
'url'
=>
array
(
'/site/about'
)),
<li>
<?php
echo
Html
::
a
(
'Login'
,
array
(
'/site/login'
));
?>
</li>
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
<?php
else
:
?>
Yii
::
$app
->
user
->
isGuest
?
<li>
<?php
echo
Html
::
a
(
'Logout ('
.
Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
.
')'
,
array
(
'/site/logout'
));
?>
</li>
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
<?php
endif
;
?>
array
(
'label'
=>
'Logout ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
</ul>
),
));
?>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
framework/base/Controller.php
View file @
17807874
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
namespace
yii\base
;
namespace
yii\base
;
use
Yii
;
use
Yii
;
use
yii\helpers\FileHelper
;
use
yii\helpers\StringHelper
;
use
yii\helpers\StringHelper
;
/**
/**
...
...
framework/widgets/Menu.php
View file @
17807874
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