コード例 #1
0
ファイル: main.php プロジェクト: vastander/yii2-eer
    <title><?php 
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>
    <?php 
$this->beginBody();
?>
    <div class="wrap">
        <?php 
NavBar::begin(['brandLabel' => 'Администрирование', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
$menuItems = [YearHelper::getDropDownArray('Учебный год')];
if (!Yii::$app->user->isGuest) {
    $menuItems = array_merge($menuItems, [['label' => ' Управление пользователями', 'url' => ['/user/main/index', 'idParent' => Yii::$app->user->identity->id_faculty]], ['label' => Yii::$app->user->identity->username . ' - Выход', 'url' => ['/site/logout']]]);
}
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>

        <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo Alert::widget();
?>
        <?php 
コード例 #2
0
ファイル: main.php プロジェクト: vastander/yii2-eer
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>
    <?php 
$this->beginBody();
?>
    <div class="wrap">

        <?php 
NavBar::begin(['brandLabel' => '<span class="brand_text">Результаты освоения образовательных программ</span>', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['id' => 'mainMenu', 'class' => 'navbar-fixed-top']]);
$menuItems = [YearHelper::getDropDownArray()];
if (Yii::$app->user->isGuest) {
    $msg = ['label' => 'Войти', 'url' => ['/site/login'], 'class' => 'navbar-link'];
} else {
    $msg = ['label' => Yii::$app->user->identity->username . ' Выход', 'url' => ['/site/logout'], 'class' => 'navbar-link'];
}
$menuItems[] = $msg;
echo Nav::widget(['options' => ['id' => 'mainNav', 'class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>
		
		<div class="jumbotron">
			<div class="container">
				<?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>