*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use yii\helpers\Html;
use yii\widgets\Menu;
/** @var \Da\User\Model\User $user */
$user = Yii::$app->user->identity;
$networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
?>
= Html::img(
$user->profile->getAvatarUrl(24),
[
'class' => 'img-rounded',
'alt' => $user->username,
]
) ?>
= $user->username ?>
= Menu::widget(
[
'options' => [
'class' => 'nav nav-pills nav-stacked',
],
'items' => [
['label' => Yii::t('usuario', 'Profile'), 'url' => ['/user/settings/profile']],
['label' => Yii::t('usuario', 'Account'), 'url' => ['/user/settings/account']],
[
'label' => Yii::t('usuario', 'Networks'),
'url' => ['/user/settings/networks'],
'visible' => $networksVisible,
],
],
]
) ?>