Nick Beckley 04a41e81b0 Phase 1T
2026-06-01 15:42:44 +01:00

42 lines
1.6 KiB
Plaintext

@model IReadOnlyList<Project>
@{
ViewData["Title"] = "Projects";
}
<div class="page-heading">
<div>
<p class="eyebrow">Series planning</p>
<h1>Projects</h1>
</div>
<a class="btn btn-primary" asp-action="Create">New project</a>
</div>
@if (!Model.Any())
{
<section class="empty-panel">
<h2>Start with a series or standalone novel</h2>
<p>Create a project, then add books, chapters and scenes in narrative order.</p>
<a class="btn btn-primary" asp-action="Create">Create your first project</a>
</section>
}
else
{
<div class="content-grid">
@foreach (var project in Model)
{
<article class="plain-card">
<h2>@project.ProjectName</h2>
<p>@(string.IsNullOrWhiteSpace(project.Description) ? "No description yet." : project.Description)</p>
<div class="button-row">
<a class="btn btn-outline-primary btn-sm" asp-action="Details" asp-route-id="@project.ProjectID">Open</a>
<a class="btn btn-outline-secondary btn-sm" asp-action="Edit" asp-route-id="@project.ProjectID">Edit</a>
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this project?&#10;&#10;This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
<input type="hidden" name="id" value="@project.ProjectID" />
<button class="btn btn-outline-danger btn-sm" type="submit">Archive</button>
</form>
</div>
</article>
}
</div>
}