PlotDirector/PlotLine/Views/Writing/_ContextCharacterDetail.cshtml

19 lines
3.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using PlotLine.Services.Context
@model ValueTuple<ContextCharacterExplorer,ContextCharacterRow>
@{var explorer=Model.Item1;var row=Model.Item2;}
<div class="context-character-detail" data-character-detail="@row.Character.CharacterID">
<div class="context-location-rail" aria-label="Recorded character locations">
@foreach(var item in new[]{("Previous",row.Previous),("Now",row.Now),("Next · future record",row.Next)}){
<div><strong>@item.Item1</strong>@if(item.Item2 is {} place){<button type="button" class="btn btn-link btn-sm" data-context-location="@place.LocationID" data-location-scene="@place.SceneID" data-location-chapter="@place.ChapterID">@place.Name</button><a href="/Scenes/Edit/@place.SceneID" data-context-workspace-target="scene" data-context-entity="@place.SceneID" target="_blank" rel="noopener" class="small">Source scene</a>}
else{<span>@(item.Item1=="Now"?(row.Participation=="Mentioned only"?"Mentioned only · no physical presence implied":row.Participation=="Unknown"?"Location unknown (recorded presence state)":row.Participation=="Off-screen"?"Off-screen · location not recorded":"No recorded location here"):"No recorded location")</span>}</div>
}
</div>
<dl class="writing-context-facts"><dt>Emotional state</dt><dd>@(string.IsNullOrWhiteSpace(row.Emotion)?"Not recorded in this scene":row.Emotion)</dd><dt>Physical condition</dt><dd>@(string.IsNullOrWhiteSpace(row.Condition)?"Not recorded in this scene":row.Condition)</dd><dt>Life status · author reference</dt><dd>@(row.Character.IsDeceased==true?"Deceased":row.Character.IsDeceased==false?"Living":"Unrecorded"). Global status, not evaluated at this scene.</dd><dt>Reference</dt><dd>@(string.IsNullOrWhiteSpace(row.Character.DefaultDescription)?"No character description recorded":row.Character.DefaultDescription)</dd></dl>
@if(row.Knowledge.Any()){<p class="small">@(row.IsPov?"Verified viewpoint knowledge at this point":"Author reference: this character’s established knowledge; not necessarily viewpoint knowledge")</p><ul>@foreach(var fact in row.Knowledge.Take(4)){<li>@fact.KnowledgeStateName: @fact.Description <a href="/Scenes/Edit/@fact.SceneID" data-context-workspace-target="scene" data-context-entity="@fact.SceneID" target="_blank" rel="noopener">Source</a></li>}</ul>}
@if(explorer.CanEdit){<div class="context-edit-actions">
@foreach(var field in new[]{("classification","Classification"),("description","Description"),("life-status","Life status")}){<button class="btn btn-outline-secondary btn-sm" type="button" data-context-edit="@field.Item1" data-character-id="@row.Character.CharacterID">Correct @field.Item2</button>}
@if(row.Appearance!=null){@foreach(var field in new[]{("emotion","Emotional state"),("condition","Physical condition"),("location","Current location")}){<button class="btn btn-outline-secondary btn-sm" type="button" data-context-edit="@field.Item1" data-character-id="@row.Character.CharacterID">Correct @field.Item2</button>}}
</div>}else{<p class="small">Read-only reference.</p>}
<a href="/Characters/Details/@row.Character.CharacterID" data-context-workspace-target="characters" data-context-entity="@row.Character.CharacterID" target="_blank" rel="noopener">Open character workspace</a>
</div>