Files
MVE/views/partials/sidebar_configuracion.php

130 lines
4.2 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- views/partials/sidebar_configuracion.php -->
<?php
if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador') {
header('Location: /IMPORTADORES/login');
exit;
}
?>
<style>
.nav .nav-link {
font-weight: normal;
color: white;
transition: all 0.3s ease;
}
.nav .nav-link:hover,
.nav .nav-link.active {
background-color: #495057;
color: #fff;
}
/* Estilo inverso solo para pantallas pequeñas (sidebar tipo offcanvas) */
@media (max-width: 767.98px) {
.nav .nav-link {
font-weight: normal;
color: #343a40;
background-color: transparent;
}
.nav .nav-link:hover,
.nav .nav-link.active {
background-color: #e9ecef;
color: #212529;
}
}
</style>
<!-- NAVBAR -->
<nav class="navbar navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<!-- Botón de menú para móviles -->
<button class="btn btn-outline-light d-md-none me-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#sidebarMenu">
</button>
<span class="navbar-brand">SIIH | Configuración</span>
<div class="d-none d-md-flex">
<a href="/IMPORTADORES/importadores/dashboard" class="btn btn-outline-light btn-sm">
<- Volver al Panel Principal
</a>
</div>
</div>
</nav>
<!-- SIDEBAR FIJA (escritorio) -->
<div class="d-none d-md-block bg-dark text-white position-fixed h-100 pt-5" style="width: 250px;">
<nav class="nav flex-column">
<!-- INFORMACIÓN GENERAL -->
<a href="/IMPORTADORES/configuracion/index"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/dashboard_configuracion') ? 'active' : '' ?>">
Información General
</a>
<!-- AUTOMATIZACIONES -->
<a href="/IMPORTADORES/configuracion/automatizaciones"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/automatizaciones') ? 'active' : '' ?>">
⚙️ Automatizaciones
</a>
<!-- PREFERENCIAS -->
<a href="/IMPORTADORES/configuracion/preferencias"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/preferencias') ? 'active' : '' ?>">
✅ Preferencias
</a>
<!-- SEGURIDAD -->
<a href="/IMPORTADORES/configuracion/seguridad"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/seguridad') ? 'active' : '' ?>">
🦺 Seguridad
</a>
<!-- BITÁCORAS -->
<a href="/IMPORTADORES/configuracion/bitacoras"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/bitacoras') ? 'active' : '' ?>">
📖 Bitácoras
</a>
</nav>
</div>
<!-- OFFCANVAS PARA MÓVILES -->
<div class="offcanvas offcanvas-start d-md-none" tabindex="-1" id="sidebarMenu">
<div class="offcanvas-header">
<h5 class="offcanvas-title">Menú</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas"></button>
</div>
<div class="offcanvas-body">
<!-- INFORMACIÓN GENERAL -->
<!-- INFORMACIÓN GENERAL -->
<a href="/IMPORTADORES/configuracion/index"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/dashboard_configuracion') ? 'active' : '' ?>">
Información General
</a>
<!-- AUTOMATIZACIONES -->
<a href="/IMPORTADORES/configuracion/automatizaciones"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/automatizaciones') ? 'active' : '' ?>">
⚙️ Automatizaciones
</a>
<!-- PREFERENCIAS -->
<a href="/IMPORTADORES/configuracion/preferencias"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/preferencias') ? 'active' : '' ?>">
✅ Preferencias
</a>
<!-- SEGURIDAD -->
<a href="/IMPORTADORES/configuracion/seguridad"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/seguridad') ? 'active' : '' ?>">
🦺 Seguridad
</a>
<!-- BITÁCORAS -->
<a href="/IMPORTADORES/configuracion/bitacoras"
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/bitacoras') ? 'active' : '' ?>">
📖 Bitácoras
</a>
</div>
</div>