23 lines
5.9 KiB
Plaintext
23 lines
5.9 KiB
Plaintext
@model RelationshipEvolutionViewModel
|
||
@{ViewData["DesktopLayout"]="details";ViewData["Title"]="Relationship Evolution";var r=Model.Relationship;var pages=Math.Max(1,(Model.Total+24)/25);var points=Model.Events.Where(e=>e.Intensity.HasValue&&e.EvidenceState=="Verified").ToArray();var min=Model.Events.Select(e=>e.GlobalSceneIndex).DefaultIfEmpty(0).Min();var max=Model.Events.Select(e=>e.GlobalSceneIndex).DefaultIfEmpty(1).Max();}
|
||
<div data-relationship-history-content data-history-page="@Model.Page">
|
||
<div class="page-heading" data-relationship-evolution="@r.CharacterRelationshipID"><div><p class="eyebrow">Relationship Evolution · Definition #@r.CharacterRelationshipID</p><h1>@r.CharacterAName @(r.IsReciprocal?"↔":"→") @r.CharacterBName</h1><p>@r.RelationshipTypeName · @(r.IsReciprocal?"One reciprocal definition":"Directional definition")</p></div><a class="btn btn-outline-secondary" asp-controller="Characters" asp-action="Details" asp-route-id="@Model.ReturnCharacterID" asp-route-tab="relationships" asp-route-sceneId="@Model.ReturnSceneID" asp-route-relationshipId="@r.CharacterRelationshipID">Return to character Relationships</a></div>
|
||
<p class="character-long-text">@r.Notes</p><p class="small">@(r.IsInitialRelationship?"Initial author definition":"Scene-established definition"). Events below remain distinct from the underlying definition. @Model.Total recorded event(s).</p>
|
||
@if(Model.Events.Count>1&&points.Length>1){
|
||
<section class="plain-card relationship-evolution-chart"><h2>Recorded intensity</h2><p class="small">Horizontal: canonical manuscript scene order (this page). Vertical: recorded intensity, 1–10. Each purple point is one verified event; missing values and intermediate states are not inferred. Select a point to inspect its event.</p>
|
||
<svg viewBox="0 0 800 210" role="group" aria-label="Recorded event intensities in canonical scene order">
|
||
@foreach(var level in new[]{1,5,10}){var y=170-(level-1)*16; <g><line x1="40" y1="@y" x2="770" y2="@y"/><text x="10" y="@(y+4)">@level</text></g>}
|
||
@foreach(var e in points){var x=50+(e.GlobalSceneIndex-min)*710m/Math.Max(1,max-min);var y=170-(e.Intensity!.Value-1)*16;<a href="#event-@e.RelationshipEventID" aria-label="Scene @e.SceneNumber, @e.RelationshipStateName, intensity @e.Intensity"><circle cx="@x.ToString(System.Globalization.CultureInfo.InvariantCulture)" cy="@y" r="6"><title>@e.BookDisplayTitle · Ch @e.ChapterNumber · Scene @e.SceneNumber · @e.RelationshipStateName · Intensity @e.Intensity</title></circle></a>}
|
||
<text x="40" y="202">First recorded scene on this page</text><text x="770" y="202" text-anchor="end">Last recorded scene on this page</text>
|
||
</svg></section>
|
||
}else if(Model.Total==0){<section class="plain-card"><h2>No recorded events</h2><p>This author definition has no scene-based developments. No timeline or intensity has been inferred. Use the scene editor to record a development.</p></section>}
|
||
else{<p class="plain-card">@(Model.Total==1?"One recorded event: its state and any recorded intensity are shown below.":"Recorded changes are shown chronologically below. This page has insufficient verified intensity values for a useful chart.")</p>}
|
||
@if(Model.Issues.Any()){<partial name="_DynamicsIssues" model="Model.Issues"/>}else{<p class="small">No recorded continuity warnings for this definition.</p>}
|
||
<section data-relationship-events><h2>Recorded history</h2>
|
||
@foreach(var e in Model.Events){<article class="plain-card character-record" id="event-@e.RelationshipEventID" data-evolution-event="@e.RelationshipEventID"><h3>@e.BookDisplayTitle · Ch @e.ChapterNumber · Scene @e.SceneNumber: @e.SceneTitle</h3><p><strong>@e.RelationshipStateName</strong> · Intensity @(e.Intensity?.ToString()??"not recorded") · @(e.IsKnownToOtherCharacter?"Known to the other character":"Not recorded as known to the other character")</p><p class="character-long-text">@e.Description</p><p class="small">@e.EvidenceState @(e.SourceReviewKey!=null?"· Accepted review source":"") · Event #@e.RelationshipEventID</p>@if(e.EvidenceState!="Verified"){<p class="text-warning">Source evidence needs review; this is not an established relationship development.</p>}
|
||
<div class="button-row"><a asp-controller="Scenes" asp-action="Edit" asp-route-id="@e.SceneID">Open scene / source</a>@if(Model.CanEdit){<button type="button" class="btn btn-outline-primary btn-sm" data-history-operation="event-edit" data-event="@e.RelationshipEventID">Edit event</button><button type="button" class="btn btn-outline-danger btn-sm" data-history-operation="event-remove" data-event="@e.RelationshipEventID">Remove event</button>}</div></article>}
|
||
</section><div class="button-row">@if(Model.Page>1){<a class="btn btn-outline-secondary" asp-route-id="@r.CharacterRelationshipID" asp-route-page="@(Model.Page-1)" asp-route-returnCharacterId="@Model.ReturnCharacterID" asp-route-returnSceneId="@Model.ReturnSceneID">Previous events</a>}<span>Page @Model.Page of @pages · up to 25 events per page</span>@if(Model.Page<pages){<a class="btn btn-outline-secondary" asp-route-id="@r.CharacterRelationshipID" asp-route-page="@(Model.Page+1)" asp-route-returnCharacterId="@Model.ReturnCharacterID" asp-route-returnSceneId="@Model.ReturnSceneID">Next events</a>}<a asp-controller="Timeline" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID" asp-route-FocusType="relationship" asp-route-FocusID="@r.CharacterRelationshipID">Show on timeline</a></div>
|
||
</div>
|
||
<div data-relationship-history-shell data-project-id="@Model.Project.ProjectID" data-character-id="@Model.ReturnCharacterID" data-relationship-id="@r.CharacterRelationshipID"><p data-history-status role="status"></p><dialog data-history-dialog aria-labelledby="character-operation-title"><div data-history-dialog-content></div><button type="button" data-history-fallback>Cancel</button></dialog></div>
|
||
@section Scripts{<link rel="stylesheet" href="~/css/character-workspace.css" asp-append-version="true"/><script src="~/js/relationship-history.js" asp-append-version="true"></script>}
|