PlotDirector/PlotLine/Views/Writer/_WriterAuthoring.cshtml

49 lines
6.0 KiB
Plaintext

@model PlotLine.Models.WriterAuthoringPage
<div data-authoring-content>
<div class="writer3-authoring-heading"><h2>What you're trying to achieve</h2><help-icon key="writer3.authoring" /></div>
<p class="writer3-caption">@(Model.Scene?.SceneTitle??Model.Chapter.ChapterTitle) · @(Model.Scene==null?"Chapter focus":"Scene focus") · Recorded state: @(Model.Scene?.RevisionStatusName??Model.Chapter.RevisionStatusName). Manuscript prose stays in Word.</p>
<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind==(Model.SceneID.HasValue?"Scene":"Goals")))" />
<details class="writer3-authoring-details"><summary>Chapter summary and additional intentions</summary>
<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="Chapter"))" />
@if(Model.SceneID.HasValue){<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="Goals"))" />}
</details>
@if(Model.SceneID.HasValue){
<h2>Notes and things to remember</h2>
<ul class="writer3-reminder-preview">@foreach(var section in Model.Sections.Where(x=>x.Kind=="Note" && x.Value("IsResolved")!="true" || x.Kind=="Checklist" && x.Value("IsCompleted")!="true").OrderByDescending(x=>x.Value("IsPinned")=="true").ThenBy(x=>int.TryParse(x.Value("SortOrder"),out var order)?order:int.MaxValue).Take(3)){<li>@{var text=section.Kind=="Note"?section.Value("NoteText"):section.Value("ItemText");}@(text.Length>240?text[..240]+"…":text)</li>}</ul>
<details class="writer3-authoring-details"><summary>All scene notes, reminders and working details</summary>
@foreach(var section in Model.Sections.Where(x=>x.Kind is "Note" or "Checklist")){<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="section" />}
<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="Workflow"))" />
<p class="writer3-caption">Saving working details does not change scene revision state or checklist completion. Recorded working words are separate from accepted manuscript counts.</p>
</details>
<div data-authoring-new-records></div>
<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="AddNote"))" /><partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="AddChecklist"))" />
<details class="writer3-authoring-details"><summary>Attachments and advanced scene information</summary><p>Use the existing editor for uploads, deletion, purpose categories, revision state and other dependent story records.</p>@foreach(var attachment in Model.Attachments){<p>@attachment.Title</p>}<a asp-controller="Scenes" asp-action="Edit" asp-route-id="@Model.SceneID">Open full scene editor</a></details>
}else{
<h2>Scenes in this chapter</h2>
@if(Model.Scenes.Count==0){<p>There are no scenes yet. You can work at chapter level, or add a scene in the chapter editor.</p>}
@foreach(var scene in Model.Scenes){<form asp-controller="Writer" asp-action="SaveObjective" method="post" class="writer3-scene-choice"><input type="hidden" name="BookID" value="@Model.BookID" /><input type="hidden" name="ChapterID" value="@Model.ChapterID" /><input type="hidden" name="SceneID" value="@scene.SceneID" /><input type="hidden" name="Activity" value="@ViewData["WorkingActivity"]" /><span>@scene.SceneTitle · @scene.RevisionStatusName</span><button class="btn btn-sm btn-outline-secondary" type="submit">Work on this scene</button></form>}
<p class="writer3-caption">Chapter reminders live in the existing Things to include and Concerns fields above. Scene notes remain with their scenes; session return notes remain with sessions.</p>
}
<div class="writer3-inset" data-authoring-next-area><h3>Next useful action</h3>
@if(Model.SceneID.HasValue && string.IsNullOrWhiteSpace(Model.Sections.First(x=>x.Kind=="Scene").Value("ScenePurposeNotes"))){<button type="button" class="btn btn-outline-secondary" data-authoring-next="@($"Scene-{Model.SceneID}")">Add what needs to happen</button>}
else if(Model.Chapter.IsLinkedToManuscript){<a asp-controller="ManuscriptReader" asp-action="Index" asp-route-bookId="@Model.BookID" asp-route-chapterId="@Model.ChapterID">Read the accepted chapter</a><p class="writer3-caption">Unsynchronised Word edits are not shown by Reader.</p>}
else if(Model.SceneID.HasValue){<a asp-controller="Scenes" asp-action="Edit" asp-route-id="@Model.SceneID">Develop this recorded scene</a><p class="writer3-caption">Return to Word for manuscript prose; this workspace edits supporting information.</p>}
else{<a asp-controller="Chapters" asp-action="Edit" asp-route-id="@Model.ChapterID">Develop this chapter or add a scene</a>}
</div>
</div>
<template data-authoring-companion>
<section class="writer3-reference-summary"><h3>Recorded story references</h3>
@if(Model.Scene==null){<p>@Model.Chapter.ChapterTitle</p><p>@Model.Scenes.Count recorded scenes. Select a scene to see its saved people, setting and threads.</p>}
else{
<p><strong>Setting:</strong> @(Model.Scene.PrimaryLocationID.HasValue?Model.Scene.PrimaryLocationName??"Recorded setting unavailable":"No location recorded")</p>
<p><strong>People:</strong> @(Model.Characters.Count==0?"No scene appearances recorded":string.Join(", ",Model.Characters.Take(6).Select(x=>x.CharacterName)))</p>
<p><strong>Threads:</strong> @(Model.Threads.Count==0?"No thread events recorded":string.Join("; ",Model.Threads.Take(4).Select(x=>$"{x.PlotLineName}: {x.ThreadTitle} — {x.EventTypeName}")))</p>
var feeling=Model.Sections.First(x=>x.Kind=="Goals").Value("EmotionalGoal");
@if(!string.IsNullOrWhiteSpace(feeling)){<p><strong>Chapter feeling intention:</strong> @feeling</p>}
<p><strong>Relationships:</strong> @(Model.Relationships.Count==0?"No verified relationship events recorded":string.Join("; ",Model.Relationships.Take(4).Select(x=>$"{x.CharacterAName} / {x.CharacterBName}: {x.RelationshipTypeName}")))</p>
}
<p class="writer3-caption">Saved records only; no manuscript analysis or inferred story facts. Open Context for the full reference categories and recorded metrics.</p>
</section>
</template>