Files
maintenancepages/Pages/Admin/Templates/Index.cshtml
T
2026-02-23 21:09:46 -05:00

41 lines
1.2 KiB
Plaintext

@page
@model maintenance.Pages.Admin.Templates.IndexModel
@{
ViewData["Title"] = "Templates";
}
<h1>Manage Pages</h1>
<p>Create and schedule maintenance/error pages while keeping the visual template fixed.</p>
<p><a asp-page="./Create" class="btn btn-primary">Create page from template</a></p>
<table class="table table-striped">
<thead>
<tr>
<th>Key</th>
<th>Kind</th>
<th>Default</th>
<th>Enabled</th>
<th>Window</th>
<th>Updated</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.Templates)
{
<tr>
<td>@item.Key</td>
<td>@item.PageKind</td>
<td>@item.IsDefaultFallback</td>
<td>@item.IsEnabled</td>
<td>@(item.StartUtc?.ToString("u") ?? "-") to @(item.EndUtc?.ToString("u") ?? "-")</td>
<td>@item.LastUpdatedAtUtc.ToString("u")</td>
<td>
<a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
<a href="@Model.GetPreviewUrl(item)" target="_blank" rel="noopener">Preview</a>
</td>
</tr>
}
</tbody>
</table>