This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
<?= $this->extend('layout/main_layout') ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php $isSchoolYearReadonly = (bool) ($isSchoolYearReadonly ?? false); ?>
|
||||
<div class="container py-4">
|
||||
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||
<div>
|
||||
<h3 class="mb-0">Class Progress Reports</h3>
|
||||
<div class="text-muted">Review weekly submissions and compare Islamic Studies with Quran/Arabic.</div>
|
||||
</div>
|
||||
<a href="<?= base_url('teacher/progress/submit') ?>" class="btn btn-outline-secondary">Submit New Report</a>
|
||||
<?php if ($isSchoolYearReadonly): ?>
|
||||
<span class="btn btn-outline-secondary disabled" aria-disabled="true">Submit New Report</span>
|
||||
<?php else: ?>
|
||||
<a href="<?= base_url('teacher/progress/submit') ?>" class="btn btn-outline-secondary">Submit New Report</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -15,6 +20,9 @@
|
||||
$classSectionOptions = $classSectionOptions ?? [];
|
||||
$selectedSectionId = $selectedSectionId ?? null;
|
||||
?>
|
||||
<?php if ($isSchoolYearReadonly): ?>
|
||||
<div class="alert alert-warning">This school year is read-only. Progress submissions can be viewed but not changed.</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($classSectionOptions)): ?>
|
||||
<form method="get" class="mb-3 row g-2 align-items-center">
|
||||
<div class="col-auto">
|
||||
@@ -90,7 +98,9 @@
|
||||
<td class="text-end">
|
||||
<?php if ($exampleReport): ?>
|
||||
<a href="<?= base_url('teacher/progress/view/' . $exampleReport['id']) ?>" class="btn btn-sm btn-outline-primary">View Weekly Details</a>
|
||||
<a href="<?= base_url('teacher/progress/edit/' . $exampleReport['id']) ?>" class="btn btn-sm btn-outline-secondary ms-1">Edit</a>
|
||||
<?php if (!$isSchoolYearReadonly): ?>
|
||||
<a href="<?= base_url('teacher/progress/edit/' . $exampleReport['id']) ?>" class="btn btn-sm btn-outline-secondary ms-1">Edit</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user