52 lines
6.7 KiB
Plaintext
52 lines
6.7 KiB
Plaintext
@model ApplicationNavigationViewModel
|
|
@{
|
|
var projectId = Model.Project!.ProjectID;
|
|
string ActiveClass(string section) => string.Equals(Model.ActiveSection, section, StringComparison.OrdinalIgnoreCase) ? "active" : string.Empty;
|
|
}
|
|
<li class="nav-item">
|
|
<a class="nav-link @(ActiveClass("Writer"))" aria-current="@(Model.ActiveSection == "Writer" ? "page" : null)" asp-controller="Writer" asp-action="Index" asp-route-projectId="@projectId" asp-route-bookId="@Model.Book?.BookID">Writer</a>
|
|
</li>
|
|
@{ var storyActive = Model.ActiveSection == "Overview" || Model.ActiveSection == "Timeline" || Model.ActiveSection == "Calendar" || Model.ActiveSection == "At This Point" || Model.ActiveSection == "Threads" || Model.ActiveSection == "Scenarios" || Model.ActiveSection == "Continuity Explorer"; }
|
|
<li class="nav-item dropdown">
|
|
<button class="nav-link dropdown-toggle @(storyActive ? "active" : string.Empty)" type="button" id="appStoryMenu" data-bs-toggle="dropdown" aria-expanded="false">Story</button>
|
|
<ul class="dropdown-menu" aria-labelledby="appStoryMenu">
|
|
<li><a class="dropdown-item @(ActiveClass("Overview"))" aria-current="@(Model.ActiveSection == "Overview" ? "page" : null)" asp-controller="Projects" asp-action="Details" asp-route-id="@projectId">Overview</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Timeline"))" aria-current="@(Model.ActiveSection == "Timeline" ? "page" : null)" asp-controller="Timeline" asp-action="Index" asp-route-projectId="@projectId">Timeline</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Calendar"))" aria-current="@(Model.ActiveSection == "Calendar" ? "page" : null)" asp-controller="StoryCalendar" asp-action="Index" asp-route-projectId="@projectId">Calendar</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("At This Point"))" aria-current="@(Model.ActiveSection == "At This Point" ? "page" : null)" asp-controller="StoryPoint" asp-action="Index" asp-route-projectId="@projectId">At This Point</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Threads"))" aria-current="@(Model.ActiveSection == "Threads" ? "page" : null)" asp-controller="PlotThreads" asp-action="Index" asp-route-projectId="@projectId">Threads</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Scenarios"))" aria-current="@(Model.ActiveSection == "Scenarios" ? "page" : null)" asp-controller="Scenarios" asp-action="Index" asp-route-projectId="@projectId">Scenarios</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Continuity Explorer"))" aria-current="@(Model.ActiveSection == "Continuity Explorer" ? "page" : null)" asp-controller="ContinuityExplorer" asp-action="Index" asp-route-projectId="@projectId">Continuity Explorer</a></li>
|
|
</ul>
|
|
</li>
|
|
@{ var charactersActive = Model.ActiveSection == "Characters" || Model.ActiveSection == "Names" || Model.ActiveSection == "Relationships"; }
|
|
<li class="nav-item dropdown">
|
|
<button class="nav-link dropdown-toggle @(charactersActive ? "active" : string.Empty)" type="button" id="appCharactersMenu" data-bs-toggle="dropdown" aria-expanded="false">Characters</button>
|
|
<ul class="dropdown-menu" aria-labelledby="appCharactersMenu">
|
|
<li><a class="dropdown-item @(ActiveClass("Characters"))" aria-current="@(Model.ActiveSection == "Characters" ? "page" : null)" asp-controller="Characters" asp-action="Index" asp-route-projectId="@projectId">Characters</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Names"))" aria-current="@(Model.ActiveSection == "Names" ? "page" : null)" asp-controller="Names" asp-action="Index" asp-route-projectId="@projectId">Names</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Relationships"))" aria-current="@(Model.ActiveSection == "Relationships" ? "page" : null)" asp-controller="RelationshipMap" asp-action="Index" asp-route-projectId="@projectId">Relationships</a></li>
|
|
</ul>
|
|
</li>
|
|
@{ var worldActive = Model.ActiveSection == "Assets" || Model.ActiveSection == "Locations" || Model.ActiveSection == "Floor Plans"; }
|
|
<li class="nav-item dropdown">
|
|
<button class="nav-link dropdown-toggle @(worldActive ? "active" : string.Empty)" type="button" id="appWorldMenu" data-bs-toggle="dropdown" aria-expanded="false">World</button>
|
|
<ul class="dropdown-menu" aria-labelledby="appWorldMenu">
|
|
<li><a class="dropdown-item @(ActiveClass("Assets"))" aria-current="@(Model.ActiveSection == "Assets" ? "page" : null)" asp-controller="StoryAssets" asp-action="Index" asp-route-projectId="@projectId">Assets</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Locations"))" aria-current="@(Model.ActiveSection == "Locations" ? "page" : null)" asp-controller="Locations" asp-action="Index" asp-route-projectId="@projectId">Locations</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Floor Plans"))" aria-current="@(Model.ActiveSection == "Floor Plans" ? "page" : null)" asp-controller="FloorPlans" asp-action="Index" asp-route-projectId="@projectId">Floor Plans</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Maps"))" aria-current="@(Model.ActiveSection == "Maps" ? "page" : null)" asp-controller="Maps" asp-action="Index" asp-route-projectId="@projectId">Maps</a></li>
|
|
</ul>
|
|
</li>
|
|
@{ var toolsActive = Model.ActiveSection == "Story Bible" || Model.ActiveSection == "Metrics" || Model.ActiveSection == "Health" || Model.ActiveSection == "Warnings" || Model.ActiveSection == "Archive"; }
|
|
<li class="nav-item dropdown">
|
|
<button class="nav-link dropdown-toggle @(toolsActive ? "active" : string.Empty)" type="button" id="appToolsMenu" data-bs-toggle="dropdown" aria-expanded="false">Tools</button>
|
|
<ul class="dropdown-menu" aria-labelledby="appToolsMenu">
|
|
<li><a class="dropdown-item @(ActiveClass("Story Bible"))" aria-current="@(Model.ActiveSection == "Story Bible" ? "page" : null)" asp-controller="StoryBible" asp-action="Index" asp-route-projectId="@projectId">Story Bible</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Metrics"))" aria-current="@(Model.ActiveSection == "Metrics" ? "page" : null)" asp-controller="ProjectMetrics" asp-action="Index" asp-route-projectId="@projectId">Metrics</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Health"))" aria-current="@(Model.ActiveSection == "Health" ? "page" : null)" asp-controller="Analytics" asp-action="Index" asp-route-projectId="@projectId">Health</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Warnings"))" aria-current="@(Model.ActiveSection == "Warnings" ? "page" : null)" asp-controller="Warnings" asp-action="Index" asp-route-projectId="@projectId">Warnings</a></li>
|
|
<li><a class="dropdown-item @(ActiveClass("Archive"))" aria-current="@(Model.ActiveSection == "Archive" ? "page" : null)" asp-controller="Archives" asp-action="Index" asp-route-projectId="@projectId">Archive</a></li>
|
|
</ul>
|
|
</li>
|