26 lines
2.5 KiB
Plaintext
26 lines
2.5 KiB
Plaintext
@model WritingContextDisplayViewModel
|
||
@using PlotLine.Services.Context
|
||
@{
|
||
var explorer=Model.CharacterExplorer??ContextCharacterPanels.Compose(Model,
|
||
Model.Context!.Scene!.SceneCharacters.Select(a=>new Character{CharacterID=a.CharacterID,ProjectID=a.ProjectID,CharacterName=a.CharacterName,ImagePath=a.CharacterImagePath,ThumbnailPath=a.CharacterThumbnailPath}).ToList(),Model.Context.Scene.SceneCharacters,[],false);
|
||
}
|
||
<div data-character-explorer data-book="@explorer.BookID" data-scene="@explorer.SceneID">
|
||
<div class="context-explorer-controls">
|
||
<label>Find a character <input type="search" class="form-control form-control-sm" data-character-filter autocomplete="off" /></label>
|
||
<label>Show <select class="form-select form-select-sm" data-character-scope><option value="scene">Scene participants (@explorer.Rows.Count(r=>r.InScene))</option><option value="catalogue">Character catalogue (@explorer.Rows.Count)</option></select></label>
|
||
</div>
|
||
@if(!explorer.Rows.Any(r=>r.InScene)){<p data-character-empty>No characters recorded for this scene. The catalogue remains available.</p>}
|
||
<p class="small text-muted">Previous and next locations are recorded appearances in this book’s narrative order. Next is a future author reference, not an intention or viewpoint knowledge.</p>
|
||
<div class="context-character-list">
|
||
@foreach(var row in explorer.Rows){
|
||
<details class="context-character-row" data-context-character="@row.Character.CharacterID" data-in-scene="@row.InScene.ToString().ToLowerInvariant()" data-filter-name="@row.Character.CharacterName" tabindex="-1" hidden="@(!row.InScene)">
|
||
<summary><partial name="~/Views/Shared/_Avatar.cshtml" model="@(new AvatarViewModel{DisplayName=row.Character.CharacterName,ImagePath=row.Character.ImagePath,ThumbnailPath=row.Character.ThumbnailPath,Size="sm"})" /><strong>@row.Character.CharacterName</strong><span>@(row.IsPov?"POV · ":"")@row.Participation</span><small>@row.Classification</small></summary>
|
||
<partial name="~/Views/Writing/_ContextCharacterDetail.cshtml" model="(explorer,row)" />
|
||
</details>
|
||
}
|
||
</div>
|
||
<p data-character-no-matches hidden>No matching characters. Try the catalogue or a different spelling.</p>
|
||
<div data-character-inspection></div><p data-context-interaction-status role="status"></p>
|
||
<a href="/Characters?projectId=@explorer.ProjectID" data-context-workspace-target="characters" target="_blank" rel="noopener">Open full Characters workspace</a>
|
||
</div>
|