122 lines
6.6 KiB
Plaintext
122 lines
6.6 KiB
Plaintext
@model WritingIntentDisplayViewModel
|
|
@{
|
|
var scene = Model.Context?.Scene;
|
|
var position = Model.Context?.Position;
|
|
var workflow = Model.ChapterWorkflow;
|
|
var chapter = workflow?.Chapter ?? Model.Context?.Chapter;
|
|
var book = workflow?.Book ?? Model.Context?.Book;
|
|
var project = workflow?.Project ?? Model.Context?.Project;
|
|
var projectId = position?.ProjectId ?? project?.ProjectID;
|
|
var bookId = position?.BookId ?? book?.BookID;
|
|
var chapterId = position?.ChapterId ?? chapter?.ChapterID;
|
|
var sceneId = position?.SceneId;
|
|
}
|
|
|
|
<div class="writing-context-content"
|
|
data-writing-intent-fragment
|
|
data-project-id="@projectId"
|
|
data-book-id="@bookId"
|
|
data-chapter-id="@chapterId"
|
|
data-scene-id="@sceneId"
|
|
data-follow-status="@Model.FollowStatus">
|
|
@if (!Model.HasChapter && scene is null)
|
|
{
|
|
<section class="writing-context-empty">
|
|
<p class="eyebrow">Intent</p>
|
|
<h2>@Model.EmptyTitle</h2>
|
|
<p>@Model.EmptyMessage</p>
|
|
</section>
|
|
}
|
|
else
|
|
{
|
|
<header class="writing-context-scene-header">
|
|
<div>
|
|
<p class="eyebrow">@project?.ProjectName</p>
|
|
<h2>@(scene?.SceneTitle ?? $"Chapter {chapter?.ChapterNumber:g}: {chapter?.ChapterTitle}")</h2>
|
|
<p>
|
|
@book?.BookDisplayTitle
|
|
@if (chapter is not null)
|
|
{
|
|
<span aria-hidden="true">/</span>
|
|
<span>Chapter @(chapter.ChapterNumber.ToString("0.##"))</span>
|
|
}
|
|
@if (scene is not null)
|
|
{
|
|
<span aria-hidden="true">/</span>
|
|
<span>Scene @(scene.SceneNumber.ToString("0.##"))</span>
|
|
}
|
|
</p>
|
|
@if (Model.IsChapterOnly)
|
|
{
|
|
<p>No current scene. Showing chapter intent.</p>
|
|
}
|
|
else if (scene is not null && string.IsNullOrWhiteSpace(scene.Summary) && string.IsNullOrWhiteSpace(scene.ScenePurposeNotes) && !scene.ChecklistItems.Any())
|
|
{
|
|
<p>No scene-specific plan. Showing chapter intent.</p>
|
|
}
|
|
</div>
|
|
<div class="writing-context-scene-actions">
|
|
@if (chapter is not null)
|
|
{
|
|
<label for="writing-intent-chapter-select">Jump to chapter</label>
|
|
<select id="writing-intent-chapter-select" class="form-select form-select-sm" data-writing-intent-chapter-select>
|
|
<option value="@chapter.ChapterID" selected>Chapter @(chapter.ChapterNumber.ToString("0.##")): @chapter.ChapterTitle</option>
|
|
</select>
|
|
}
|
|
<label for="writing-intent-scene-select">Jump to scene</label>
|
|
<select id="writing-intent-scene-select" class="form-select form-select-sm" data-writing-intent-scene-select>
|
|
<option value="">No current scene</option>
|
|
@foreach (var option in Model.SceneOptions)
|
|
{
|
|
<option value="@option.Value" selected="@option.Selected">@option.Text</option>
|
|
}
|
|
</select>
|
|
@if (scene is not null)
|
|
{
|
|
<a class="btn btn-outline-secondary btn-sm" asp-controller="Scenes" asp-action="Edit" asp-route-id="@scene.SceneID">Edit Scene</a>
|
|
}
|
|
else if (chapter is not null)
|
|
{
|
|
<a class="btn btn-outline-secondary btn-sm" asp-controller="Writer" asp-action="Chapter" asp-route-id="@chapter.ChapterID">Edit Chapter Plan</a>
|
|
}
|
|
</div>
|
|
</header>
|
|
|
|
<nav class="writing-context-tabs" aria-label="Writing intent tabs">
|
|
<button type="button" class="active" data-writing-intent-tab="plan">Plan</button>
|
|
<button type="button" data-writing-intent-tab="must-include">Must Include</button>
|
|
<button type="button" data-writing-intent-tab="notes">Notes</button>
|
|
<button type="button" data-writing-intent-tab="threads">Threads</button>
|
|
<button type="button" data-writing-intent-tab="evidence">Evidence</button>
|
|
<button type="button" data-writing-intent-tab="checklist">Checklist</button>
|
|
</nav>
|
|
|
|
<div class="writing-context-tab-panels">
|
|
<section class="writing-context-tab-panel active" data-writing-intent-panel="plan">
|
|
<partial name="_WritingIntentPlan" model="Model" />
|
|
</section>
|
|
<section class="writing-context-tab-panel" data-writing-intent-panel="must-include" hidden>
|
|
<partial name="_WritingIntentMustInclude" model="Model" />
|
|
</section>
|
|
<section class="writing-context-tab-panel" data-writing-intent-panel="notes" hidden>
|
|
<partial name="_WritingIntentNotes" model="Model" />
|
|
</section>
|
|
<section class="writing-context-tab-panel" data-writing-intent-panel="threads" hidden>
|
|
<partial name="_WritingIntentThreads" model="Model" />
|
|
</section>
|
|
<section class="writing-context-tab-panel" data-writing-intent-panel="evidence" hidden>
|
|
@if(scene is not null){<article class="writing-context-card" data-intent-assessment data-scene="@scene.SceneID">
|
|
@Html.AntiForgeryToken()
|
|
<h3>Is the writing achieving the plan?</h3><p>Compare saved manuscript prose with saved intentions. Nothing changes in your plan or Word document. Unchanged results are reused.</p>
|
|
<div class="intent-decision-actions"><button type="button" class="btn btn-outline-secondary" data-intent-load>Show saved evidence</button><button type="button" class="btn btn-primary" data-intent-analyse>Assess saved prose with AI</button><button type="button" class="btn btn-outline-secondary" data-intent-cancel disabled>Cancel</button></div>
|
|
<p role="status" aria-live="polite" data-intent-assessment-status></p><div data-intent-assessment-body></div>
|
|
<a asp-controller="Scenes" asp-action="Edit" asp-route-id="@scene.SceneID">Edit intentions and objective completion</a>
|
|
</article>}else{<p>Choose a scene with saved manuscript prose to assess its intentions.</p>}
|
|
</section>
|
|
<section class="writing-context-tab-panel" data-writing-intent-panel="checklist" hidden>
|
|
<partial name="_WritingIntentChecklist" model="Model" />
|
|
</section>
|
|
</div>
|
|
}
|
|
</div>
|