cf6acc125f
- CSS fix: change blanket .table-responsive hide to only trigger when a .mobile-card-view sibling exists (.mobile-card-view ~ .table-responsive and :has() rule) — auto-fixes 60+ forms/reports/detail/help pages that were showing blank on mobile by making their tables scroll instead - Add mobile card views to remaining list pages: JobsPriority (overdue jobs, main board, maintenance sections) NotificationLogs (email/SMS log entries) AiUsageReport (per-company AI usage breakdown) GiftCertificates/BulkResult (batch certificate list) Inventory/SamplePanels (Need to Order + On Wall tabs) BannedIps (active bans + lifted/expired bans) OnboardingProgress (per-company activation funnel) ReleaseNotes/Manage (versioned changelog entries) StorageMigration/Results (file migration status list) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
220 lines
11 KiB
Plaintext
220 lines
11 KiB
Plaintext
@model List<PowderCoating.Core.Entities.ReleaseNote>
|
|
@{
|
|
ViewData["Title"] = "Release Notes Manager";
|
|
|
|
string TagBadge(string tag) => tag switch {
|
|
"Feature" => "bg-primary",
|
|
"Improvement" => "bg-info",
|
|
"Fix" => "bg-warning text-dark",
|
|
"Breaking" => "bg-danger",
|
|
"Security" => "bg-dark",
|
|
_ => "bg-secondary"
|
|
};
|
|
}
|
|
|
|
<div class="container-fluid py-3">
|
|
<div class="d-flex align-items-center justify-content-between mb-3">
|
|
<div>
|
|
<h4 class="mb-0"><i class="bi bi-journal-text me-2 text-primary"></i>Release Notes Manager</h4>
|
|
<small class="text-muted">Publish versioned changelogs visible to all platform users</small>
|
|
</div>
|
|
<div class="d-flex gap-2">
|
|
<a asp-action="Index" class="btn btn-outline-secondary btn-sm" target="_blank">
|
|
<i class="bi bi-eye me-1"></i>Preview Changelog
|
|
</a>
|
|
<a asp-action="Create" class="btn btn-primary btn-sm">
|
|
<i class="bi bi-plus-circle me-1"></i>New Release Note
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
@if (TempData["Success"] != null)
|
|
{
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
<i class="bi bi-check-circle me-2"></i>@TempData["Success"]
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
}
|
|
|
|
@* Summary cards *@
|
|
<div class="row g-3 mb-3">
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold">@Model.Count</div>
|
|
<div class="small text-muted">Total</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-success">@Model.Count(r => r.IsPublished)</div>
|
|
<div class="small text-muted">Published</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-warning">@Model.Count(r => !r.IsPublished)</div>
|
|
<div class="small text-muted">Draft</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-primary">@Model.Count(r => r.IsPublished && r.ReleasedAt >= DateTime.UtcNow.AddDays(-30))</div>
|
|
<div class="small text-muted">Last 30 Days</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="mobile-card-view">
|
|
<div class="mobile-card-list">
|
|
@foreach (var note in Model)
|
|
{
|
|
<div class="mobile-data-card">
|
|
<div class="mobile-card-header">
|
|
<div class="mobile-card-icon" style="background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);">
|
|
<i class="bi bi-journal-text"></i>
|
|
</div>
|
|
<div class="mobile-card-title">
|
|
<h6><code>v@(note.Version)</code> — @note.Title</h6>
|
|
<small>
|
|
<span class="badge @TagBadge(note.Tag)">@note.Tag</span>
|
|
|
|
@if (note.IsPublished)
|
|
{
|
|
<span class="badge bg-success">Published</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="badge bg-warning text-dark">Draft</span>
|
|
}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<div class="mobile-card-body">
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">Released</span>
|
|
<span class="mobile-card-value text-muted">@note.ReleasedAt.ToString("MM/dd/yyyy")</span>
|
|
</div>
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">Created By</span>
|
|
<span class="mobile-card-value text-muted">@note.CreatedByUserName</span>
|
|
</div>
|
|
@if (note.Body.Length > 0)
|
|
{
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">Preview</span>
|
|
<span class="mobile-card-value text-muted">@(note.Body.Length > 60 ? note.Body[..60] + "…" : note.Body)</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="mobile-card-footer">
|
|
<a asp-action="Edit" asp-route-id="@note.Id" class="btn btn-sm btn-outline-secondary">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<form asp-action="TogglePublish" asp-route-id="@note.Id" method="post" class="d-inline">
|
|
@Html.AntiForgeryToken()
|
|
<button type="submit" class="btn btn-sm @(note.IsPublished ? "btn-outline-warning" : "btn-outline-success")">
|
|
<i class="bi @(note.IsPublished ? "bi-eye-slash" : "bi-eye")"></i>
|
|
</button>
|
|
</form>
|
|
<form asp-action="Delete" asp-route-id="@note.Id" method="post" class="d-inline"
|
|
onsubmit="return confirm('Delete v@(note.Version)?')">
|
|
@Html.AntiForgeryToken()
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
}
|
|
@if (!Model.Any())
|
|
{
|
|
<div class="text-center text-muted py-5">
|
|
<i class="bi bi-journal-x fs-1 d-block mb-2 opacity-25"></i>
|
|
No release notes yet. <a asp-action="Create">Create the first one.</a>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0 small">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th style="width:100px">Version</th>
|
|
<th>Title</th>
|
|
<th style="width:100px">Tag</th>
|
|
<th style="width:110px">Released</th>
|
|
<th style="width:90px">Status</th>
|
|
<th style="width:130px">Created By</th>
|
|
<th style="width:100px"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (!Model.Any())
|
|
{
|
|
<tr>
|
|
<td colspan="7" class="text-center text-muted py-5">
|
|
<i class="bi bi-journal-x fs-1 d-block mb-2 opacity-25"></i>
|
|
No release notes yet. <a asp-action="Create">Create the first one.</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
@foreach (var note in Model)
|
|
{
|
|
<tr class="@(note.IsPublished ? "" : "opacity-75")">
|
|
<td>
|
|
<code class="fw-semibold">v@(note.Version)</code>
|
|
</td>
|
|
<td>
|
|
<div class="fw-medium">@note.Title</div>
|
|
@if (note.Body.Length > 80)
|
|
{
|
|
<small class="text-muted">@note.Body[..80]…</small>
|
|
}
|
|
</td>
|
|
<td>
|
|
<span class="badge @TagBadge(note.Tag)">@note.Tag</span>
|
|
</td>
|
|
<td class="text-muted">@note.ReleasedAt.ToString("MM/dd/yyyy")</td>
|
|
<td>
|
|
@if (note.IsPublished)
|
|
{
|
|
<span class="badge bg-success">Published</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="badge bg-warning text-dark">Draft</span>
|
|
}
|
|
</td>
|
|
<td class="text-muted">@note.CreatedByUserName</td>
|
|
<td>
|
|
<div class="d-flex gap-1">
|
|
<a asp-action="Edit" asp-route-id="@note.Id"
|
|
class="btn btn-sm btn-outline-secondary py-0 px-2" title="Edit">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<form asp-action="TogglePublish" asp-route-id="@note.Id" method="post" class="d-inline">
|
|
@Html.AntiForgeryToken()
|
|
<button type="submit"
|
|
class="btn btn-sm @(note.IsPublished ? "btn-outline-warning" : "btn-outline-success") py-0 px-2"
|
|
title="@(note.IsPublished ? "Unpublish" : "Publish")">
|
|
<i class="bi @(note.IsPublished ? "bi-eye-slash" : "bi-eye")"></i>
|
|
</button>
|
|
</form>
|
|
<form asp-action="Delete" asp-route-id="@note.Id" method="post" class="d-inline"
|
|
onsubmit="return confirm('Delete v@(note.Version)?')">
|
|
@Html.AntiForgeryToken()
|
|
<button type="submit" class="btn btn-sm btn-outline-danger py-0 px-2" title="Delete">
|
|
<i class="bi bi-trash"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|