160 lines
7.9 KiB
Twig
160 lines
7.9 KiB
Twig
{# app/Views/layouts/base.html.twig #}
|
|
{% set session_data = get_session() %}
|
|
{% set current_org = get_current_org() %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Бизнес.Точка{% endblock %}</title>
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link href="{{ base_url('assets/css/bootstrap.min.css') }}" rel="stylesheet">
|
|
<!-- FontAwesome -->
|
|
<link href="{{ base_url('assets/css/all.min.css') }}" rel="stylesheet">
|
|
<!-- Base -->
|
|
<link href="{{ base_url('assets/css/base.css') }}" rel="stylesheet">
|
|
{% block styles %}{% endblock %}
|
|
</head>
|
|
<body class="bg-light">
|
|
|
|
<div class="d-flex" id="wrapper">
|
|
<!-- SIDEBAR -->
|
|
<div class="bg-white border-end" id="sidebar-wrapper" style="width: 250px;">
|
|
<div class="sidebar-heading bg-primary text-white p-3 d-flex justify-content-between align-items-center">
|
|
<span><i class="fa-solid fa-circle-nodes me-2"></i>Бизнес.Точка</span>
|
|
</div>
|
|
<div class="list-group list-group-flush mt-2">
|
|
<!-- Главная -->
|
|
<a href="{{ base_url('/') }}"
|
|
class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link
|
|
{{ is_active_route(['', 'dashboard', 'home']) ? 'active' : '' }}">
|
|
<i class="fa-solid fa-gauge-high me-2"></i> Главная
|
|
</a>
|
|
|
|
<!-- Клиенты -->
|
|
<a href="{{ base_url('/clients') }}"
|
|
class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link
|
|
{{ is_active_route('clients') ? 'active' : '' }}">
|
|
<i class="fa-solid fa-users me-2"></i> Клиенты
|
|
</a>
|
|
|
|
|
|
<!-- Будущие модули -->
|
|
<a href="#" class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link disabled">
|
|
<i class="fa-solid fa-chart-line me-2"></i> CRM
|
|
</a>
|
|
<a href="#" class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link disabled">
|
|
<i class="fa-solid fa-calendar me-2"></i> Booking
|
|
</a>
|
|
<a href="#" class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link disabled">
|
|
<i class="fa-solid fa-file-contract me-2"></i> Proof
|
|
</a>
|
|
<a href="#" class="list-group-item list-group-item-action list-group-item-light py-3 sidebar-link disabled">
|
|
<i class="fa-solid fa-check-square me-2"></i> Tasks
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- /SIDEBAR -->
|
|
|
|
<!-- Page Content -->
|
|
<div id="page-content-wrapper" class="w-100">
|
|
|
|
<!-- TOPBAR -->
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom px-4 shadow-sm">
|
|
<button class="btn btn-light border-0" id="sidebarToggle"><i class="fa-solid fa-bars"></i></button>
|
|
|
|
<div class="ms-auto d-flex align-items-center">
|
|
|
|
<!-- ДРОПДАУН ОРГАНИЗАЦИИ -->
|
|
<div class="dropdown me-4">
|
|
{% if current_org %}
|
|
<button class="btn btn-light dropdown-toggle border d-flex align-items-center" type="button" data-bs-toggle="dropdown">
|
|
<i class="fa-solid fa-building text-primary me-2"></i>
|
|
<span class="fw-bold text-dark">{{ current_org.name }}</span>
|
|
<span class="badge bg-light text-secondary ms-2 text-uppercase fs-6">{{ current_org.type == 'personal' ? 'Личное' : 'Бизнес' }}</span>
|
|
</button>
|
|
{% else %}
|
|
<a href="{{ base_url('/organizations') }}" class="btn btn-outline-danger">
|
|
<i class="fa-solid fa-exclamation-triangle me-1"></i> Выберите организацию
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if current_org %}
|
|
<ul class="dropdown-menu dropdown-menu-end shadow-sm">
|
|
{# <li>
|
|
<span class="dropdown-header text-muted small">
|
|
<i class="fa-solid fa-hashtag me-1"></i> {{ current_org.id }}
|
|
</span>
|
|
</li>
|
|
<li><hr class="dropdown-divider"></li> #}
|
|
|
|
<!-- Ссылка: Список всех организаций -->
|
|
<li>
|
|
<a class="dropdown-item" href="{{ base_url('/organizations') }}">
|
|
<i class="fa-solid fa-layer-group text-primary me-2"></i> Список организаций
|
|
</a>
|
|
</li>
|
|
|
|
<!-- Ссылка: Создать новую организацию -->
|
|
<li>
|
|
<a class="dropdown-item" href="{{ base_url('/organizations/create') }}">
|
|
<i class="fa-solid fa-plus-circle text-success me-2"></i> Создать организацию
|
|
</a>
|
|
</li>
|
|
|
|
<li><hr class="dropdown-divider"></li>
|
|
|
|
<!-- Ссылка: Дашборд управления организацией -->
|
|
<li>
|
|
<a class="dropdown-item" href="{{ base_url('/organizations/' ~ current_org.id ~ '/dashboard') }}">
|
|
<i class="fa-solid fa-sliders text-primary me-2"></i> Управление организацией
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
<!-- /ДРОПДАУН ОРГАНИЗАЦИИ -->
|
|
|
|
<!-- ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ -->
|
|
<div class="dropdown">
|
|
<a class="nav-link dropdown-toggle d-flex align-items-center" href="#" role="button" data-bs-toggle="dropdown">
|
|
<div class="bg-primary text-white rounded-circle d-flex justify-content-center align-items-center me-2" style="width:32px; height:32px;">
|
|
{{ session_data.name|first|upper }}
|
|
</div>
|
|
<span class="d-none d-md-inline text-dark">{{ session_data.name }}</span>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end shadow-sm">
|
|
<li><h6 class="dropdown-header">{{ session_data.email }}</h6></li>
|
|
<li><a class="dropdown-item" href="#"><i class="fa-regular fa-user me-2"></i> Профиль</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li><a class="dropdown-item text-danger" href="{{ base_url('/logout') }}"><i class="fa-solid fa-arrow-right-from-bracket me-2"></i> Выйти</a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- /ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ -->
|
|
|
|
</div>
|
|
</nav>
|
|
<!-- /TOPBAR -->
|
|
|
|
<!-- CONTENT -->
|
|
<div class="container-fluid p-4">
|
|
<!-- Подключаем компонент алертов (Toasts) -->
|
|
{% include 'components/alerts.twig' %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
<!-- /CONTENT -->
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Scripts -->
|
|
<script src="{{ base_url('assets/js/bootstrap.bundle.min.js') }}"></script>
|
|
<script src="{{ base_url('assets/js/base.js') }}"></script>
|
|
|
|
{% block scripts %}{% endblock %}
|
|
|
|
</body>
|
|
</html> |