PlotDirector/PlotLine/Views/StoryAssets/_SceneHistory.cshtml

54 lines
2.5 KiB
Plaintext

@model StoryAssetDetailViewModel
<section class="list-section mt-3">
<h2>Scene history <help-icon key="storyAssets.eventsAcrossScenes" /></h2>
@if (Model.SceneHistory.Count == 0)
{
<p class="muted">No scene records yet.</p>
}
else
{
<ol class="asset-scene-history">
@foreach (var scene in Model.SceneHistory.GroupBy(item => item.SceneID))
{
var first = scene.First();
<li>
<a asp-controller="Timeline" asp-action="Index" asp-route-ProjectID="@Model.Project.ProjectID"
asp-route-SelectedSceneID="@scene.Key" asp-route-FocusType="asset"
asp-route-FocusID="@Model.Asset.StoryAssetID" asp-route-navigateFocus="true">
@first.BookDisplayTitle / Ch @first.ChapterNumber.ToString("G29") / Scene @first.SceneNumber.ToString("G29") · @first.SceneTitle
</a>
<ul>
@foreach (var item in scene)
{
<li>
<strong>@item.Title</strong>
@if (!string.IsNullOrWhiteSpace(item.Detail))
{
<span> · @item.Detail</span>
}
@if (!string.IsNullOrWhiteSpace(item.FromState) && !string.IsNullOrWhiteSpace(item.ToState)
&& item.FromState != item.ToState)
{
<span> · @item.FromState → @item.ToState</span>
}
else if (!string.IsNullOrWhiteSpace(item.ToState))
{
<span> · State @item.ToState</span>
}
else if (!string.IsNullOrWhiteSpace(item.FromState))
{
<span> · From @item.FromState</span>
}
@if (!string.IsNullOrWhiteSpace(item.Description) && item.Description != item.Title)
{
<span> · @item.Description</span>
}
</li>
}
</ul>
</li>
}
</ol>
}
</section>