PlotDirector/PlotLine/Views/Writer/_ObjectiveForm.cshtml

10 lines
2.0 KiB
Plaintext

@model WriterDashboardViewModel
@{ var objective = Model.Objective; }
<form asp-action="SaveObjective" method="post" class="writer-objective-form">
<input type="hidden" name="BookID" value="@Model.BookID" />
<label>Working activity<select class="form-select" name="Activity">@foreach(var activity in new[]{"Drafting","Revising","Editing","Researching","Proofreading"}){<option selected="@(objective?.Activity==activity)" value="@activity">@activity</option>}</select></label>
<label>Begin with<select class="form-select" name="ChapterID" data-objective-chapter><option value="">Whole manuscript</option>@if(objective?.ChapterID is int savedChapter&&!Model.ObjectiveChoices.Any(x=>x.ChapterID==savedChapter)){<option value="@savedChapter" selected>Unavailable saved chapter — choose an explicit replacement</option>}@foreach(var chapter in Model.ObjectiveChoices.DistinctBy(x=>x.ChapterID)){<option value="@chapter.ChapterID" selected="@(objective?.ChapterID==chapter.ChapterID)">@chapter.ChapterTitle</option>}</select></label>
<label>Scene (optional)<select class="form-select" name="SceneID" data-objective-scene><option value="">Chapter workspace</option>@if(objective?.SceneID is int savedScene&&!Model.ObjectiveChoices.Any(x=>x.SceneID==savedScene)){<option value="@savedScene" data-chapter="@objective.ChapterID" selected>Unavailable saved scene — choose an explicit replacement</option>}@foreach(var scene in Model.ObjectiveChoices.Where(x=>x.SceneID.HasValue)){<option value="@scene.SceneID" data-chapter="@scene.ChapterID" selected="@(objective?.SceneID==scene.SceneID)">@scene.SceneTitle</option>}</select></label>
<div class="button-row"><button class="btn btn-primary" name="scheduleNow" value="false">Save objective · start without a schedule</button><button class="btn btn-outline-secondary" name="scheduleNow" value="true">Save &amp; plan writing time</button></div>
</form>