Revert "fix(sidebar): null-check en route de children para evitar TypeError en PHP 8.2"
This reverts commit ba27511414.
This commit is contained in:
@@ -78,7 +78,7 @@ $adminNombre = $_SESSION['admin_user']['full_name'] ?? $_SESSION['admin_user']['
|
||||
<title><?= htmlspecialchars($deskNombre ?? 'Recepción') ?> — Turnero</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
||||
<link href="<?= BASE_URL ?>assets/css/styles.css?v=14" rel="stylesheet">
|
||||
<link href="<?= BASE_URL ?>assets/css/styles.css?v=12" rel="stylesheet">
|
||||
<style>
|
||||
/* ── Layout de dos columnas ── */
|
||||
.rec-layout {
|
||||
|
||||
@@ -177,7 +177,7 @@ if (class_exists('ModuleRegistry', false)) {
|
||||
// Sub-acordeón para links con hijos
|
||||
$subId = $catId . '-sub-' . $slug . '-' . $lnkIdx;
|
||||
$hasActive = false;
|
||||
foreach ($children as $ch) { if (!empty($ch['route']) && $_isActive($ch['route']) !== '') { $hasActive = true; break; } }
|
||||
foreach ($children as $ch) { if ($_isActive($ch['route']) !== '') { $hasActive = true; break; } }
|
||||
?>
|
||||
<li class="sb-sub-header<?= $hasActive ? ' has-active' : '' ?>"
|
||||
onclick="sbToggleSub('<?= $subId ?>',this,event)">
|
||||
@@ -188,9 +188,8 @@ if (class_exists('ModuleRegistry', false)) {
|
||||
<li class="sb-sub-group<?= $hasActive ? '' : ' collapsed' ?>" id="<?= $subId ?>">
|
||||
<ul>
|
||||
<?php foreach ($children as $ch):
|
||||
$chRoute = $ch['route'] ?? '';
|
||||
$href = $chRoute ? $_base . $chRoute : '#';
|
||||
$active = $chRoute ? $_isActive($chRoute) : '';
|
||||
$href = $_base . $ch['route'];
|
||||
$active = $_isActive($ch['route']);
|
||||
?>
|
||||
<li><a href="<?= htmlspecialchars($href, ENT_QUOTES, 'UTF-8') ?>"
|
||||
class="nav-link nav-link-sub<?= $active ?>">
|
||||
|
||||
Reference in New Issue
Block a user