This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
<body>
|
||||
<!-- Navbar -->
|
||||
<?php include(__DIR__ . '/../partials/navbar.php'); ?>
|
||||
<?= view('partials/school_year_selector') ?>
|
||||
|
||||
<div class="container my-4">
|
||||
<?= $this->renderSection('content') ?>
|
||||
|
||||
@@ -165,6 +165,7 @@ html, body { overflow-x: hidden; }
|
||||
|
||||
<body data-app-menu-mode="<?= esc($appMenuMode) ?>">
|
||||
<?php include(__DIR__ . '/../partials/navbar.php'); ?>
|
||||
<?= view('partials/school_year_selector') ?>
|
||||
|
||||
<?php
|
||||
$uri = service('uri');
|
||||
@@ -188,7 +189,11 @@ html, body { overflow-x: hidden; }
|
||||
if ($isTeacher) {
|
||||
$cfg = new \App\Models\ConfigurationModel();
|
||||
$tcModel = new \App\Models\TeacherClassModel();
|
||||
$sy = (string)($cfg->getConfig('school_year') ?? '');
|
||||
try {
|
||||
$sy = service('schoolYearContext')->resolve(service('request'))->yearName();
|
||||
} catch (\Throwable $e) {
|
||||
$sy = (string)($cfg->getConfig('school_year') ?? '');
|
||||
}
|
||||
$sem = (string)($cfg->getConfig('semester') ?? '');
|
||||
$uid = (int)(session()->get('user_id') ?? 0);
|
||||
if ($uid) {
|
||||
|
||||
@@ -287,6 +287,20 @@
|
||||
<!-- Header & Navbar -->
|
||||
<?php include(__DIR__ . '/../partials/header_back.php'); ?>
|
||||
<?php include(__DIR__ . '/../partials/navbar_dynamic.php'); ?>
|
||||
<?php
|
||||
$managementSchoolYearSelectorData = [];
|
||||
if (!isset($schoolYearContext, $schoolYearOptions) && session()->get('user_id')) {
|
||||
try {
|
||||
$managementSchoolYearSelectorData = service('schoolYearViewData')->forCurrentRequest(service('request'));
|
||||
$managementSchoolYearSelectorData['schoolYearSelectorEnabled'] = true;
|
||||
} catch (\Throwable $e) {
|
||||
log_message('warning', 'Unable to load management school-year selector: {message}', [
|
||||
'message' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?= view('partials/school_year_selector', $managementSchoolYearSelectorData) ?>
|
||||
|
||||
<!-- Main Wrapper -->
|
||||
<div class="wrapper">
|
||||
|
||||
Reference in New Issue
Block a user