navList() 공개 정적인 메소드

Generates a list navigation.
public static navList ( array $items, array $htmlOptions = [] ) : string
$items array the menu items.
$htmlOptions array additional HTML attributes.
리턴 string the generated menu.
예제 #1
0
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'List Employee'));
if (UserModule::isAdmin()) {
    $this->layout = '//layouts/column2';
}
?>

<h2><?php 
echo UserModule::t("List Employee");
?>
</h2>
<hr/>
<?php 
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $dataProvider, 'columns' => array(array('name' => 'username', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->username),array("user/view","id"=>$data->id))'), 'create_at', 'lastvisit_at')));
?>
</div>
</div>
<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Users Management'), array('label' => 'Create User', 'url' => array('/user/admin/create')), array('label' => 'Manage Users', 'url' => array('/user/admin')), array('label' => 'List Employee', 'url' => array('/user'), 'active' => true), array('label' => 'Role Users Management', 'url' => array('/rights')), array('label' => 'Profile Header'), array('label' => 'Create Profile Field', 'url' => array('/user/profileField/create')), array('label' => 'Manage Profile Field', 'url' => array('/user/profileField/admin')), array('label' => 'Another list header'), array('label' => 'Payroll Management', 'url' => array('/listgaji')), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
?>
	</div><!-- sidebar -->
</div>
예제 #2
0
?>
</div>
<div class="well goods-cat-select2 col-sm-3" style="<?php 
echo empty($cat_two) ? 'display:none;' : '';
?>
">
    <?php 
echo TbHtml::navList($cat_two);
?>
</div>
<div class="well goods-cat-select3 col-sm-3" style="<?php 
echo empty($cat_three) ? 'display:none;' : '';
?>
">
    <?php 
echo TbHtml::navList($cat_three);
?>
</div>

<div class="well well-lg col-sm-10">
    <h4 class="blue">您当前选择的类目是:</h4>
    <span class="label label-lg label-pink arrowed-right select_1"><?php 
echo isset($active['one']) && $active['one'] ? $active['one']['name'] : '';
?>
</span>
    <span class="label label-lg label-primary arrowed-right select_2"><?php 
echo isset($active['two']) && $active['two'] ? $active['two']['name'] : '';
?>
</span>
    <span class="label label-lg label-danger arrowed-right select_3"><?php 
echo isset($active['three']) && $active['three'] ? $active['three']['name'] : '';
예제 #3
0
            <div class="masthead">
                    <?php 
$this->widget('bootstrap.widgets.TbNavbar', array('brandLabel' => Yii::t('main', Yii::app()->name), 'brandUrl' => array('/manage/'), 'collapse' => true, 'items' => array(array('class' => 'bootstrap.widgets.TbNav', 'items' => array(array('label' => 'Анкети претендентів', 'url' => array('/manage/profiles'), 'visible' => Yii::app()->user->checkAccess(User::ROLE_VOLONT)), ['label' => 'Вакансіі', 'items' => [['label' => 'Перелік вакансій', 'url' => array('/manage/vacancies'), 'visible' => Yii::app()->user->checkAccess(User::ROLE_VOLONT)], ['label' => 'Компанії', 'url' => array('/manage/companies'), 'visible' => Yii::app()->user->checkAccess(User::ROLE_VOLONT)]]], array('label' => 'Роботодавець', 'visible' => Yii::app()->user->checkAccess(User::ROLE_EMPL), 'url' => array('/manage/employer')), array('label' => 'Адміністративна частина', 'items' => array(array('label' => 'Користувачі', 'url' => array('/manage/users')), TbHtml::menuDivider(), array('label' => 'Довідник категорій', 'url' => ['/manage/categories'])), 'visible' => Yii::app()->user->checkAccess(User::ROLE_ADMIN) || Yii::app()->user->checkAccess(User::ROLE_MANAGER)))), array('class' => 'bootstrap.widgets.TbNav', 'htmlOptions' => array('class' => 'pull-right'), 'items' => array(array('label' => Yii::t('main', 'Hello') . ", " . Yii::app()->session['first_name'] . " " . Yii::app()->session['last_name'] . "!", 'items' => array(array('label' => 'Мій профайл', 'url' => array('/manage/profile/'))), 'visible' => !Yii::app()->user->isGuest), array('label' => Yii::t('main', 'Logout'), 'url' => array('/manage/logout'), 'visible' => !Yii::app()->user->isGuest), array('label' => Yii::t('main', 'Login'), 'url' => array('/manage/login'), 'visible' => Yii::app()->user->isGuest))))));
?>
            </div>
            <div class="row-fluid">
            <?php 
if (!empty($this->menu)) {
    ?>
                <div class="float-menu">
                    <span class="sticker"><?php 
    echo TbHtml::icon(TbHtml::ICON_TASKS);
    ?>
</span>
                    <?php 
    echo TbHtml::navList($this->menu);
    ?>
                </div>
            <?php 
}
?>
                <?php 
if (Yii::app()->user->hasFlash('error')) {
    ?>
                        <div class="alert alert-danger">
                            <?php 
    echo Yii::app()->user->getFlash('error');
    ?>
                        </div>
                 <?php 
}
예제 #4
0
파일: view.php 프로젝트: coderay1100/morena
</table>

<table class="items table table-condensed table-bordered table-striped table-hover">
	<tbody>
		<tr>
			<td style="color:white;width:35%;padding-left:50px;background-color:green;"><b>Total Amount of Take Home Pay</b></td>
			<td style="color:white;background-color:green;"><?php 
echo 'Rp. ' . number_format($totalPendapatan - $totalPengurangan, 2, ',', '.') . ',-';
?>
</td>
		</tr>
	</tbody>
</table>

</div>
</div>

<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Payroll'), array('label' => 'Create Salary Slip', 'url' => array('/listgaji/create')), array('label' => 'Manage Payroll', 'url' => array('/listgaji')), array('label' => 'View Salary Slip Payroll', 'url' => array('/listgaji/view', 'id' => $model->id), 'active' => true), array('label' => 'Update Salary Slip Payroll', 'url' => array('/listgaji/update', 'id' => $model->id)), array('label' => 'Delete Salary Slip', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure to delete this item?')), array('label' => 'Another list header'), array('label' => 'Users Management', 'url' => array('/user/admin')), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
?>
	</div><!-- sidebar -->
</div>
예제 #5
0
/* @var $this ListgajiController */
/* @var $model Listgaji */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Error'));
?>

<h2>Error <?php 
echo $code;
?>
</h2>

<div class="error">
<?php 
echo CHtml::encode($message);
?>
</div>
</div>
</div>
<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Another list header'), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
?>
	</div><!-- sidebar -->
</div>
예제 #6
0
		<button class="btn" type="button" name="yt12" data-dismiss="modal">Close</button>
	</div>
	<?php 
$this->endWidget();
?>
</div>
		
	
	

<?php 
//=============== END OF BUTTON ADVANCED SEARCH, UPLOAD, DOWNLOAD ==============
?>
<br/><br/><br/><br/>


	</div><!-- content -->
</div>
<div class="span-6 last" style="float:left;">
	<div id="sidebar" style="float:left;">
	
	<div class="well" style="max-width: 340px; padding: 8px 0 float:left;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Payroll'), array('label' => 'My Slip', 'url' => array('/listgaji/mySlip'), 'active' => true), array('label' => 'Another list header'), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
?>
	</div><!-- sidebar -->
</div>
예제 #7
0
 public function testNavList()
 {
     $I = $this->codeGuy;
     $items = array(array('label' => 'Header text'), array('label' => 'Link', 'url' => '#'), TbHtml::menuDivider());
     $html = TbHtml::navList($items, array('stacked' => true));
     $nav = $I->createNode($html, 'ul.nav');
     $I->seeNodeCssClass($nav, 'nav-list');
     $I->dontSeeNodeCssClass($nav, 'nav-stacked');
     foreach ($nav->children() as $i => $liElement) {
         $li = $I->createNode($liElement);
         if ($i === 0) {
             $I->seeNodeCssClass($li, 'nav-header');
             $I->seeNodeText($li, 'Header text');
         } else {
             if ($i === 1) {
                 $a = $li->filter('a');
                 $I->seeNodeText($a, $items[$i]['label']);
             } else {
                 if ($i === 2) {
                     $I->seeNodeCssClass($li, 'divider');
                 }
             }
         }
     }
 }
<?php

echo TbHtml::navList(MenuItem::model()->findByPk($id)->getItems());
예제 #9
0
파일: view.php 프로젝트: coderay1100/morena
?>
</h2>
<hr/>
<?php 
$attributes = array('id', 'username');
$profileFields = ProfileField::model()->forOwner()->sort()->findAll();
if ($profileFields) {
    foreach ($profileFields as $field) {
        array_push($attributes, array('label' => UserModule::t($field->title), 'name' => $field->varname, 'type' => 'raw', 'value' => $field->widgetView($model->profile) ? $field->widgetView($model->profile) : ($field->range ? Profile::range($field->range, $model->profile->getAttribute($field->varname)) : $model->profile->getAttribute($field->varname))));
    }
}
array_push($attributes, 'password', 'email', 'activkey', 'create_at', 'lastvisit_at', array('name' => 'superuser', 'value' => User::itemAlias("AdminStatus", $model->superuser)), array('name' => 'status', 'value' => User::itemAlias("UserStatus", $model->status)));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'attributes' => $attributes));
?>
</div>
</div>

<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Users Management'), array('label' => 'Create User', 'url' => array('/user/admin/create')), array('label' => 'Manage Users', 'url' => array('/user/admin')), array('label' => 'View Users', 'url' => array('/user/admin/view', 'id' => $model->id), 'active' => true), array('label' => 'Update Users', 'url' => array('/user/admin/update', 'id' => $model->id)), array('label' => 'Delete Users', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => UserModule::t('Are you sure to delete this item?'))), array('label' => 'List Employee', 'url' => array('/user')), array('label' => 'Role Users Management', 'url' => array('/rights')), array('label' => 'Profile Header'), array('label' => 'Create Profile Field', 'url' => array('/user/profileField/create')), array('label' => 'Manage Profile Field', 'url' => array('/user/profileField/admin')), array('label' => 'Another list header'), array('label' => 'Payroll Management', 'url' => array('/listgaji')), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
?>
	</div><!-- sidebar -->
</div>
예제 #10
0
        array('label' => 'Another action', 'url' => '#'),
        array('label' => 'Something else here', 'url' => '#'),
        TbHtml::menuDivider(),
        array('label' => 'Separate link', 'url' => '#'),
    )),
)); ?>
</pre>

    <hr class="bs-docs-separator">

    <h2>Nav lists</h2>

    <div class="bs-docs-example">
        <div class="well" style="max-width: 340px; padding: 8px 0;">
            <?php 
echo TbHtml::navList(array(array('label' => 'List header'), array('label' => 'Home', 'url' => '#', 'active' => true), array('label' => 'Library', 'url' => '#'), array('label' => 'Applications', 'url' => '#'), array('label' => 'Another list header'), array('label' => 'Profile', 'url' => '#'), array('label' => 'Settings', 'url' => '#'), TbHtml::menuDivider(), array('label' => 'Help', 'url' => '#')));
?>
        </div>
    </div>

    <pre class="prettyprint linenums">
&lt;div class="well" style="max-width: 340px; padding: 8px 0;">
    &lt;?php echo TbHtml::navList(array(
        array('label' => 'List header'),
        array('label' => 'Home', 'url' => '#', 'active' => true),
        array('label' => 'Library', 'url' => '#'),
        array('label' => 'Applications', 'url' => '#'),
        array('label' => 'Another list header'),
        array('label' => 'Profile', 'url' => '#'),
        array('label' => 'Settings', 'url' => '#'),
        TbHtml::menuDivider(),
예제 #11
0
 /**
  * Ajax获取商品分类
  */
 public function actionAjaxgoodscat()
 {
     $cat_id = $this->post('cat_id');
     $GoodsCat = new GoodsCat();
     $default = $this->post('default');
     $result = $GoodsCat->CatSelect($cat_id, $default);
     $goods_select = $result['item'];
     if ($default == 0) {
         $cat_one = isset($goods_select['one']) ? $goods_select['one'] : array();
         $cat_two = isset($goods_select['two']) ? $goods_select['two'] : array();
         //$cat_three = isset($goods_select['three'])?$goods_select['three']:array();
         $cat_three = array();
         echo $this->renderPartial('_model_goods_cat', array('cat_id' => $cat_id, 'cat_one' => $cat_one, 'cat_two' => $cat_two, 'cat_three' => $cat_three, 'active' => $result['active']), true);
     } else {
         if ($default == 1) {
             $cat_two = $goods_select['two'];
             echo TbHtml::navList($cat_two);
         } else {
             if ($default == 2) {
                 $cat_three = $goods_select['three'];
                 echo TbHtml::navList($cat_three);
             }
         }
     }
 }
예제 #12
0
?>
</head>
<body>
    <div id="top">
        <?php 
echo '<div style="margin-left: 355px;">';
$this->widget('bootstrap.widgets.TbHeroUnit', array('heading' => 'Atmosphera', 'content' => Yii::t('main', 'Admin console') . TbHtml::link(Yii::t('main', 'Logout'), Yii::app()->createAbsoluteUrl('user/logout'), array('color' => TbHtml::BUTTON_COLOR_INVERSE, 'class' => 'btn fl-r')), 'htmlOptions' => array('style' => 'width:1080px; padding-top: 10px; height: 50px; margin-bottom: 0;')));
echo '</div>';
?>
    </div>

    <div id="main" class="clearfix" style="margin: 0 auto; width: 90%;">
        <div id="column" class="clearfix">
            <div id="page" class="backend-page">
                    <div class="well mr-20" style="max-width: 340px; padding: 8px 0; float: left">
                        <?php 
$controllerId = Yii::app()->controller->uniqueId;
echo TbHtml::navList(array(array('label' => Yii::t('main', 'Users'), 'icon' => 'user', 'url' => Yii::app()->createAbsoluteUrl('user/admin'), 'active' => $controllerId == 'user/admin'), array('label' => Yii::t('main', 'News'), 'icon' => 'edit', 'url' => Yii::app()->createAbsoluteUrl('news'), 'active' => $controllerId == 'news/default'), array('label' => Yii::t('main', 'Galleries'), 'icon' => 'picture', 'url' => Yii::app()->createAbsoluteUrl('portfolioposts'), 'active' => $controllerId == 'portfolioposts/default'), array('label' => Yii::t('main', 'Comments'), 'icon' => 'pencil', 'url' => Yii::app()->createAbsoluteUrl('comments'), 'active' => $controllerId == 'comments/default'), array('label' => Yii::t('main', 'Magazines'), 'icon' => 'book', 'url' => Yii::app()->createAbsoluteUrl('magazine'), 'active' => $controllerId == 'magazine/default'), array('label' => Yii::t('main', 'Tag'), 'icon' => 'tag', 'url' => Yii::app()->createAbsoluteUrl('tag'), 'active' => $controllerId == 'tag/default'), array('label' => Yii::t('main', 'Horoscope'), 'icon' => 'globe', 'url' => Yii::app()->createAbsoluteUrl('horoscope'), 'active' => $controllerId == 'horoscope/default'), array('label' => Yii::t('main', 'Partners'), 'icon' => 'briefcase', 'url' => Yii::app()->createAbsoluteUrl('partners'), 'active' => $controllerId == 'partners/default'), array('label' => Yii::t('main', 'Banners'), 'icon' => 'flag', 'url' => Yii::app()->createAbsoluteUrl('banners'), 'active' => $controllerId == 'banners/default'), array('label' => Yii::t('main', 'Contacts'), 'icon' => 'envelope', 'url' => Yii::app()->createAbsoluteUrl('contacts'), 'active' => $controllerId == 'contacts/default'), array('label' => Yii::t('main', 'About Us'), 'icon' => 'star', 'url' => Yii::app()->createAbsoluteUrl('about'), 'active' => $controllerId == 'about/default')));
?>
                    </div>
                    
                <div id="column-background"></div>
                <div id="content" class="clearfix mb-200">
                    <?php 
echo $content;
?>
                </div>
            </div>
        </div>
    </div>
</html>