PlotDirector/PlotLine/Views/Writing/_WritingContextPlotLines.cshtml

25 lines
3.5 KiB
Plaintext

@model PlotLineWorkspaceViewModel
@{
var scenes=Model.AssociationScenes.OrderBy(s=>s.NarrativeOrder).ToArray();
var byScene=Model.Scenes.ToDictionary(s=>s.SceneID);
}
<div data-writing-component-fragment data-context-story-chart="plots">
<button type="button" class="btn btn-link btn-sm float-end" data-context-refresh title="Read updated saved information; does not request AI">Refresh saved data</button>
<p class="text-muted small">Saved Plot Lines · Focus or Weave using the line filters. Scrubbing explores the story; only “Go to scene” requests Word navigation.</p>
@if(scenes.Length==0||Model.PlotLines.Count==0){<p>No saved plot-line developments are available for this book.</p>}
else{
<div class="writing-chart-controls"><button type="button" class="btn btn-sm btn-outline-secondary" data-context-center>Show current scene</button><label>Spacing <input type="range" min="28" max="120" value="64" data-context-spacing data-writing-view-state="plot-spacing" /></label></div>
<fieldset class="writing-plot-filters"><legend class="small">Plot Lines</legend>@foreach(var line in Model.PlotLines){<label><input type="checkbox" checked data-context-line-filter="@line.Line.PlotLineID" data-writing-view-state="plot-line-@line.Line.PlotLineID" /> @line.Line.PlotLineName</label>}</fieldset>
<div class="writing-story-scroll" tabindex="0" aria-label="Plot developments in manuscript order" data-writing-view-state="plot-scroll">
<div class="writing-story-chart" style="--scene-count:@scenes.Length" data-context-chart>
<div class="writing-current-marker" data-context-current-marker aria-hidden="true"></div>
<div class="writing-plot-row writing-plot-index"><strong>Manuscript</strong>@for(var i=0;i<scenes.Length;i++){var scene=scenes[i];<button type="button" data-context-explore="@i" data-context-chart-scene="@scene.SceneID" data-scene-index="@i" title="@scene.SceneTitle">@(scene.ChapterNumber.ToString("0.##")) / @(scene.SceneNumber.ToString("0.##"))</button>}</div>
@foreach(var line in Model.PlotLines){<div class="writing-plot-row" data-context-line="@line.Line.PlotLineID" style="--line-colour:@line.Line.Colour"><strong>@line.Line.PlotLineName</strong>@for(var i=0;i<scenes.Length;i++){var scene=scenes[i];var membership=byScene.GetValueOrDefault(scene.SceneID)?.Memberships.FirstOrDefault(m=>m.PlotLineID==line.Line.PlotLineID);<button type="button" data-context-explore="@i" class="@(membership!=null?"has-development":"")" title="@(membership!=null?string.Join(" · ",membership.Contributions.Select(c=>c.CanonicalTitle)):"No saved development")">@(membership!=null?"●":"·")</button>}</div>}
</div></div>
<label class="writing-scrubber">Explore scenes <input type="range" min="0" max="@(scenes.Length-1)" value="0" data-context-scrubber data-writing-view-state="plot-scrub" /></label>
<div class="writing-chart-evidence" data-context-exploration>
@for(var i=0;i<scenes.Length;i++){var scene=scenes[i];<article data-context-scene-card="@i" hidden="@(i!=0)"><h3 class="h5">@scene.SceneTitle</h3><p>Chapter @(scene.ChapterNumber.ToString("0.##")) · Scene @(scene.SceneNumber.ToString("0.##"))</p>@if(byScene.GetValueOrDefault(scene.SceneID) is {} detail){@foreach(var membership in detail.Memberships){<h4 class="h6">@membership.PlotLineName</h4><ul>@foreach(var contribution in membership.Contributions){<li>@contribution.ThreadTitle · @contribution.CanonicalTitle</li>}</ul>}}else{<p>No saved plot developments in this scene.</p>}<button type="button" class="btn btn-sm btn-outline-primary" data-context-go-scene="@scene.SceneID">Go to scene</button></article>}
</div>
}
</div>