PlotDirector/PlotLine/Views/Writing/_ContextRelationships.cshtml

15 lines
2.8 KiB
Plaintext
Raw Permalink 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.

@model WritingContextDisplayViewModel
@{var point=Model.Context!.Position;var scene=Model.Context.Scene!;}
<div data-context-relationships data-book="@point.BookId" data-scene="@scene.SceneID" data-pov="@scene.POVCharacterID" data-can-edit="@Model.ContextRelationshipCanEdit.ToString().ToLowerInvariant()">
<div class="context-lens-selector" role="group" aria-label="Relationship lens"><button type="button" class="btn btn-outline-primary" data-relationship-lens="family" aria-pressed="true">Family</button><button type="button" class="btn btn-outline-primary" data-relationship-lens="story" aria-pressed="false">Story</button></div>
<nav data-family-index class="context-family-index" aria-label="Families represented in this scene"></nav>
<div class="context-explorer-controls"><label>Find a character or alias <input type="search" class="form-control" data-relationship-person maxlength="120" autocomplete="off" placeholder="At least two letters"/></label><button type="button" class="btn btn-outline-secondary btn-sm" data-relationship-pov disabled="@(!scene.POVCharacterID.HasValue)">Centre on scene POV</button></div>
<div data-relationship-matches class="context-edit-actions"></div>
<p data-relationship-caption class="small"></p><div class="context-graph-toolbar"><button type="button" class="btn btn-outline-secondary btn-sm" data-graph-zoom="in" aria-label="Zoom in">+</button><button type="button" class="btn btn-outline-secondary btn-sm" data-graph-zoom="out" aria-label="Zoom out">−</button><button type="button" class="btn btn-outline-secondary btn-sm" data-graph-centre>Centre selection</button><button type="button" class="btn btn-outline-secondary btn-sm" data-graph-expand>Explore another generation</button><span data-graph-range class="small"></span></div>
<div class="context-relationship-graph"><svg data-relationship-svg role="group" tabindex="0" aria-label="Family and Story relationship diagram. Drag to pan, use zoom buttons or pinch. Arrow keys pan; plus and minus zoom; Home centres."><g data-relationship-viewport></g></svg></div>
<div data-relationship-legend class="context-graph-legend" aria-label="Connection legend"></div><p data-relationship-status role="status"></p>
<section data-relationship-details class="context-graph-details" aria-label="Selected person or connection" tabindex="-1"></section>
@if(Model.ContextRelationshipCanEdit){<button type="button" class="btn btn-outline-primary btn-sm" data-context-relationship-edit="initial" data-relationship-reference="family" data-relationship-add>Add one family connection</button>}
<p data-context-interaction-status role="status"></p><a href="/RelationshipMap?projectId=@point.ProjectId&bookId=@point.BookId&sceneId=@scene.SceneID" data-context-workspace-target="relationships" data-relationship-editor target="_blank" rel="noopener">Open in Relationships Editor</a>
</div>