PlotDirector/PlotLine/Views/Writing/_WritingContextStory.cshtml

97 lines
3.3 KiB
Plaintext

@model WritingContextDisplayViewModel
@{
var scene = Model.Context!.Scene!;
static string TextOr(string? value, string fallback) => string.IsNullOrWhiteSpace(value) ? fallback : value.Trim();
}
<div class="writing-context-grid">
<article class="writing-context-card">
<p class="eyebrow">Threads</p>
@if (!scene.ThreadEvents.Any())
{
<p>No story thread events recorded.</p>
}
else
{
<ul class="writing-context-list">
@foreach (var item in scene.ThreadEvents)
{
<li><strong>@item.PlotLineName / @item.ThreadTitle</strong> @TextOr(item.EventTitle, item.EventTypeName)</li>
}
</ul>
}
</article>
<article class="writing-context-card">
<p class="eyebrow">Knowledge</p>
@if (!scene.CharacterKnowledge.Any())
{
<p>No knowledge changes recorded.</p>
}
else
{
<ul class="writing-context-list">
@foreach (var item in scene.CharacterKnowledge)
{
<li><strong>@item.CharacterName</strong> @item.KnowledgeStateName: @TextOr(item.Description, item.AssetName ?? item.ThreadTitle ?? "Knowledge change recorded.")</li>
}
</ul>
}
</article>
<article class="writing-context-card">
<p class="eyebrow">Dependencies</p>
@if (!scene.DependenciesThisSceneNeeds.Any() && !scene.DependenciesNeedingThisScene.Any())
{
<p>No dependencies recorded.</p>
}
else
{
<ul class="writing-context-list">
@foreach (var item in scene.DependenciesThisSceneNeeds.Concat(scene.DependenciesNeedingThisScene).Take(8))
{
<li><strong>@item.SceneDependencyTypeName</strong> @TextOr(item.Description, "Scene dependency recorded.")</li>
}
</ul>
}
</article>
<article class="writing-context-card">
<p class="eyebrow">Assets</p>
@if (!scene.AssetEvents.Any() && !scene.AssetCustodyEvents.Any())
{
<p>No important asset events recorded.</p>
}
else
{
<ul class="writing-context-list">
@foreach (var item in scene.AssetEvents.Take(6))
{
<li><strong>@item.AssetName</strong> @TextOr(item.EventTitle, item.AssetEventTypeName)</li>
}
@foreach (var item in scene.AssetCustodyEvents.Take(6))
{
<li><strong>@item.AssetName</strong> @TextOr(item.CustodianSummary, item.CustodyEventTypeName)</li>
}
</ul>
}
</article>
<article class="writing-context-card writing-context-card--wide">
<p class="eyebrow">Continuity</p>
@if (!scene.Warnings.Any() && !scene.AgeContinuityWarnings.Any())
{
<p>No continuity warnings.</p>
}
else
{
<ul class="writing-context-list">
@foreach (var warning in scene.Warnings.Concat(scene.AgeContinuityWarnings))
{
<li><strong>@warning.SeverityName</strong> @warning.Message</li>
}
</ul>
}
</article>
</div>