guild/backend/views/layouts/left.php

164 lines
14 KiB
PHP
Raw Normal View History

2018-10-11 11:15:09 +03:00
<aside class="main-sidebar">
<section class="sidebar">
2018-12-03 12:10:39 +03:00
<?php
2019-11-15 13:25:48 +03:00
2018-12-03 12:10:39 +03:00
$userStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROFILE);
2022-11-07 11:35:30 +03:00
$menuItems = [['label' => 'Все', 'icon' => 'id-card', 'url' => ['/card/user-card'], 'active' => \Yii::$app->controller->id == 'user-card',]];
2019-11-15 13:25:48 +03:00
foreach ($userStatuses as $key => $status) {
2022-11-07 11:35:30 +03:00
$menuItems[] = ['label' => $status, 'icon' => 'id-card', 'url' => ['/card/user-card?UserCardSearch[status]=' . $key], 'active' => \Yii::$app->controller->id == 'user-card',];
2018-12-03 12:10:39 +03:00
}
2022-11-03 17:46:36 +03:00
2022-12-19 16:21:19 +03:00
$busynessArr = \common\models\UserCard::getBusyness();
foreach ($busynessArr as $key => $busyness) {
$menuItems[] = ['label' => $busyness, 'icon' => 'id-card', 'url' => ['/card/user-card?UserCardSearch[at_project]=' . $key], 'active' => \Yii::$app->controller->id == 'user-card'];
}
2019-07-03 18:06:01 +03:00
$projectStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT);
$projectItems = [['label' => 'Все', 'icon' => 'cubes', 'url' => ['/project/project'], 'active' => \Yii::$app->controller->id == 'project']];
2019-11-15 13:25:48 +03:00
foreach ($projectStatuses as $key => $status) {
$projectItems[] = ['label' => $status, 'icon' => 'user', 'url' => ['/project/project?ProjectSearch[status]=' . $key, 'active' => \Yii::$app->controller->id == 'project']];
2019-07-03 18:06:01 +03:00
}
$projectItems[] = ['label' => 'Сотрудники на проектах', 'icon' => 'users', 'url' => ['/project/project-user'], 'active' => \Yii::$app->controller->id == 'project-user'];
2023-11-21 11:23:38 +03:00
$projectItems[] = ['label' => 'Метки проектов', 'icon' => 'tags', 'url' => ['/project/project-mark'], 'active' => \Yii::$app->controller->id == 'project-mark'];
$projectItems[] = ['label' => 'Роли на проекте', 'icon' => 'user-o', 'url' => ['/project/project-role'], 'active' => \Yii::$app->controller->id == 'project-role'];
2018-12-03 12:10:39 +03:00
?>
2018-10-11 11:15:09 +03:00
<?= dmstr\widgets\Menu::widget(
[
'options' => ['class' => 'sidebar-menu tree', 'data-widget' => 'tree'],
'items' => [
2018-10-12 14:52:08 +03:00
[
'label' => 'Настройки', 'icon' => 'gears', 'url' => '#',
'items' => [
2022-12-28 11:45:57 +03:00
['label' => 'Статусы', 'icon' => 'anchor', 'url' => ['/settings/status'], 'active' => \Yii::$app->controller->id == 'status', 'visible' => Yii::$app->user->can('settings')],
['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields'], 'active' => \Yii::$app->controller->id == 'additional-fields', 'visible' => Yii::$app->user->can('settings')],
['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position'], 'active' => \Yii::$app->controller->id == 'position', 'visible' => Yii::$app->user->can('settings')],
['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill'], 'active' => \Yii::$app->controller->id == 'skill', 'visible' => Yii::$app->user->can('settings/skill')],
2023-01-23 17:50:38 +03:00
['label' => 'Метки', 'icon' => 'tag', 'url' => ['/settings/mark'], 'active' => \Yii::$app->controller->id == 'mark', 'visible' => Yii::$app->user->can('settings/mark')],
2022-12-28 11:45:57 +03:00
['label' => 'Шаблоны резюме', 'icon' => 'address-card ', 'url' => ['/card/resume-template'], 'active' => \Yii::$app->controller->id == 'resume-template', 'visible' => Yii::$app->user->can('card')],
['label' => 'Шаблоны документов', 'icon' => 'file', 'url' => ['/document/document-template'], 'active' => \Yii::$app->controller->id == 'document-template', 'visible' => Yii::$app->user->can('document')],
['label' => 'Поля документов', 'icon' => 'file-text', 'url' => ['/document/document-field'], 'active' => \Yii::$app->controller->id == 'document-field', 'visible' => Yii::$app->user->can('document')],
2023-04-12 13:14:37 +03:00
['label' => 'Уровень знаний', 'icon' => 'code', 'url' => ['/knowledgelevel/knowledge-level'], 'active' => \Yii::$app->controller->id == 'knowledge-level', 'visible' => Yii::$app->user->can('knowledgelevel/knowledge-level')],
2022-12-01 14:11:29 +03:00
[
'label' => 'Роли', 'icon' => 'users', 'url' => '#',
'items' => [
['label' => 'Управление ролями', 'icon' => ' fa-sort-amount-asc', 'url' => ['/permit/access/role'], 'active' => \Yii::$app->controller->id == 'access'],
['label' => 'Правила доступа', 'icon' => 'list-alt', 'url' => ['/permit/access/permission'], 'active' => \Yii::$app->controller->id == 'access'],
2022-12-28 11:45:57 +03:00
],
'visible' => Yii::$app->user->can('confidential_information')
2022-12-01 14:11:29 +03:00
]
2021-08-12 14:14:56 +03:00
],
2018-10-12 14:52:08 +03:00
],
2018-12-03 12:10:39 +03:00
[
'label' => 'Профили', 'icon' => 'address-book-o', 'url' => '#',
2018-12-03 12:10:39 +03:00
'items' => $menuItems,
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('card')
2018-12-03 12:10:39 +03:00
],
2021-11-16 13:14:28 +03:00
[
'label' => 'Сотрудники', 'icon' => 'users', 'url' => '#',
'items' => [
['label' => 'Менеджеры', 'icon' => 'user-circle-o', 'url' => ['/employee/manager'], 'active' => \Yii::$app->controller->id == 'manager'],
['label' => 'Работники', 'icon' => 'user', 'url' => ['/employee/manager-employee'], 'active' => \Yii::$app->controller->id == 'manager-employee'],
],
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('employee')
2021-11-16 13:14:28 +03:00
],
2023-04-12 13:14:37 +03:00
['label' => 'Запросы', 'icon' => 'eye', 'url' => ['/request/request'], 'active' => \Yii::$app->controller->id == 'request', 'visible' => Yii::$app->user->can('request/request')],
2022-12-28 11:45:57 +03:00
['label' => 'Документы', 'icon' => 'archive', 'url' => ['/document/document'], 'active' => \Yii::$app->controller->id == 'document', 'visible' => Yii::$app->user->can('document')],
2019-11-15 13:25:48 +03:00
[
2022-11-08 14:15:31 +03:00
'label' => 'Проекты', 'icon' => 'cubes', 'url' => ['#'],
2019-07-03 18:06:01 +03:00
'items' => $projectItems,
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('project')
2021-11-23 13:13:19 +03:00
],
[
'label' => 'Задачи', 'icon' => 'tasks', 'url' => '#',
2021-11-23 13:13:19 +03:00
'items' => [
['label' => 'Задачи', 'icon' => 'minus', 'url' => ['/task/task'], 'active' => \Yii::$app->controller->id == 'task'],
['label' => 'Исполнители задачи', 'icon' => 'users', 'url' => ['/task/task-user'], 'active' => \Yii::$app->controller->id == 'task-user'],
['label' => 'Категории задач', 'icon' => 'users', 'url' => ['/task/project-task-category'], 'active' => \Yii::$app->controller->id == 'project-task-category'],
2023-04-20 02:16:32 +03:00
['label' => 'Колонки', 'icon' => 'tag', 'url' => ['/project/project-column'], 'active' => \Yii::$app->controller->id == 'project-column'],
2021-11-23 13:13:19 +03:00
],
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('task')
2019-07-03 18:06:01 +03:00
],
2022-12-01 14:11:29 +03:00
[
'label' => 'Компании', 'icon' => 'building', 'url' => '#',
'items' => [
['label' => 'Компании', 'icon' => 'building-o', 'url' => ['/company/company'], 'active' => \Yii::$app->controller->id == 'company'],
['label' => 'Менеджеры компаний', 'icon' => 'user-circle-o', 'url' => ['/company/company-manager'], 'active' => \Yii::$app->controller->id == 'company-manager'],
],
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('company')
2022-12-01 14:11:29 +03:00
],
2018-11-21 17:02:14 +03:00
[
'label' => 'Hh.ru', 'icon' => 'user-circle', 'url' => '#',
'items' => [
2019-11-15 13:25:48 +03:00
['label' => 'Компании', 'icon' => 'building', 'url' => ['/hh/hh'], 'active' => \Yii::$app->controller->id == 'hh'],
2021-08-16 14:32:54 +03:00
['label' => 'Вакансии', 'icon' => 'user-md', 'url' => ['/hh/hh-job'], 'active' => \Yii::$app->controller->id == 'hh-job'],
2018-11-21 17:02:14 +03:00
],
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('hh')
2019-06-21 18:05:58 +03:00
],
2022-12-28 11:45:57 +03:00
['label' => 'Баланс', 'icon' => 'dollar', 'url' => ['/balance/balance'], 'active' => \Yii::$app->controller->id == 'balance', 'visible' => Yii::$app->user->can('balance')],
['label' => 'Отпуска', 'icon' => 'plane', 'url' => ['/holiday/holiday'], 'active' => \Yii::$app->controller->id == 'holiday', 'visible' => Yii::$app->user->can('holiday')],
['label' => 'Достижения', 'icon' => 'trophy', 'url' => ['/achievements/achievements'], 'active' => \Yii::$app->controller->id == 'achievements', 'visible' => Yii::$app->user->can('achievements')],
['label' => 'Доступы', 'icon' => 'key', 'url' => ['/accesses/accesses'], 'active' => \Yii::$app->controller->id == 'accesses', 'visible' => Yii::$app->user->can('accesses')],
['label' => 'Заметки', 'icon' => 'sticky-note', 'url' => ['/notes/notes'], 'active' => \Yii::$app->controller->id == 'notes', 'visible' => Yii::$app->user->can('notes')],
['label' => 'Календарь ДР', 'icon' => 'calendar-check-o', 'url' => ['/calendar/calendar'], 'active' => \Yii::$app->controller->id == 'calendar', 'visible' => Yii::$app->user->can('calendar')],
['label' => 'Отчеты', 'icon' => 'calendar', 'url' => ['/reports/reports'], 'active' => \Yii::$app->controller->id == 'reports', 'visible' => Yii::$app->user->can('reports')],
['label' => 'Опции', 'icon' => 'list-alt', 'url' => ['/options/options'], 'active' => \Yii::$app->controller->id == 'options', 'visible' => Yii::$app->user->can('options')],
2021-08-16 14:32:54 +03:00
[
'label' => 'Запрос интервью (' . \common\models\InterviewRequest::getNewCount() . ')',
'icon' => 'list-alt',
'url' => ['/interview/interview'],
'active' => \Yii::$app->controller->id == 'interview',
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('interview'),
2021-08-16 14:32:54 +03:00
'badge' => '<span class="badge badge-info right">4</span>'
],
[
2021-11-08 12:41:39 +03:00
'label' => 'Анкеты', 'icon' => 'book', 'url' => '#',
'items' => [
2021-11-08 12:41:39 +03:00
['label' => 'Типы вопросов', 'icon' => 'pencil-square-o', 'url' => ['/questionnaire/question-type'], 'active' => \Yii::$app->controller->id == 'question-type'],
['label' => 'Категории анкет', 'icon' => 'pencil-square', 'url' => ['/questionnaire/questionnaire-category'], 'active' => \Yii::$app->controller->id == 'questionnaire-category'],
['label' => 'Список анкет', 'icon' => 'clipboard', 'url' => ['/questionnaire/questionnaire'], 'active' => \Yii::$app->controller->id == 'questionnaire'],
['label' => 'Вопросы', 'icon' => 'question', 'url' => ['/questionnaire/question'], 'active' => \Yii::$app->controller->id == 'question'],
['label' => 'Ответы', 'icon' => 'comment', 'url' => ['/questionnaire/answer'], 'active' => \Yii::$app->controller->id == 'answer'],
['label' => 'Анкеты пользователей', 'icon' => 'drivers-license', 'url' => ['/questionnaire/user-questionnaire'], 'active' => \Yii::$app->controller->id == 'user-questionnaire'],
['label' => 'Ответы пользователей', 'icon' => 'comments', 'url' => ['/questionnaire/user-response'], 'active' => \Yii::$app->controller->id == 'user-response'],
],
2022-12-28 11:45:57 +03:00
'visible' => Yii::$app->user->can('questionnaire')
],
2022-12-28 11:45:57 +03:00
['label' => 'Тестовые задания', 'icon' => 'file-text-o', 'url' => ['/test/test-task'], 'active' => \Yii::$app->controller->id == 'options', 'visible' => Yii::$app->user->can('test')],
2022-03-09 19:10:44 +03:00
2018-10-11 11:15:09 +03:00
/*['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii']],
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug']],
['label' => 'Login', 'url' => ['site/login'], 'visible' => Yii::$app->user->isGuest],
[
'label' => 'Some tools',
'icon' => 'share',
'url' => '#',
'items' => [
['label' => 'Gii', 'icon' => 'file-code-o', 'url' => ['/gii'],],
['label' => 'Debug', 'icon' => 'dashboard', 'url' => ['/debug'],],
[
'label' => 'Level One',
'icon' => 'circle-o',
'url' => '#',
'items' => [
['label' => 'Level Two', 'icon' => 'circle-o', 'url' => '#',],
[
'label' => 'Level Two',
'icon' => 'circle-o',
'url' => '#',
'items' => [
['label' => 'Level Three', 'icon' => 'circle-o', 'url' => '#',],
['label' => 'Level Three', 'icon' => 'circle-o', 'url' => '#',],
],
],
],
],
],
],*/
],
]
) ?>
</section>
2019-11-15 13:25:48 +03:00
</aside>