mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
482 lines
25 KiB
PHP
Executable File
482 lines
25 KiB
PHP
Executable File
<?php
|
|
$session = session();
|
|
$settings = $session->get('settings');
|
|
$picture = "/assets/img/default-user.png";
|
|
?>
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="<?= $session->get('lang') ?>" class="h-100 light-style layout-navbar-fixed layout-menu-fixed" dir="ltr"
|
|
data-theme="theme-default" data-assets-path="<?= site_url('themes/vuexy/') ?>"
|
|
data-template="vertical-menu-template-no-customizer">
|
|
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport"
|
|
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
|
|
|
<meta name="locale" content="<?= $session->get("lang") ?>">
|
|
|
|
<title><?= config('Safekat')->appName ?></title>
|
|
|
|
<meta name="description" content="" />
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
|
|
<link rel="apple-touch-icon" sizes="57x57" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-57x57.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="60x60" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-60x60.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="72x72" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-72x72.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="76x76" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-76x76.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="114x114"
|
|
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-114x114.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="120x120"
|
|
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-120x120.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="144x144"
|
|
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-144x144.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="152x152"
|
|
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-152x152.png') ?>">
|
|
<link rel="apple-touch-icon" sizes="180x180"
|
|
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-180x180.png') ?>">
|
|
<link rel="icon" type="image/png" sizes="192x192"
|
|
href="<?= site_url('themes/vuexy/img/favicon/android-icon-192x192.png') ?>">
|
|
<link rel="icon" type="image/png" sizes="32x32"
|
|
href="<?= site_url('themes/vuexy/img/favicon/favicon-32x32.png') ?>">
|
|
<link rel="icon" type="image/png" sizes="96x96"
|
|
href="<?= site_url('themes/vuexy/img/favicon/favicon-96x96.png') ?>">
|
|
<link rel="icon" type="image/png" sizes="16x16"
|
|
href="<?= site_url('themes/vuexy/img/favicon/favicon-16x16.png') ?>">
|
|
<link rel="manifest" href="<?= site_url('themes/vuexy/img/favicon/manifest.json') ?>">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap"
|
|
rel="stylesheet" />
|
|
|
|
<!-- Icons -->
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>" />
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>" />
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>" />
|
|
|
|
<!-- Core CSS -->
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core.css') ?>" />
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-semi-dark.css') ?>" />
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
|
|
|
|
|
|
|
|
<!-- Vendors CSS -->
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.css') ?>" />
|
|
|
|
<!-- Page CSS -->
|
|
<?= $this->renderSection('css') ?>
|
|
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/safekat.css') ?>" />
|
|
|
|
|
|
<!-- Helpers -->
|
|
<script src="<?= site_url('themes/vuexy/vendor/js/helpers.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/js/config.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/autoNumeric/autoNumeric.min.js') ?>"></script>
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!-- Layout wrapper -->
|
|
<div class="layout-wrapper layout-content-navbar">
|
|
<div class="layout-container">
|
|
|
|
<?php include "selector_menu.php" ?>
|
|
|
|
<!-- Layout container -->
|
|
<div class="layout-page">
|
|
|
|
<!-- Navbar -->
|
|
<nav class="layout-navbar container-fluid navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme"
|
|
id="layout-navbar">
|
|
<div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 d-xl-none">
|
|
<a class="nav-item nav-link px-0 me-xl-4" href="javascript:void(0)">
|
|
<i class="ti ti-menu-2 ti-sm"></i>
|
|
</a>
|
|
</div>
|
|
<!-- CAMBIO DE USUARIO PARA MAQUINISTA -->
|
|
<?php if (auth()->user()->inGroup('maquina')): ?>
|
|
<div class="navbar-nav-left d-flex align-items-center" id="navbar-collapse">
|
|
<ul class="navbar-nav flex-row justify-content-start align-items-center ms-auto">
|
|
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
|
|
|
<a type="btn" href="<?= route_to('maquinistaUserChangeList') ?>"
|
|
class="btn btn-outline-primary btn-sm w-100">Cambiar usuario</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="navbar-nav-right d-flex align-items-center" id="navbar-collapse">
|
|
|
|
<?php if (env('SK_ENVIRONMENT') === 'development'): ?>
|
|
<div class="me-auto ms-2">
|
|
<span class="badge px-3 py-2" style="background-color: #2E5939; color: #fff;">
|
|
Entorno de desarrollo
|
|
</span>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<ul class="navbar-nav flex-row align-items-center ms-auto">
|
|
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
|
<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);"
|
|
data-bs-toggle="dropdown" data-bs-auto-close="outside"
|
|
id="message-notification-dropdown" aria-expanded="false">
|
|
<span class="tf-icons ti-md ti ti-message-circle"></span>
|
|
<span id="chat-notification-number"
|
|
class="badge bg-danger text-white badge-notifications d-none"></span>
|
|
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-end py-0">
|
|
<div class="dropdown-menu-header border-bottom">
|
|
<div class="dropdown-header d-flex align-items-center py-3">
|
|
<h5 class="text-body mb-0 me-auto"><?= lang("Chat.messages") ?></h5>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dropdown-shortcuts-list scrollable-container">
|
|
<!-- Chat & Contacts -->
|
|
<div class="container">
|
|
<div class="col app-chat-contacts app-sidebar flex-grow-0 overflow-hidden"
|
|
id="app-chat-contacts">
|
|
<div class="container-m-nx m-2">
|
|
<div class="sidebar-body">
|
|
<!-- Contacts -->
|
|
<h6 id="chat-message-notification-title">
|
|
<?= lang("Chat.no_messages_notification") ?>
|
|
</h6>
|
|
<ul class="list-unstyled chat-contact-list mb-0"
|
|
id="chat-notification-list">
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<!-- Notification -->
|
|
|
|
<!-- Search Budgets -->
|
|
<li class="nav-item navbar-dropdown dropdown me-3 me-xl-1">
|
|
<a class="nav-link hide-arrow" href="<?= route_to("buscadorPresupuestosList"); ?>"
|
|
title="Acceso directo a buscador de presupuestos">
|
|
<i class="ti ti-report-search ti-md"></i>
|
|
</a>
|
|
</li>
|
|
<!--/ Search Budgets -->
|
|
|
|
<!-- View Mode links -->
|
|
<?php
|
|
if (auth()->user()->inGroup('beta')):
|
|
?>
|
|
<li class="nav-item dropdown-shortcuts navbar-dropdown dropdown me-2 me-xl-0">
|
|
<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);"
|
|
data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
<i class="ti ti-building ti-md"></i>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-end py-0">
|
|
<div class="dropdown-menu-header border-bottom">
|
|
<div class="dropdown-header d-flex align-items-center py-3">
|
|
<h5 class="text-body mb-0 me-auto">Vistas</h5>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="dropdown-shortcuts-list scrollable-container">
|
|
|
|
<div class="row row-bordered overflow-visible g-0">
|
|
<div class="dropdown-shortcuts-item col">
|
|
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
|
<i class="ti ti-printer fs-4"></i>
|
|
</span>
|
|
<small class="text-muted mb-0">Vista</small>
|
|
<a href="<?= site_url('viewmode/' . config("Basics")->vista_impresion); ?>"
|
|
class="stretched-link">Impresión</a>
|
|
</div>
|
|
<div class="dropdown-shortcuts-item col">
|
|
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
|
<i class="ti ti-ruler-2 fs-4"></i>
|
|
</span>
|
|
<small class="text-muted mb-0">Vista</small>
|
|
<a href="<?= site_url('viewmode/' . config("Basics")->vista_maquetacion); ?>"
|
|
class="stretched-link">Maquetación</a>
|
|
</div>
|
|
</div>
|
|
<div class="row row-bordered overflow-visible g-0">
|
|
<div class="dropdown-shortcuts-item col">
|
|
<span class="dropdown-shortcuts-icon rounded-circle mb-2">
|
|
<i class="ti ti-file-code-2 fs-4"></i>
|
|
</span>
|
|
<small class="text-muted mb-0">Vista</small>
|
|
<a href="<?= site_url('viewmode/' . config("Basics")->vista_digitalizacion); ?>"
|
|
class="stretched-link">Digitalización</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<?php
|
|
endif;
|
|
?>
|
|
<!-- View Mode links -->
|
|
|
|
<!-- Language -->
|
|
<li class="nav-item dropdown-language dropdown me-2 me-xl-0">
|
|
<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);"
|
|
data-bs-toggle="dropdown">
|
|
<i class="fi <?= getCurrentLanguageFlag(); ?> fis rounded-circle me-1 fs-3"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li>
|
|
<a class="dropdown-item" href="<?= site_url('lang/es'); ?>" data-language="es">
|
|
<i class="fi fi-es fis rounded-circle me-1 fs-3"></i>
|
|
<span class="align-middle"><?= lang("App.lang_es") ?></span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item" href="<?= site_url('lang/en'); ?>" data-language="en">
|
|
<i class="fi fi-gb fis rounded-circle me-1 fs-3"></i>
|
|
<span class="align-middle"><?= lang("App.lang_en") ?></span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<!--/ Language -->
|
|
|
|
<!-- User -->
|
|
<li class="nav-item navbar-dropdown dropdown-user dropdown">
|
|
<a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);"
|
|
data-bs-toggle="dropdown">
|
|
<div class="avatar">
|
|
<img src="<?= getGravatarURL(50) ?? '' ?>" alt class="h-auto rounded-circle" />
|
|
</div>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end">
|
|
<li>
|
|
<a class="dropdown-item" href="#">
|
|
<div class="d-flex">
|
|
<div class="flex-shrink-0 me-3">
|
|
<div class="avatar avatar">
|
|
<img src="<?= getGravatarURL() ?? '' ?>" alt
|
|
class="h-auto rounded-circle" />
|
|
</div>
|
|
</div>
|
|
<div class="flex-grow-1">
|
|
<span
|
|
class="fw-semibold d-block"><?= auth()->user()->getFullName(); ?></span>
|
|
<small class="text-muted"><?= auth()->user()->getEmail(); ?></small>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<div class="dropdown-divider"></div>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item" href="<?= site_url('profile'); ?>">
|
|
<i class="ti ti-user-check me-2 ti-sm"></i>
|
|
<span class="align-middle"><?= lang("App.menu_profile") ?></span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<div class="dropdown-divider"></div>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item" id="btn-log-out" href="<?= site_url("logout") ?>">
|
|
<i class="ti ti-logout me-2 ti-sm"></i>
|
|
<span class="align-middle"><?= lang("App.menu_logout") ?></span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<!--/ User -->
|
|
</ul>
|
|
</div>
|
|
|
|
</nav>
|
|
<!-- / Navbar -->
|
|
|
|
<!-- Content wrapper -->
|
|
<div class="content-wrapper">
|
|
<!-- Content -->
|
|
|
|
<div class="container-fluid flex-grow-1 container-p-y">
|
|
<?php
|
|
// Include breadcrumbs block
|
|
include "breadcrumbs.php"
|
|
?>
|
|
|
|
<?=
|
|
// Render the content section
|
|
$this->renderSection('content')
|
|
?>
|
|
</div>
|
|
<!-- / Content -->
|
|
|
|
<!-- Footer -->
|
|
<footer class="content-footer footer bg-footer-theme">
|
|
<div class="container-fluid">
|
|
<div
|
|
class="footer-container d-flex align-items-center justify-content-between py-2 flex-md-row flex-column">
|
|
<div>
|
|
<a href="#" target="_blank" class="fw-semibold">Safekat</a> © <?= date('Y'); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<!-- / Footer -->
|
|
|
|
<div class="content-backdrop fade"></div>
|
|
</div>
|
|
<!-- Content wrapper -->
|
|
</div>
|
|
<!-- / Layout page -->
|
|
</div>
|
|
|
|
<!-- Overlay -->
|
|
<div class="layout-overlay layout-menu-toggle"></div>
|
|
|
|
<!-- Drag Target Area To SlideIn Menu On Small Screens -->
|
|
<div class="drag-target"></div>
|
|
</div>
|
|
<!-- / Layout wrapper -->
|
|
|
|
<?= $this->renderSection('footerAdditions') ?>
|
|
|
|
<!-- Core JS -->
|
|
<!-- build:js assets/vendor/js/core.js -->
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
|
|
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
|
|
|
|
<script type="module" src="<?= site_url('assets/js/safekat/pages/chatNotification.js') ?>"></script>
|
|
<script type="module" src="<?= site_url('assets/js/safekat/pages/layout.js') ?>"></script>
|
|
|
|
|
|
<!-- endbuild -->
|
|
|
|
<!-- Vendors JS -->
|
|
<?= $this->renderSection('additionalExternalJs') ?>
|
|
|
|
<!-- Main JS -->
|
|
<script src="<?= site_url('themes/vuexy/js/main.js') ?>"></script>
|
|
|
|
<!-- Page JS -->
|
|
<?= sweetAlert() ?>
|
|
|
|
<?php
|
|
if (isset($global_js_variables)) {
|
|
echo "<script>\n";
|
|
foreach ($global_js_variables as $name => $value):
|
|
echo "\t" . "var $name = $value;" . "\n";
|
|
endforeach;
|
|
echo "</script>\n";
|
|
}
|
|
?>
|
|
|
|
|
|
<script type="text/javascript">
|
|
<?= $this->renderSection('globalJsFunctions') ?>
|
|
|
|
var theTable;
|
|
var <?= csrf_token() ?? 'token' ?>v = '<?= csrf_hash() ?>';
|
|
|
|
function yeniden(andac = null) {
|
|
if (andac == null) {
|
|
andac = <?= csrf_token() ?>v;
|
|
} else {
|
|
<?= csrf_token() ?>v = andac;
|
|
}
|
|
$('input[name="<?= csrf_token() ?>"]').val(andac);
|
|
$('meta[name="<?= config('Security')->tokenName ?>"]').attr('content', andac)
|
|
$.ajaxSetup({
|
|
headers: {
|
|
'<?= config('Security')->headerName ?>': andac,
|
|
'X-Requested-With': 'XMLHttpRequest'
|
|
},
|
|
<?= csrf_token() ?>: andac
|
|
});
|
|
}
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
const browserUrl = window.location.pathname;
|
|
|
|
document.querySelectorAll('.menu-item a.menu-link').forEach(function (link) {
|
|
const href = link.getAttribute('href');
|
|
if (!href || href === 'javascript:void(0);') return;
|
|
|
|
const tempAnchor = document.createElement('a');
|
|
tempAnchor.href = href;
|
|
const linkPath = tempAnchor.pathname;
|
|
|
|
// Corrección: coincide si es igual o si browserUrl empieza con el linkPath + '/'
|
|
if (browserUrl === linkPath || browserUrl.startsWith(linkPath + '/')) {
|
|
const menuItem = link.closest('.menu-item');
|
|
if (menuItem) {
|
|
menuItem.classList.add('active');
|
|
}
|
|
|
|
const parent = menuItem?.closest('.menu-sub');
|
|
if (parent) {
|
|
const parentItem = parent.closest('.menu-item');
|
|
if (parentItem) {
|
|
parentItem.classList.add('active', 'open');
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
function adjustSidebar4ContentWrapper() {
|
|
if ($('#sidebar').hasClass('d-none') && $(window).width() <= 768) {
|
|
$('#contentWrapper').addClass('full-width');
|
|
} else {
|
|
if (!$('#sidebar').hasClass('inactive')) {
|
|
$('#contentWrapper').removeClass('full-width');
|
|
}
|
|
}
|
|
}
|
|
|
|
adjustSidebar4ContentWrapper();
|
|
|
|
$('#sidebarCollapse').on('click', function () {
|
|
|
|
if ($('#sidebar').hasClass('d-none') && $(window).width() <= 768) {
|
|
$('#sidebar').removeClass('d-none d-sm-none d-md-block');
|
|
|
|
$('#contentWrapper').removeClass('full-width');
|
|
} else {
|
|
$('#sidebar').toggleClass('inactive');
|
|
$('#contentWrapper').toggleClass('full-width');
|
|
$('.collapse.in').toggleClass('in');
|
|
$('a[aria-expanded=true]').attr('aria-expanded', 'false');
|
|
}
|
|
|
|
});
|
|
|
|
$(window).resize(function () {
|
|
adjustSidebar4ContentWrapper();
|
|
});
|
|
|
|
<?= $this->renderSection('additionalInlineJs') ?>
|
|
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|