29 lines
2.1 KiB
Plaintext

@using PlotLine.Models.WritingSolver
@model SolverWorkspaceChoice
@{ Layout="_PublicLayout"; var characterChoice=Model.ProjectId is not null; }
<section class="solver-space"><div class="solver-content solver-workspace-picker">
<p class="marketing-eyebrow">Start here</p>
<h1>@Model.Capability.Name</h1>
<p>@Model.Capability.Shows</p>
@if((characterChoice?Model.Characters.Count:Model.Projects.Count)==0)
{
<p>@(characterChoice ? "There are no characters to follow in this project yet. Add a character when you are ready, or explore the tool first." : "You do not have an active project to open yet. You can explore the tool before creating one.")</p>
<a class="marketing-btn marketing-btn--primary" href="@Model.Capability.Tour">See how @Model.Capability.Name works →</a>
<p><a class="editorial-link" href="@(characterChoice ? "/Characters?projectId="+Model.ProjectId : "/Projects")">Go to @(characterChoice?"characters":"projects") →</a></p>
}
else
{
<form method="get" action="/problem-solver/workspace/@Model.Capability.Id">
@if(characterChoice) { <input type="hidden" name="projectId" value="@Model.ProjectId" /> }
<label for="solver-workspace-context">@(characterChoice?"Which character would you like to follow?":"Which project would you like to open?")</label>
<select id="solver-workspace-context" name="@(characterChoice?"characterId":"projectId")" required>
<option value="">Choose @(characterChoice?"a character":"a project")</option>
@if(characterChoice) { @foreach(var character in Model.Characters) { <option value="@character.CharacterID">@character.CharacterName</option> } }
else { @foreach(var project in Model.Projects) { <option value="@project.ProjectID">@project.ProjectName</option> } }
</select>
<button type="submit" class="marketing-btn marketing-btn--primary">Open @Model.Capability.Name →</button>
</form>
}
<p><a class="editorial-link" href="/problem-solver">Back to the Problem Solver →</a></p>
</div></section>