51 lines
2.3 KiB
Plaintext
51 lines
2.3 KiB
Plaintext
@model PlotLine.Services.Context.IntentMaterial
|
|
@foreach (var scope in new[] { false, true })
|
|
{
|
|
var notes = Model.Notes.Where(n => n.SceneID.HasValue == scope && (!string.IsNullOrWhiteSpace(n.WritingNotes) || n.Items.Count > 0));
|
|
var references = Model.References.Where(r => r.SceneID.HasValue == scope);
|
|
if (!notes.Any() && !references.Any()) { continue; }
|
|
<section class="mb-3">
|
|
<h3 class="h6">@(scope ? "Scene planning material" : "Chapter planning material")</h3>
|
|
@foreach (var note in notes)
|
|
{
|
|
<div class="mb-2">
|
|
@if (!string.IsNullOrWhiteSpace(note.WritingNotes))
|
|
{
|
|
<div style="white-space: pre-wrap">@note.WritingNotes</div>
|
|
}
|
|
@if (note.Items.Count > 0)
|
|
{
|
|
<ul class="mb-1">
|
|
@foreach (var item in note.Items)
|
|
{
|
|
<li>@item.Title @if (item.Completed) { <small class="text-body-secondary">Completed</small> }</li>
|
|
}
|
|
</ul>
|
|
}
|
|
<small class="text-body-secondary">@note.ThreadTitle</small>
|
|
</div>
|
|
}
|
|
<ul class="list-unstyled mb-0">
|
|
@foreach (var reference in references)
|
|
{
|
|
var url = Url.Action("Download", "StoryElementReferences", new { reference.EntityType, reference.EntityID, reference.ReferenceID });
|
|
<li class="mb-2">
|
|
@if (reference.Kind == "Image")
|
|
{
|
|
<a href="@url" target="_blank" rel="noopener"><img src="@url" alt="@(reference.Title ?? reference.OriginalFileName)" class="img-fluid d-block" style="max-height: 10rem" loading="lazy" /></a>
|
|
}
|
|
else if (reference.OriginalFileName is not null)
|
|
{
|
|
<a href="@url" target="_blank" rel="noopener">@(reference.Title ?? reference.OriginalFileName)</a>
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(reference.Note))
|
|
{
|
|
<div>@reference.Note</div>
|
|
}
|
|
<small class="text-body-secondary">@reference.Source</small>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</section>
|
|
}
|