Пример #1
0
<?php

use common\models\Category;
$tree = Category::find()->addOrderBy('root, lft')->all();
$tree = Category::menu($tree);
$auth_user = $this->context->auth_user;
?>
<aside class="main-sidebar">
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <?php 
echo $auth_user->renderAvatar(['class' => 'img-circle']);
?>
            </div>
            <div class="pull-left info">
                <p><?php 
echo $auth_user->getFullName();
?>
</p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <!-- search form -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search..."/>
              <span class="input-group-btn">
                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>
                </button>