This commit is contained in:
@@ -2,22 +2,10 @@
|
||||
<?= $this->section('content') ?>
|
||||
<div class="container my-5">
|
||||
<h3 class="text-center text-success" style="font-family: Arial, sans-serif;">Attendance Record</h2>
|
||||
<?php if (!empty($selectedYear)): ?>
|
||||
<div class="text-center text-muted small">School Year: <?= esc($selectedYear) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<!-- Filter Form -->
|
||||
|
||||
|
||||
<form action="" method="get" class="form-inline">
|
||||
<div class="d-flex align-items-center">
|
||||
<select name="school_year" id="school_year" class="form-control me-3"> <!-- Added me-3 (right margin) -->
|
||||
<?php foreach ($schoolYears as $year): ?>
|
||||
<option value="<?= esc($year['school_year']) ?>" <?= $selectedYear === $year['school_year'] ? 'selected' : '' ?>>
|
||||
<?= esc($year['school_year']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-success">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Error Message -->
|
||||
<?php if (isset($error)): ?>
|
||||
@@ -52,7 +40,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-info mb-3 d-inline-block">No attendance records found for the selected school year.</div>
|
||||
<div class="alert alert-info mb-3 d-inline-block">No attendance records found for this school year.</div>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -2,21 +2,11 @@
|
||||
<?= $this->section('content') ?>
|
||||
<div class="container my-5">
|
||||
<h3 class="text-center text-success" style="font-family: Arial, sans-serif;">Enroll in Classes</h3>
|
||||
<?php if (!empty($selectedYear)): ?>
|
||||
<div class="text-center text-muted small">School Year: <?= esc($selectedYear) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- School Year Filter -->
|
||||
<form action="<?= base_url('/parent/enroll_classes') ?>" method="get" class="form-inline mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<select name="school_year" id="school_year" class="form-control me-3">
|
||||
<?php foreach ($schoolYears as $year): ?>
|
||||
<option value="<?= esc($year['school_year']) ?>" <?= $selectedYear === $year['school_year'] ? 'selected' : '' ?>>
|
||||
<?= esc($year['school_year']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-success">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
// Put this near the very top of the file (before output), or right after the extend/section lines.
|
||||
$tz = (string) (config('School')->attendance['timezone'] ?? user_timezone());
|
||||
|
||||
@@ -63,24 +63,11 @@ if (!function_exists('parseDbDateTime')) {
|
||||
|
||||
<div class="container my-5">
|
||||
<h3 class="text-center text-success" style="font-family: Arial, sans-serif;">Invoices and Payments</h3>
|
||||
<?php if (!empty($selectedYear)): ?>
|
||||
<div class="text-center text-muted small">School Year: <?= esc($selectedYear) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- School Year Filter -->
|
||||
<form action="<?= base_url('/parent/invoice_payment') ?>" method="get" class="form-inline mb-3">
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<select name="school_year" id="school_year" class="form-control me-3">
|
||||
<?php foreach ($schoolYears as $year): ?>
|
||||
<option value="<?= esc($year['school_year']) ?>"
|
||||
<?= ($selectedYear === $year['school_year']) ? 'selected' : '' ?>
|
||||
<?= ($currentSchoolYear === $year['school_year']) ? 'data-current="true"' : '' ?>>
|
||||
<?= esc($year['school_year']) ?><?= ($currentSchoolYear === $year['school_year']) ? ' (Current)' : '' ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-success">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Display Payment Notice / Deadline -->
|
||||
<?php
|
||||
$displayTz = user_timezone();
|
||||
@@ -198,7 +185,7 @@ $deadline = parseDbDateTime($dueDate, 'UTC', $displayTz); // format either DATE
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-info mb-3 d-inline-block">
|
||||
No invoice found for the selected school year.
|
||||
No invoice found for this school year.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -208,18 +195,6 @@ $deadline = parseDbDateTime($dueDate, 'UTC', $displayTz); // format either DATE
|
||||
|
||||
<?= $this->section('scripts') ?>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const dropdown = document.getElementById('school_year');
|
||||
const options = dropdown.options;
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
if (options[i].dataset.current === "true") {
|
||||
options[i].style.fontWeight = 'bold';
|
||||
if (!dropdown.value) dropdown.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function showPaymentDevelopmentMessage(event) {
|
||||
event.preventDefault();
|
||||
alert('The payment method is currently under development. Please contact the school administration at alrahma.isgl@gmail.com');
|
||||
|
||||
@@ -3,24 +3,12 @@
|
||||
<div class="container my-5">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||
<h3 class="text-success mb-0" style="font-family: Arial, sans-serif;">Scores</h3>
|
||||
<?php if (!empty($selectedYear)): ?>
|
||||
<div class="text-muted small">School Year: <?= esc($selectedYear) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filter Form -->
|
||||
<form action="" method="get" class="form-inline">
|
||||
<div class="d-flex align-items-center">
|
||||
<select name="school_year" id="school_year" class="form-control me-3"> <!-- Added me-3 (right margin) -->
|
||||
<?php foreach ($schoolYears as $year): ?>
|
||||
<option value="<?= esc($year) ?>" <?= $selectedYear === $year ? 'selected' : '' ?>>
|
||||
<?= esc($year) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-success">Filter</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- Scores Table -->
|
||||
<?php $yearScores = $organizedScores[$selectedYear] ?? []; ?>
|
||||
<?php $semesterOrder = $semesterOrder ?? ['Fall', 'Spring']; ?>
|
||||
@@ -104,12 +92,10 @@ $showExamScoresBySemester = $showExamScoresBySemester ?? [];
|
||||
<?php
|
||||
$reportStudentId = (int) ($student['student_id'] ?? 0);
|
||||
if ($reportStudentId > 0) {
|
||||
$reportYear = (string) ($selectedYear ?? '');
|
||||
$reportSemester = (string) ($semester ?? '');
|
||||
$reportDate = date('Y-m-d');
|
||||
$reportUrl = base_url('parent/report-cards/view/' . $reportStudentId);
|
||||
$query = http_build_query([
|
||||
'school_year' => $reportYear,
|
||||
'semester' => $reportSemester,
|
||||
'report_date' => $reportDate,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user