264 lines
13 KiB
Twig
Executable File
264 lines
13 KiB
Twig
Executable File
<!DOCTYPE html>
|
|
<html lang="{{ session('lang')|default('pt_BR')|replace({'_': '-'}) }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}{{ platformName }} - Dashboard{% endblock %}</title>
|
|
|
|
<!-- Dynamic Admin Theme CSS -->
|
|
{% if admin_theme_slug == 'sb-admin' %}
|
|
<link href="{{ asset_url('css/sb-admin.css') }}" rel="stylesheet">
|
|
{% else %}
|
|
<link href="{{ asset_url('themes/admin/' ~ admin_theme_slug ~ '/css/style.css') }}" rel="stylesheet">
|
|
{% endif %}
|
|
<!-- Font Awesome (Legacy - Removed) -->
|
|
<!-- <script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script> -->
|
|
<!-- Bootstrap Icons (For compatibility with existing modules) -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
|
|
<!-- Quill Editor CSS (se habilitado) -->
|
|
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
|
|
|
|
<style>
|
|
.form-control-xs {
|
|
height: calc(1.5em + 0.5rem + 2px);
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.75rem;
|
|
border-radius: 0.2rem;
|
|
}
|
|
.x-small {
|
|
font-size: 0.7rem;
|
|
}
|
|
.btn-xs {
|
|
padding: 0.1rem 0.3rem;
|
|
font-size: 0.7rem;
|
|
line-height: 1.2;
|
|
border-radius: 0.2rem;
|
|
}
|
|
</style>
|
|
|
|
<!-- DataTables CSS -->
|
|
<link href="https://cdn.datatables.net/1.13.7/css/dataTables.bootstrap5.min.css" rel="stylesheet">
|
|
|
|
<!-- Lightbox2 CSS -->
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.4/css/lightbox.min.css" rel="stylesheet">
|
|
|
|
<!-- Alpine.js -->
|
|
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
|
|
|
|
{% block head %}{% endblock %}
|
|
</head>
|
|
<body class="sb-nav-fixed">
|
|
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
|
|
<!-- Navbar Brand-->
|
|
<a class="navbar-brand ps-3" href="{{ url('dashboard') }}">
|
|
{% if active_theme and active_theme.themes_logo %}
|
|
<img src="{{ active_theme.themes_logo }}" alt="{{ __('layout.app_name', {'platformName': platformName}) }}" height="30">
|
|
{% else %}
|
|
<img src="{{ asset_url('img/logo_syscms.png') }}" alt="{{ __('layout.app_name', {'platformName': platformName}) }}" height="30">
|
|
{% endif %}
|
|
</a>
|
|
<!-- Sidebar Toggle-->
|
|
<button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
{% if auth.user %}
|
|
<!-- User Dropdown-->
|
|
<ul class="navbar-nav ms-auto ms-md-0 me-3 me-lg-4">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url('/') }}" target="_blank"><i class="bi bi-house"></i> {{ __('layout.menu.home') }}</a>
|
|
</li>
|
|
{% for key, visibility in config_pages_visibility %}
|
|
{% if visibility.dashboard and key != 'index' %}
|
|
{% set icon = 'bi bi-file-text' %}
|
|
{% if key == 'about' %}{% set icon = 'bi bi-info-circle' %}
|
|
{% elseif key == 'contact' %}{% set icon = 'bi bi-envelope' %}
|
|
{% elseif key == 'services' %}{% set icon = 'bi bi-briefcase' %}
|
|
{% endif %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url(key) }}" target="_blank">
|
|
<i class="{{ icon }}"></i> {{ __('layout.menu.' ~ key) != 'layout.menu.' ~ key ? __('layout.menu.' ~ key) : visibility.title }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{# Dynamic Module Links (Hidden for Admin, Super Admin and Member as they are in the sidebar) #}
|
|
{% if auth.user.role != 'admin' and auth.user.role != 'super_admin' and auth.user.role != 'member' %}
|
|
{% if auth.user.company is defined and auth.user.company.modules is defined %}
|
|
{% for module in auth.user.company.modules %}
|
|
{% if module.pivot.bus_modules_is_enabled and module.pivot.bus_modules_show_dashboard_nav %}
|
|
{% set route = module.modules_name %}
|
|
{% set label = module.modules_display_name %}
|
|
{% set icon = 'bi bi-puzzle' %}
|
|
|
|
{# We prefer public route for navbar shortcut, or dashboard route if no public #}
|
|
{% if module.modules_settings.menu.public is defined %}
|
|
{% set route = module.modules_settings.menu.public.route ?? route %}
|
|
{% set label = module.modules_settings.menu.public.label ?? label %}
|
|
{% endif %}
|
|
|
|
{% if module.modules_name == 'faq' %}
|
|
{% set route = 'faq' %}
|
|
{% set label = __('layout.menu.faq') %}
|
|
{% set icon = 'bi bi-question-circle' %}
|
|
{% elseif module.modules_name == 'blog' %}
|
|
{% set route = 'publicposts' %}
|
|
{% set label = __('layout.menu.posts') %}
|
|
{% set icon = 'bi bi-book' %}
|
|
{% elseif module.modules_name == 'vitrine' %}
|
|
{% set route = 'publicvitrine' %}
|
|
{% set label = __('layout.menu.vitrine') %}
|
|
{% set icon = 'bi bi-shop' %}
|
|
{% elseif module.modules_name == 'pagebuilder' %}
|
|
{% set route = '' %} {# Link to home? #}
|
|
{% set label = __('layout.menu.pages') %}
|
|
{% set icon = 'bi bi-file-text' %}
|
|
{% endif %}
|
|
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url(route) }}" target="_blank"><i class="{{ icon }}"></i> {{ __(label) }}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% include 'partials/language-switcher.twig' %}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
{% if user.users_avatar %}
|
|
<img src="{{ user.avatar_url }}" alt="{{ user.display_name }}" class="rounded-circle" style="width: 25px; height: 25px; object-fit: cover; margin-right: 5px;">
|
|
{% else %}
|
|
<i class="bi bi-person"></i>
|
|
{% endif %}
|
|
{{ user.display_name }}
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
|
<li><a class="dropdown-item" href="{{ url('profile') }}">{{ __('layout.profile.title') }}</a></li>
|
|
<li><hr class="dropdown-divider" /></li>
|
|
<li><a class="dropdown-item" href="{{ url('logout') }}">{{ __('auth.logout') }}</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
</nav>
|
|
|
|
<div id="layoutSidenav">
|
|
<div id="layoutSidenav_nav">
|
|
{% block sidebar %}
|
|
{% include 'partials/sidebar.twig' %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
<div id="layoutSidenav_content">
|
|
<main>
|
|
<div class="container-fluid px-4">
|
|
{% block content %}
|
|
<!-- Main content will be injected here -->
|
|
{% endblock %}
|
|
</div>
|
|
</main>
|
|
|
|
<footer class="py-4 bg-light mt-auto">
|
|
<div class="container-fluid px-4">
|
|
<div class="d-flex align-items-center justify-content-between small">
|
|
<div class="text-muted">
|
|
Copyright © {{ platformName }} {{ "now"|date("Y") }}
|
|
|
|
|
Desenvolvido com <a href="https://syscms.syspanel.com.br" target="_blank">SysCMS 2026</a>
|
|
</div>
|
|
<div>
|
|
<a href="/user_terms.html" target="_blank">{{ __('layout.footer.terms') }}</a>
|
|
·
|
|
<a href="/eula.html" target="_blank">{{ __('layout.footer.eula') }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bootstrap JS -->
|
|
<script src="{{ asset_url('js/bootstrap.bundle.min.js') }}"></script>
|
|
|
|
<!-- SB Admin Custom JS -->
|
|
<script src="{{ asset_url('js/sb-admin.js') }}"></script>
|
|
|
|
<!-- DataTables JS -->
|
|
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
|
|
<script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
|
|
<script src="https://cdn.datatables.net/1.13.7/js/dataTables.bootstrap5.min.js"></script>
|
|
|
|
<!-- Quill Editor JS (se habilitado) -->
|
|
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var editorContainer = document.getElementById('quill-editor');
|
|
if (editorContainer) {
|
|
var quill = new Quill('#quill-editor', {
|
|
theme: 'snow',
|
|
modules: {
|
|
toolbar: [
|
|
['bold', 'italic', 'underline', 'strike'],
|
|
['blockquote', 'code-block'],
|
|
[{ 'header': 1 }, { 'header': 2 }],
|
|
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
|
[{ 'script': 'sub'}, { 'script': 'super' }],
|
|
[{ 'indent': '-1'}, { 'indent': '+1' }],
|
|
[{ 'direction': 'rtl' }],
|
|
[{ 'size': ['small', false, 'large', 'huge'] }],
|
|
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
|
[{ 'color': [] }, { 'background': [] }],
|
|
[{ 'font': [] }],
|
|
[{ 'align': [] }],
|
|
['clean'],
|
|
['link', 'image', 'video']
|
|
]
|
|
}
|
|
});
|
|
|
|
// Sync with hidden textarea
|
|
var targetId = editorContainer.getAttribute('data-target');
|
|
var targetInput = targetId ? document.getElementById(targetId) : null;
|
|
|
|
// Fallback: try to find a hidden textarea next to the editor
|
|
if (!targetInput) {
|
|
targetInput = editorContainer.nextElementSibling;
|
|
if (targetInput && targetInput.tagName !== 'TEXTAREA') {
|
|
targetInput = null;
|
|
}
|
|
}
|
|
|
|
if (targetInput) {
|
|
quill.on('text-change', function() {
|
|
targetInput.value = quill.root.innerHTML;
|
|
});
|
|
|
|
var form = editorContainer.closest('form');
|
|
if (form) {
|
|
form.addEventListener('submit', function() {
|
|
targetInput.value = quill.root.innerHTML;
|
|
});
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<!-- Lightbox2 JS -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.4/js/lightbox.min.js"></script>
|
|
<script>
|
|
lightbox.option({
|
|
'resizeDuration': 200,
|
|
'wrapAround': true,
|
|
'showImageNumberLabel': true,
|
|
'imageFadeDuration': 300
|
|
});
|
|
</script>
|
|
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|