Initial Commit

This commit is contained in:
2026-03-01 15:14:42 -04:00
commit f60174625e
377 changed files with 98166 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
@model IEnumerable<SchoolDto>
@{
ViewData["Title"] = "Schools";
var zones = ViewBag.Zones as IEnumerable<ZoneDto>;
var selectedZone = ViewBag.SelectedZone as int?;
var selectedLevel = ViewBag.SelectedLevel as string;
}
<div class="d-flex justify-content-between align-items-center mb-3">
<h2>Schools</h2>
<a asp-action="Create" class="btn btn-primary">Add School</a>
</div>
<form method="get" class="row g-2 mb-3">
<div class="col-auto">
<select name="zoneId" class="form-select form-select-sm">
<option value="">All Zones</option>
@if (zones != null) { @foreach (var z in zones) { <option value="@z.ZoneId" selected="@(selectedZone == z.ZoneId)">@z.Name</option> } }
</select>
</div>
<div class="col-auto">
<select name="level" class="form-select form-select-sm">
<option value="">All Levels</option>
<option value="Primary" selected="@(selectedLevel == "Primary")">Primary</option>
<option value="Secondary" selected="@(selectedLevel == "Secondary")">Secondary</option>
<option value="College" selected="@(selectedLevel == "College")">College</option>
</select>
</div>
<div class="col-auto">
<button type="submit" class="btn btn-sm btn-outline-primary">Filter</button>
</div>
</form>
<partial name="_Notification" />
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Name</th>
<th>Short Name</th>
<th>Level</th>
<th>Zone</th>
<th>Students</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var school in Model)
{
<tr>
<td>@school.Name</td>
<td>@school.ShortName</td>
<td><span class="badge bg-secondary">@school.SchoolLevel</span></td>
<td>@school.ZoneName</td>
<td>@school.StudentCount</td>
<td>
<a asp-action="Edit" asp-route-id="@school.SchoolId" class="btn btn-sm btn-outline-primary">Edit</a>
<a asp-controller="Student" asp-action="Index" asp-route-schoolId="@school.SchoolId" class="btn btn-sm btn-outline-info">Students</a>
</td>
</tr>
}
</tbody>
</table>