Example #1
0
/**
 * @var \maddoger\admin\Module $adminModule
 */
$adminModule = Module::getInstance();
?>
    <!-- Sidebar user panel -->
    <div class="user-panel">
        <?php 
/**
 * @var \maddoger\user\common\models\User $user
 */
$user = Yii::$app->user->getIdentity();
if ($user && isset($user->avatar) && !empty($user->avatar)) {
    echo Html::tag('div', Html::a(Html::img($user->avatar, ['class' => 'img-circle', 'alt' => Yii::t('maddoger/admin', 'Avatar')]), ['/user/user/profile']), ['class' => 'pull-left image']);
}
?>
        <div class="pull-left info">
            <?php 
if ($user) {
    echo Html::a(Yii::t('maddoger/admin', 'Hello<br />{username}', ['username' => Html::encode($user->getName())]), ['/user/user/profile']);
}
?>
        </div>
    </div>

<?php 
echo SearchForm::widget(['options' => ['class' => 'sidebar-form'], 'clientOptions' => ['width' => 228]]);
?>

<?php 
echo $this->render($adminModule->sidebarMenuView);
Example #2
0
<div class="error-page">
    <h2 class="headline text-info"> <?php 
echo $code;
?>
</h2>

    <div class="error-content">
        <h3><i class="fa fa-warning text-yellow"></i> <?php 
echo Html::encode($this->title);
?>
</h3>

        <p class="message">
            <?php 
echo nl2br(Html::encode($message));
?>
        </p>
        <?php 
if (!Yii::$app->user->isGuest) {
    ?>
            <?php 
    echo SearchForm::widget(['options' => ['class' => 'search-form']]);
    ?>

        <?php 
}
?>
    </div>
    <!-- /.error-content -->
</div><!-- /.error-page -->