175 lines
8.3 KiB
Plaintext

@model ManuscriptScanReviewViewModel
@{
ViewData["Title"] = "Review manuscript scan";
var probableCharacters = Model.CharacterCandidates
.Where(candidate => string.Equals(candidate.Category, "ProbableCharacter", StringComparison.OrdinalIgnoreCase))
.ToList();
var possibleCharacters = Model.CharacterCandidates
.Where(candidate => string.Equals(candidate.Category, "PossibleCharacter", StringComparison.OrdinalIgnoreCase))
.ToList();
var relationshipTitles = Model.CharacterCandidates
.Where(candidate => string.Equals(candidate.Category, "RelationshipTitle", StringComparison.OrdinalIgnoreCase))
.ToList();
var excludedCharacters = Model.CharacterCandidates
.Where(candidate => string.Equals(candidate.Category, "Excluded", StringComparison.OrdinalIgnoreCase))
.ToList();
}
<section class="onboarding-shell" aria-labelledby="scan-review-title">
<div class="onboarding-panel onboarding-review-panel">
<div class="onboarding-copy">
<p class="eyebrow">@Model.SelectedBookTitle</p>
<h1 id="scan-review-title">Review manuscript scan</h1>
<p>@Model.DocumentTitle</p>
</div>
<div class="onboarding-scan-counts onboarding-review-counts">
<div>
<span>Chapters</span>
<strong>@Model.ChapterCount</strong>
</div>
<div>
<span>Scenes</span>
<strong>@Model.SceneCount</strong>
</div>
<div>
<span>Characters</span>
<strong>@Model.CharacterCandidateCount</strong>
</div>
<div>
<span>Words</span>
<strong>@Model.TotalWordCount.ToString("N0")</strong>
</div>
</div>
<section class="onboarding-review-grid" aria-label="Scan preview">
<div class="onboarding-review-section">
<h2>Chapters and scenes</h2>
@if (!Model.Chapters.Any())
{
<p>No chapters were detected. Make sure your chapter headings use Heading 1, or add clear chapter headings.</p>
}
else
{
<div class="onboarding-review-chapters">
@foreach (var chapter in Model.Chapters)
{
<article class="onboarding-review-chapter">
<header>
<span>Chapter @chapter.ChapterNumber</span>
<strong>@chapter.Title</strong>
<small>@chapter.WordCount.ToString("N0") words / @chapter.Scenes.Count scene@(chapter.Scenes.Count == 1 ? string.Empty : "s")</small>
</header>
@if (chapter.Scenes.Any())
{
<ol>
@foreach (var scene in chapter.Scenes)
{
<li>
<strong>@(scene.Title ?? $"Scene {scene.SceneNumberWithinChapter}")</strong>
<span>@scene.WordCount.ToString("N0") words</span>
@if (!string.IsNullOrWhiteSpace(scene.OpeningTextPreview))
{
<p>@scene.OpeningTextPreview</p>
}
</li>
}
</ol>
}
else
{
<p>No scene breaks were detected. PlotDirector will treat this chapter as one scene for now.</p>
}
</article>
}
</div>
}
</div>
<aside class="onboarding-review-section">
<h2>Character candidates</h2>
@if (!probableCharacters.Any() && !possibleCharacters.Any() && !relationshipTitles.Any())
{
<p>No repeated character names were found yet.</p>
}
else
{
<div class="onboarding-character-groups">
<section>
<h3>Probable characters</h3>
@if (!probableCharacters.Any())
{
<p>No high-confidence character names yet.</p>
}
else
{
<ul class="onboarding-character-candidates">
@foreach (var candidate in probableCharacters)
{
<li>
<strong>@candidate.Name</strong>
<span>@candidate.MentionCount mention@(candidate.MentionCount == 1 ? string.Empty : "s") / score @candidate.QualityScore</span>
</li>
}
</ul>
}
</section>
@if (possibleCharacters.Any())
{
<section>
<h3>Possible characters</h3>
<ul class="onboarding-character-candidates">
@foreach (var candidate in possibleCharacters)
{
<li>
<strong>@candidate.Name</strong>
<span>@candidate.MentionCount mention@(candidate.MentionCount == 1 ? string.Empty : "s") / score @candidate.QualityScore</span>
</li>
}
</ul>
</section>
}
@if (relationshipTitles.Any())
{
<section>
<h3>Relationship titles</h3>
<ul class="onboarding-character-candidates">
@foreach (var candidate in relationshipTitles)
{
<li>
<strong>@candidate.Name</strong>
<span>@candidate.MentionCount mention@(candidate.MentionCount == 1 ? string.Empty : "s")</span>
</li>
}
</ul>
</section>
}
@if (excludedCharacters.Any())
{
<details class="onboarding-excluded-candidates">
<summary>Show excluded candidates</summary>
<ul class="onboarding-character-candidates">
@foreach (var candidate in excludedCharacters)
{
<li>
<strong>@candidate.Name</strong>
<span>@candidate.MentionCount mention@(candidate.MentionCount == 1 ? string.Empty : "s") / @candidate.Reason</span>
</li>
}
</ul>
</details>
}
</div>
}
</aside>
</section>
<div class="onboarding-actions">
<a class="btn btn-outline-secondary" asp-controller="Onboarding" asp-action="Index">Back to setup</a>
</div>
</div>
</section>