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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
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
Hide 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');
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<ul
class=
"nav"
>
<li>
<?php
echo
Html
::
a
(
'Home'
,
Yii
::
$app
->
homeUrl
);
?>
</li>
<li>
<?php
echo
Html
::
a
(
'About'
,
array
(
'/site/about'
));
?>
</li>
<li>
<?php
echo
Html
::
a
(
'Contact'
,
array
(
'/site/contact'
));
?>
</li>
<?php
if
(
Yii
::
$app
->
user
->
isGuest
)
:
?>
<li>
<?php
echo
Html
::
a
(
'Login'
,
array
(
'/site/login'
));
?>
</li>
<?php
else
:
?>
<li>
<?php
echo
Html
::
a
(
'Logout ('
.
Html
::
encode
(
Yii
::
$app
->
user
->
identity
->
username
)
.
')'
,
array
(
'/site/logout'
));
?>
</li>
<?php
endif
;
?>
</ul>
<?php
$this
->
widget
(
'yii\widgets\Menu'
,
array
(
'options'
=>
array
(
'class'
=>
'nav'
),
'items'
=>
array
(
array
(
'label'
=>
'Home'
,
'url'
=>
array
(
'/site/index'
)),
array
(
'label'
=>
'About'
,
'url'
=>
array
(
'/site/about'
)),
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
Yii
::
$app
->
user
->
isGuest
?
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
array
(
'label'
=>
'Logout ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
),
));
?>
</div>
</div>
</div>
...
...
framework/base/Controller.php
View file @
17807874
...
...
@@ -8,7 +8,6 @@
namespace
yii\base
;
use
Yii
;
use
yii\helpers\FileHelper
;
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