56 lines
2.4 KiB
Plaintext
56 lines
2.4 KiB
Plaintext
@model PlotLine.Controllers.WriterIntentImportController.ImportPage
|
|
@{
|
|
ViewData["Title"] = "Paste chapter intentions";
|
|
ViewData["ProjectSection"] = "Writer";
|
|
}
|
|
<header data-pwa-task>
|
|
<h1>Paste chapter intentions</h1>
|
|
<p>Use a Markdown heading or a line beginning with “Chapter” before each block of notes, summaries, or bullets.</p>
|
|
</header>
|
|
<form asp-action="Index" method="post">
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
<input asp-for="BookID" type="hidden" />
|
|
@if (Model.Sections.Count == 0)
|
|
{
|
|
<label asp-for="Text" class="form-label">Chapter intentions</label>
|
|
<textarea asp-for="Text" class="form-control" rows="10" maxlength="64000" required></textarea>
|
|
}
|
|
else
|
|
{
|
|
<input asp-for="Text" type="hidden" />
|
|
@for (var i = 0; i < Model.Sections.Count; i++)
|
|
{
|
|
var block = Model.Sections[i];
|
|
<fieldset class="story-bible-card mb-3">
|
|
<legend>@block.Heading</legend>
|
|
<p style="white-space: pre-wrap">@block.Body</p>
|
|
<label asp-for="Mappings[i].ChapterID">Chapter</label>
|
|
<select asp-for="Mappings[i].ChapterID" class="form-select" required>
|
|
<option value="">Choose a chapter</option>
|
|
@foreach (var chapter in Model.Chapters)
|
|
{
|
|
<option value="@chapter.ChapterID">@chapter.ChapterTitle</option>
|
|
}
|
|
</select>
|
|
<label asp-for="Mappings[i].Mode">Save as</label>
|
|
<select asp-for="Mappings[i].Mode" class="form-select">
|
|
<option value="notes">Append to chapter Intent notes</option>
|
|
<option value="checklist">Add unchecked Intent items</option>
|
|
</select>
|
|
</fieldset>
|
|
}
|
|
}
|
|
<div class="button-row mt-3" data-pwa-context="Record">
|
|
@if (Model.Sections.Count == 0)
|
|
{
|
|
<button class="btn btn-primary" type="submit" name="step" value="preview">Preview pasted intentions</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-primary" type="submit" name="step" value="save">Save chapter intentions</button>
|
|
<a asp-action="Index" asp-route-bookId="@Model.BookID">Start a new paste</a>
|
|
}
|
|
<a asp-controller="Writer" asp-action="Index" asp-route-bookId="@Model.BookID">Cancel</a>
|
|
</div>
|
|
</form>
|