You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
14 KiB

3 years ago
<?php
use backend\widgets\NotificationCountWidget;
use core\helpers\LanguageHelper;
use yii\helpers\Html;
use yii\web\View;
/* @var $this View */
/* @var $content string */
?>
<header class="main-header">
<?= Html::a('<span class="logo-mini">' . (Yii::$app->params['settings']['site']['short_name'] ?? 'APP') . '</span><span class="logo-lg">' . (isset(Yii::$app->params['settings']['site']['name']) ? Yii::$app->params['settings']['site']['name'] : Yii::$app->name) . '</span>',
Yii::$app->homeUrl, ['class' => 'logo']) ?>
<nav class="navbar navbar-static-top" role="navigation">
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<!--
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<ul class="menu">
<li>
<a href="#">
<div class="pull-left">
<img src="< ?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle"
alt="User Image"/>
</div>
<h4>
Support Team
<small><i class="fa fa-clock-o"></i> 5 mins</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="< ?= $directoryAsset ?>/img/user3-128x128.jpg" class="img-circle"
alt="user image"/>
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="< ?= $directoryAsset ?>/img/user4-128x128.jpg" class="img-circle"
alt="user image"/>
</div>
<h4>
Developers
<small><i class="fa fa-clock-o"></i> Today</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="< ?= $directoryAsset ?>/img/user3-128x128.jpg" class="img-circle"
alt="user image"/>
</div>
<h4>
Sales Department
<small><i class="fa fa-clock-o"></i> Yesterday</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="< ?= $directoryAsset ?>/img/user4-128x128.jpg" class="img-circle"
alt="user image"/>
</div>
<h4>
Reviewers
<small><i class="fa fa-clock-o"></i> 2 days</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">See All Messages</a></li>
</ul>
</li>
-->
<?= NotificationCountWidget::widget() ?>
<!-- Tasks: style can be found in dropdown.less -->
<!--
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag-o"></i>
<span class="label label-danger">9</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 9 tasks</li>
<li>
<ul class="menu">
<li>
<a href="#">
<h3>
Design some buttons
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%"
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">20% Complete</span>
</div>
</div>
</a>
</li>
<li>
<a href="#">
<h3>
Create a nice theme
<small class="pull-right">40%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-green" style="width: 40%"
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">40% Complete</span>
</div>
</div>
</a>
</li>
<li>
<a href="#">
<h3>
Some task I need to do
<small class="pull-right">60%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-red" style="width: 60%"
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">60% Complete</span>
</div>
</div>
</a>
</li>
<li>
<a href="#">
<h3>
Make beautiful transitions
<small class="pull-right">80%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-yellow" style="width: 80%"
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">80% Complete</span>
</div>
</div>
</a>
</li>
</ul>
</li>
<li class="footer">
<a href="#">View all tasks</a>
</li>
</ul>
</li>
-->
<!-- Language Drop Down -->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- <i class="fa fa-language"></i> -->
<span><?= LanguageHelper::getBackendName(Yii::$app->user->identity->user->backend_language) ?>
<i class="caret"></i></span>
</a>
<ul class="dropdown-menu">
<li class="header"><?= Yii::t('main', 'Interface Language') ?></li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<?php foreach (Yii::$app->params['backendTranslatedLanguages'] as $language => $language_name): ?>
<li>
<?= Html::a($language_name, ['/site/language', 'language' => $language], [
'data-method' => 'post'
]) ?>
</li>
<?php endforeach; ?>
</ul>
</li>
</ul>
</li>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?= Yii::$app->avatar->show(Yii::$app->user->identity->user->username) ?>"
class="user-image" alt="<?= Yii::$app->user->identity->user->username ?>"/>
<span class="hidden-xs"><?= Yii::$app->user->identity->user->username ?></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="<?= Yii::$app->avatar->show(Yii::$app->user->identity->user->username) ?>"
class="img-circle"
alt="<?= Yii::$app->user->identity->user->username ?>"/>
<p>
<?= Yii::$app->user->identity->user->username ?>
<small><?= Yii::t('user', 'Registered: {date}', [
'date' => date('d.m.Y', Yii::$app->user->identity->user->created_at)
]) ?></small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<?= Html::a(
Yii::t('user', 'Profile'),
['/user/profile'],
['class' => 'btn btn-default btn-flat']
)
?>
</div>
<div class="pull-right">
<?= Html::a(
Yii::t('main', 'Sign out'),
['/auth/logout'],
['data-method' => 'post', 'class' => 'btn btn-default btn-flat']
) ?>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</header>