меню
This commit is contained in:
parent
18ce2ce5fc
commit
4cf54e2ba6
@ -42,7 +42,7 @@ return [
|
||||
'components' => [
|
||||
'request' => [
|
||||
'csrfParam' => '_csrf-backend',
|
||||
'baseUrl' => 'secure',
|
||||
'baseUrl' => '/secure',
|
||||
],
|
||||
'user' => [
|
||||
'identityClass' => 'common\models\User',
|
||||
@ -69,7 +69,7 @@ return [
|
||||
'enablePrettyUrl' => true,
|
||||
'showScriptName' => false,
|
||||
'rules' => [
|
||||
'' => '/card/user-card'
|
||||
'' => '/card/user-card',
|
||||
],
|
||||
],
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use common\classes\Debug;
|
||||
use common\models\User;
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $content string */
|
||||
@ -20,20 +23,22 @@ use yii\helpers\Html;
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<!-- 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">
|
||||
<i class="fa fa-envelope-o"></i>
|
||||
<span class="label label-success">4</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
</a> -->
|
||||
<!-- <ul class="dropdown-menu">
|
||||
<li class="header">You have 4 messages</li>
|
||||
<li>
|
||||
<li> -->
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li><!-- start message -->
|
||||
<a href="#">
|
||||
<!-- <ul class="menu">
|
||||
<li> -->
|
||||
<!-- start message -->
|
||||
<!-- <a href="#">
|
||||
<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"/>
|
||||
</div>
|
||||
<h4>
|
||||
@ -42,12 +47,13 @@ use yii\helpers\Html;
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
<!-- end message -->
|
||||
<li>
|
||||
<!-- <li>
|
||||
<a href="#">
|
||||
<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"/>
|
||||
</div>
|
||||
<h4>
|
||||
@ -60,7 +66,8 @@ use yii\helpers\Html;
|
||||
<li>
|
||||
<a href="#">
|
||||
<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"/>
|
||||
</div>
|
||||
<h4>
|
||||
@ -73,7 +80,8 @@ use yii\helpers\Html;
|
||||
<li>
|
||||
<a href="#">
|
||||
<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"/>
|
||||
</div>
|
||||
<h4>
|
||||
@ -86,7 +94,8 @@ use yii\helpers\Html;
|
||||
<li>
|
||||
<a href="#">
|
||||
<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"/>
|
||||
</div>
|
||||
<h4>
|
||||
@ -96,21 +105,21 @@ use yii\helpers\Html;
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul> -->
|
||||
<!-- </li>
|
||||
<li class="footer"><a href="#">See All Messages</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown notifications-menu">
|
||||
</ul> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li class="dropdown notifications-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-bell-o"></i>
|
||||
<span class="label label-warning">10</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">You have 10 notifications</li>
|
||||
<li>
|
||||
<li> -->
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<!-- <ul class="menu">
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-users text-aqua"></i> 5 new members joined today
|
||||
@ -142,104 +151,100 @@ use yii\helpers\Html;
|
||||
</li>
|
||||
<li class="footer"><a href="#">View all</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</li> -->
|
||||
<!-- 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">
|
||||
<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>
|
||||
<!-->
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<!-- <ul class="menu">
|
||||
<li> -->
|
||||
<!-- Task item -->
|
||||
<!-- <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">
|
||||
<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> -->
|
||||
<!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<!-- <li> -->
|
||||
<!-- Task item -->
|
||||
<!-- <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">
|
||||
<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>
|
||||
</a> -->
|
||||
|
||||
<!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<!-- <li> -->
|
||||
<!-- Task item -->
|
||||
<!-- <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">
|
||||
<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>
|
||||
</a> -->
|
||||
|
||||
<!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<!-- <li> -->
|
||||
<!-- Task item -->
|
||||
<!-- <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">
|
||||
<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>
|
||||
</a> -->
|
||||
|
||||
<!-- end task item -->
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer">
|
||||
<!-- </ul> -->
|
||||
|
||||
<!-- <li class="footer">
|
||||
<a href="#">View all tasks</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li> -->
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="user-image" alt="User Image"/>
|
||||
<span class="hidden-xs">Alexander Pierce</span>
|
||||
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="user-image" alt="User Image" />
|
||||
<span class="hidden-xs"><?= Yii::$app->user->identity->username ?></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle"
|
||||
alt="User Image"/>
|
||||
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" alt="User Image" />
|
||||
|
||||
<p>
|
||||
Alexander Pierce - Web Developer
|
||||
<?= Yii::$app->user->identity->username ?> - Web Developer
|
||||
<small>Member since Nov. 2012</small>
|
||||
</p>
|
||||
</li>
|
||||
|
@ -1,14 +1,17 @@
|
||||
<aside class="main-sidebar">
|
||||
<section class="sidebar">
|
||||
<?php
|
||||
|
||||
use common\classes\Debug;
|
||||
|
||||
$userStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROFILE);
|
||||
$menuItems = [['label' => 'Все', 'icon' => 'user', 'url' => ['/card/user-card']]];
|
||||
foreach($userStatuses as $key => $status){
|
||||
foreach ($userStatuses as $key => $status) {
|
||||
$menuItems[] = ['label' => $status, 'icon' => 'user', 'url' => ['/card/user-card?UserCardSearch[status]=' . $key]];
|
||||
}
|
||||
$projectStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT);
|
||||
$projectItems = [['label' => 'Все', 'icon' => 'files-o', 'url' => ['/project/project']]];
|
||||
foreach($projectStatuses as $key => $status){
|
||||
foreach ($projectStatuses as $key => $status) {
|
||||
$projectItems[] = ['label' => $status, 'icon' => 'user', 'url' => ['/project/project?ProjectSearch[status]=' . $key]];
|
||||
}
|
||||
?>
|
||||
@ -20,30 +23,31 @@
|
||||
[
|
||||
'label' => 'Настройки', 'icon' => 'gears', 'url' => '#',
|
||||
'items' => [
|
||||
['label' => 'Статусы', 'icon' => 'anchor', 'url' => ['/settings/status']],
|
||||
['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields']],
|
||||
['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position']],
|
||||
['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill']],
|
||||
['label' => 'Статусы', 'icon' => 'anchor', 'url' => ['/settings/status'], 'active' => \Yii::$app->controller->id == 'status'],
|
||||
['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields'], 'active' => \Yii::$app->controller->id == 'additional-fields'],
|
||||
['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position'], 'active' => \Yii::$app->controller->id == 'position'],
|
||||
['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,
|
||||
],
|
||||
[ 'label' => 'Проекты', 'icon' => 'files-o', 'url' => ['#'],
|
||||
[
|
||||
'label' => 'Проекты', 'icon' => 'files-o', 'url' => ['#'], 'active' => \Yii::$app->controller->id == 'project',
|
||||
'items' => $projectItems,
|
||||
],
|
||||
['label' => 'Компании', 'icon' => 'files-o', 'url' => ['/company/company']],
|
||||
[
|
||||
'label' => 'Hh.ru', 'icon' => 'user-circle', 'url' => '#',
|
||||
'items' => [
|
||||
['label' => 'Компании', 'icon' => 'building', 'url' => ['/hh/hh']],
|
||||
['label' => 'Вакансии', 'icon' => 'user-md', 'url' => ['/hh/hh-job']],
|
||||
['label' => 'Компании', 'icon' => 'building', 'url' => ['/hh/hh'], 'active' => \Yii::$app->controller->id == 'hh'],
|
||||
['label' => 'Вакансии', 'icon' => 'user-md', 'url' => ['/hh/hh-job'], 'active' => \Yii::$app->controller->id == 'hh-job'],
|
||||
],
|
||||
],
|
||||
['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance']],
|
||||
['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday']],
|
||||
['label' => 'Доступы', 'icon' => '', 'url' => ['/accesses/accesses']],
|
||||
['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance'], 'active' => \Yii::$app->controller->id == 'balance'],
|
||||
['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday'], 'active' => \Yii::$app->controller->id == 'holiday'],
|
||||
['label' => 'Доступы', 'icon' => '', 'url' => ['/accesses/accesses'], 'active' => \Yii::$app->controller->id == 'accesses'],
|
||||
|
||||
/*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
|
||||
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']],
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
.itemImg, .itemImgs{
|
||||
float: left!important;
|
||||
float: left !important;
|
||||
display: inline-block;
|
||||
width: 30%!important;
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ AppAsset::register($this);
|
||||
['label' => 'Home', 'url' => ['/site/index']],
|
||||
['label' => 'About', 'url' => ['/site/about']],
|
||||
['label' => 'Contact', 'url' => ['/site/contact']],
|
||||
['label' => 'Access', 'url' => ['/access/access/index']],
|
||||
];
|
||||
if (Yii::$app->user->isGuest) {
|
||||
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
|
||||
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
|
||||
} else {
|
||||
$menuItems[] = ['label' => 'Access', 'url' => ['/access/access/index']];
|
||||
$menuItems[] = '<li>'
|
||||
. Html::beginForm(['/site/logout'], 'post')
|
||||
. Html::submitButton(
|
||||
|
Loading…
Reference in New Issue
Block a user