Skip to content

Instantly share code, notes, and snippets.

Created September 7, 2012 21:46
Show Gist options
  • Save anonymous/3669973 to your computer and use it in GitHub Desktop.
Save anonymous/3669973 to your computer and use it in GitHub Desktop.
<?php
$this->widget('bootstrap.widgets.TbNavbar', array(
'type' => 'inverse', // null or 'inverse'
'brand' => 'Sizely!',
'brandUrl' => array('/site/index'),
'collapse' => true, // requires bootstrap-responsive.css
'items' => array(
array(
'class' => 'bootstrap.widgets.TbMenu',
'type' => 'pills',
'items' => array(
array('label' => 'Home', 'icon' => 'home white', 'url' => array('/site/index')),
array('label' => 'View','icon' => 'eye-open white', 'url' => '#', 'items' => array(
array('label' => 'Items:', 'icon'=>'file'),
array('label' => 'Objects List', 'url' => array('/object/index')),
array('label' => 'People List', 'url' => array('/person/index')),
array('label' => 'Wildlife List', 'url' => array('/wildlife/index')),
'---',
array('label' => 'Comparisons:', 'icon'=>'random'),
array('label' => 'Comparisons List', 'url' => array('/compare/index')),
)),
array('label' => 'About', 'icon' => 'info-sign white', 'url' => array('/site/page', 'view' => 'about')),
array('label' => 'Contact', 'icon' => 'envelope white', 'url' => array('/site/contact')),
)),
array(
'class' => 'bootstrap.widgets.TbMenu',
'type' => 'pills',
'htmlOptions' => array('class' => 'pull-right'),
'items' => array(
array('label' => 'Edit','icon' => 'cog white', 'url' => '#', 'items' => array(
array('label' => 'Items:', 'icon'=>'file'),
array('label' => 'Manage Objects', 'url' => array('/object/admin')),
array('label' => 'Manage People', 'url' => array('/person/admin')),
array('label' => 'Manage Wildlife', 'url' => array('/wildlife/admin')),
'---',
array('label' => 'Comparisons:', 'icon'=>'random'),
array('label' => 'Manage Comparisons', 'url' => array('/compare/admin')),
'---',
array('label' => 'Comments:', 'icon'=>'comment'),
array('label' => 'Manage Item Comments', 'url' => array('/comment/admin')),
array('label' => 'Manage Comparison Comments', 'url' => array('/cmpComments/admin')),
'---',
array('label' => 'Lookup Table:', 'icon'=>'list-alt'),
array('label' => 'Manage Lookup Entries', 'url' => array('/lookup/admin')),
'---',
array('label' => 'Users:', 'icon'=>'user'),
array('label' => 'Manage Users', 'url' => array('/user/admin')),
array('label' => 'Manage User Groups', 'url' => array('/usergroups/admin')),
), 'visible' => Yii::app()->user->isAdmin()),
array('label' => 'Login', 'icon' => 'user white', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
array('label' => 'Logout (' . Yii::app()->user->name . ')', 'icon' => 'user white', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest),
),
),
'<ul class="pull-right nav nav-pills"><li class="divider-vertical"></li></ul>',
'<ul class="pull-right nav nav-pills">
<li>
<a href="#" class="dropdown-toggle"
onclick="show_visitorPrefsModal()">
<i class="icon-wrench icon-white"></i>&nbsp;Settings
</a>
</li>
</ul>',
),
)
);
?>
</div><!-- mainmenu -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment