Exemplo n.º 1
0
<?php

use app\components\UserAvatarWidget;
use app\models\UserAccounts;
use yii\bootstrap\Nav;
?>
<aside class="main-sidebar">

    <section class="sidebar">

        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">

                <?php 
echo UserAvatarWidget::widget(['add_class' => 'pull-left margin-10-right', 'size' => 'md']);
?>
            </div>
            <div class="pull-left info">
                <p><?php 
echo Yii::$app->user->identity->name;
?>
</p>

                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>



        <?php 
Exemplo n.º 2
0
                <li class="dropdown user user-menu">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <?php 
echo UserAvatarWidget::widget(['add_class' => 'pull-left margin-10-right']);
?>
                        <span class="hidden-xs"><?php 
echo Yii::$app->user->identity->name;
?>
</span>
                    </a>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header">
                            <?php 
echo UserAvatarWidget::widget(['add_class' => 'pull-center margin-10-right', 'size' => 'lg']);
?>

                            <p>
                                <?php 
echo Yii::$app->user->identity->name;
?>
                                <small>Member since <?php 
echo Yii::$app->formatter->asDate(Yii::$app->user->identity->date_created, 'php:F d, Y');
?>
</small>
                            </p>
                        </li>

                        <!-- Menu Footer-->
                        <li class="user-footer">