This commit is contained in:
Glambertessa 2019-11-15 13:25:48 +03:00
parent 18ce2ce5fc
commit 4cf54e2ba6
5 changed files with 98 additions and 89 deletions

View File

@ -42,7 +42,7 @@ return [
'components' => [ 'components' => [
'request' => [ 'request' => [
'csrfParam' => '_csrf-backend', 'csrfParam' => '_csrf-backend',
'baseUrl' => 'secure', 'baseUrl' => '/secure',
], ],
'user' => [ 'user' => [
'identityClass' => 'common\models\User', 'identityClass' => 'common\models\User',
@ -69,7 +69,7 @@ return [
'enablePrettyUrl' => true, 'enablePrettyUrl' => true,
'showScriptName' => false, 'showScriptName' => false,
'rules' => [ 'rules' => [
'' => '/card/user-card' '' => '/card/user-card',
], ],
], ],

View File

@ -1,5 +1,8 @@
<?php <?php
use yii\helpers\Html; use yii\helpers\Html;
use common\classes\Debug;
use common\models\User;
/* @var $this \yii\web\View */ /* @var $this \yii\web\View */
/* @var $content string */ /* @var $content string */
@ -20,20 +23,22 @@ use yii\helpers\Html;
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less--> <!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu"> <!-- <li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i> <i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span> <span class="label label-success">4</span>
</a> </a> -->
<ul class="dropdown-menu"> <!-- <ul class="dropdown-menu">
<li class="header">You have 4 messages</li> <li class="header">You have 4 messages</li>
<li> <li> -->
<!-- inner menu: contains the actual data --> <!-- inner menu: contains the actual data -->
<ul class="menu"> <!-- <ul class="menu">
<li><!-- start message --> <li> -->
<a href="#"> <!-- start message -->
<!-- <a href="#">
<div class="pull-left"> <div class="pull-left">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" <img src="<? //= $directoryAsset
?>/img/user2-160x160.jpg" class="img-circle"
alt="User Image"/> alt="User Image"/>
</div> </div>
<h4> <h4>
@ -42,12 +47,13 @@ use yii\helpers\Html;
</h4> </h4>
<p>Why not buy a new awesome theme?</p> <p>Why not buy a new awesome theme?</p>
</a> </a>
</li> </li> -->
<!-- end message --> <!-- end message -->
<li> <!-- <li>
<a href="#"> <a href="#">
<div class="pull-left"> <div class="pull-left">
<img src="<?= $directoryAsset ?>/img/user3-128x128.jpg" class="img-circle" <img src="<? //= $directoryAsset
?>/img/user3-128x128.jpg" class="img-circle"
alt="user image"/> alt="user image"/>
</div> </div>
<h4> <h4>
@ -60,7 +66,8 @@ use yii\helpers\Html;
<li> <li>
<a href="#"> <a href="#">
<div class="pull-left"> <div class="pull-left">
<img src="<?= $directoryAsset ?>/img/user4-128x128.jpg" class="img-circle" <img src="<? //= $directoryAsset
?>/img/user4-128x128.jpg" class="img-circle"
alt="user image"/> alt="user image"/>
</div> </div>
<h4> <h4>
@ -73,7 +80,8 @@ use yii\helpers\Html;
<li> <li>
<a href="#"> <a href="#">
<div class="pull-left"> <div class="pull-left">
<img src="<?= $directoryAsset ?>/img/user3-128x128.jpg" class="img-circle" <img src="<? //= $directoryAsset
?>/img/user3-128x128.jpg" class="img-circle"
alt="user image"/> alt="user image"/>
</div> </div>
<h4> <h4>
@ -86,7 +94,8 @@ use yii\helpers\Html;
<li> <li>
<a href="#"> <a href="#">
<div class="pull-left"> <div class="pull-left">
<img src="<?= $directoryAsset ?>/img/user4-128x128.jpg" class="img-circle" <img src="<? //= $directoryAsset
?>/img/user4-128x128.jpg" class="img-circle"
alt="user image"/> alt="user image"/>
</div> </div>
<h4> <h4>
@ -96,21 +105,21 @@ use yii\helpers\Html;
<p>Why not buy a new awesome theme?</p> <p>Why not buy a new awesome theme?</p>
</a> </a>
</li> </li>
</ul> </ul> -->
</li> <!-- </li>
<li class="footer"><a href="#">See All Messages</a></li> <li class="footer"><a href="#">See All Messages</a></li>
</ul> </ul> -->
</li> <!-- </li> -->
<li class="dropdown notifications-menu"> <!-- <li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i> <i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span> <span class="label label-warning">10</span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="header">You have 10 notifications</li> <li class="header">You have 10 notifications</li>
<li> <li> -->
<!-- inner menu: contains the actual data --> <!-- inner menu: contains the actual data -->
<ul class="menu"> <!-- <ul class="menu">
<li> <li>
<a href="#"> <a href="#">
<i class="fa fa-users text-aqua"></i> 5 new members joined today <i class="fa fa-users text-aqua"></i> 5 new members joined today
@ -142,104 +151,100 @@ use yii\helpers\Html;
</li> </li>
<li class="footer"><a href="#">View all</a></li> <li class="footer"><a href="#">View all</a></li>
</ul> </ul>
</li> </li> -->
<!-- Tasks: style can be found in dropdown.less --> <!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu"> <!-- <li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-flag-o"></i> <i class="fa fa-flag-o"></i>
<span class="label label-danger">9</span> <span class="label label-danger">9</span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li class="header">You have 9 tasks</li> <li class="header">You have 9 tasks</li>
<li> <!-->
<!-- inner menu: contains the actual data --> <!-- inner menu: contains the actual data -->
<ul class="menu"> <!-- <ul class="menu">
<li><!-- Task item --> <li> -->
<a href="#"> <!-- Task item -->
<!-- <a href="#">
<h3> <h3>
Design some buttons Design some buttons
<small class="pull-right">20%</small> <small class="pull-right">20%</small>
</h3> </h3>
<div class="progress xs"> <div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">20% Complete</span> <span class="sr-only">20% Complete</span>
</div> </div>
</div> </div>
</a> </a>
</li> </li> -->
<!-- end task item --> <!-- end task item -->
<li><!-- Task item --> <!-- <li> -->
<a href="#"> <!-- Task item -->
<!-- <a href="#">
<h3> <h3>
Create a nice theme Create a nice theme
<small class="pull-right">40%</small> <small class="pull-right">40%</small>
</h3> </h3>
<div class="progress xs"> <div class="progress xs">
<div class="progress-bar progress-bar-green" style="width: 40%" <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">40% Complete</span> <span class="sr-only">40% Complete</span>
</div> </div>
</div> </div>
</a> </a> -->
</li>
<!-- end task item --> <!-- end task item -->
<li><!-- Task item --> <!-- <li> -->
<a href="#"> <!-- Task item -->
<!-- <a href="#">
<h3> <h3>
Some task I need to do Some task I need to do
<small class="pull-right">60%</small> <small class="pull-right">60%</small>
</h3> </h3>
<div class="progress xs"> <div class="progress xs">
<div class="progress-bar progress-bar-red" style="width: 60%" <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">60% Complete</span> <span class="sr-only">60% Complete</span>
</div> </div>
</div> </div>
</a> </a> -->
</li>
<!-- end task item --> <!-- end task item -->
<li><!-- Task item --> <!-- <li> -->
<a href="#"> <!-- Task item -->
<!-- <a href="#">
<h3> <h3>
Make beautiful transitions Make beautiful transitions
<small class="pull-right">80%</small> <small class="pull-right">80%</small>
</h3> </h3>
<div class="progress xs"> <div class="progress xs">
<div class="progress-bar progress-bar-yellow" style="width: 80%" <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
role="progressbar" aria-valuenow="20" aria-valuemin="0"
aria-valuemax="100">
<span class="sr-only">80% Complete</span> <span class="sr-only">80% Complete</span>
</div> </div>
</div> </div>
</a> </a> -->
</li>
<!-- end task item --> <!-- end task item -->
</ul> <!-- </ul> -->
</li>
<li class="footer"> <!-- <li class="footer">
<a href="#">View all tasks</a> <a href="#">View all tasks</a>
</li> </li>
</ul> </ul>
</li> </li> -->
<!-- User Account: style can be found in dropdown.less --> <!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu"> <li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="user-image" alt="User Image" /> <img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="user-image" alt="User Image" />
<span class="hidden-xs">Alexander Pierce</span> <span class="hidden-xs"><?= Yii::$app->user->identity->username ?></span>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<!-- User image --> <!-- User image -->
<li class="user-header"> <li class="user-header">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" <img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
alt="User Image"/>
<p> <p>
Alexander Pierce - Web Developer <?= Yii::$app->user->identity->username ?> - Web Developer
<small>Member since Nov. 2012</small> <small>Member since Nov. 2012</small>
</p> </p>
</li> </li>

View File

@ -1,6 +1,9 @@
<aside class="main-sidebar"> <aside class="main-sidebar">
<section class="sidebar"> <section class="sidebar">
<?php <?php
use common\classes\Debug;
$userStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROFILE); $userStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROFILE);
$menuItems = [['label' => 'Все', 'icon' => 'user', 'url' => ['/card/user-card']]]; $menuItems = [['label' => 'Все', 'icon' => 'user', 'url' => ['/card/user-card']]];
foreach ($userStatuses as $key => $status) { foreach ($userStatuses as $key => $status) {
@ -20,30 +23,31 @@
[ [
'label' => 'Настройки', 'icon' => 'gears', 'url' => '#', 'label' => 'Настройки', 'icon' => 'gears', 'url' => '#',
'items' => [ 'items' => [
['label' => 'Статусы', 'icon' => 'anchor', 'url' => ['/settings/status']], ['label' => 'Статусы', 'icon' => 'anchor', 'url' => ['/settings/status'], 'active' => \Yii::$app->controller->id == 'status'],
['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields']], ['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields'], 'active' => \Yii::$app->controller->id == 'additional-fields'],
['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position']], ['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position'], 'active' => \Yii::$app->controller->id == 'position'],
['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill']], ['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill'], 'active' => \Yii::$app->controller->id == 'skill'],
] ]
], ],
[ [
'label' => 'Профили', 'icon' => 'users', 'url' => '#', 'label' => 'Профили', 'icon' => 'users', 'url' => '#', 'active' => \Yii::$app->controller->id == 'user-card',
'items' => $menuItems, 'items' => $menuItems,
], ],
[ 'label' => 'Проекты', 'icon' => 'files-o', 'url' => ['#'], [
'label' => 'Проекты', 'icon' => 'files-o', 'url' => ['#'], 'active' => \Yii::$app->controller->id == 'project',
'items' => $projectItems, 'items' => $projectItems,
], ],
['label' => 'Компании', 'icon' => 'files-o', 'url' => ['/company/company']], ['label' => 'Компании', 'icon' => 'files-o', 'url' => ['/company/company']],
[ [
'label' => 'Hh.ru', 'icon' => 'user-circle', 'url' => '#', 'label' => 'Hh.ru', 'icon' => 'user-circle', 'url' => '#',
'items' => [ 'items' => [
['label' => 'Компании', 'icon' => 'building', 'url' => ['/hh/hh']], ['label' => 'Компании', 'icon' => 'building', 'url' => ['/hh/hh'], 'active' => \Yii::$app->controller->id == 'hh'],
['label' => 'Вакансии', 'icon' => 'user-md', 'url' => ['/hh/hh-job']], ['label' => 'Вакансии', 'icon' => 'user-md', 'url' => ['/hh/hh-job'], 'active' => \Yii::$app->controller->id == 'hh-job'],
], ],
], ],
['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance']], ['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance'], 'active' => \Yii::$app->controller->id == 'balance'],
['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday']], ['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday'], 'active' => \Yii::$app->controller->id == 'holiday'],
['label' => 'Доступы', 'icon' => '', 'url' => ['/accesses/accesses']], ['label' => 'Доступы', 'icon' => '', 'url' => ['/accesses/accesses'], 'active' => \Yii::$app->controller->id == 'accesses'],
/*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']], /*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']], ['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']],

View File

@ -41,12 +41,12 @@ AppAsset::register($this);
['label' => 'Home', 'url' => ['/site/index']], ['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']], ['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']], ['label' => 'Contact', 'url' => ['/site/contact']],
['label' => 'Access', 'url' => ['/access/access/index']],
]; ];
if (Yii::$app->user->isGuest) { if (Yii::$app->user->isGuest) {
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]; $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else { } else {
$menuItems[] = ['label' => 'Access', 'url' => ['/access/access/index']];
$menuItems[] = '<li>' $menuItems[] = '<li>'
. Html::beginForm(['/site/logout'], 'post') . Html::beginForm(['/site/logout'], 'post')
. Html::submitButton( . Html::submitButton(