50 lines
6.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model LocationListViewModel
@{
ViewData["DesktopLayout"] = "management";
ViewData["ShellClass"] = "location-workspace-shell pd-workspace-full-width";
ViewData["Title"] = "Locations";
ViewData["ProjectSection"] = "Locations";
}
<nav data-pwa-identity class="breadcrumb-trail" aria-label="Breadcrumb">
<a asp-controller="Projects" asp-action="Index">Projects</a>
<a asp-controller="Projects" asp-action="Details" asp-route-id="@Model.Project.ProjectID">@Model.Project.ProjectName</a><span>Locations</span>
</nav>
<partial name="_ProjectSectionNav" model="Model.Project" />
<div class="location-page" data-locations-workspace data-project-id="@Model.Project.ProjectID">
<div data-pwa-header class="page-heading compact"><div><p class="eyebrow">World building</p><h1>Locations <help-icon key="locations.overview" /></h1></div><span class="muted">@Model.Project.ProjectName</span></div>
@if (TempData["LocationMessage"] is string message) { <span hidden data-toast-message="success">@message</span> }
@if (TempData["LocationError"] is string error) { <div class="alert alert-danger" role="alert">@error</div> }
<form hidden data-location-token>@Html.AntiForgeryToken()</form>
<div class="locations-toolbar">
<div class="locations-primary-commands" data-pwa-context="Locations" data-pwa-essential="true">
<a class="btn btn-primary btn-sm" asp-action="Create" asp-route-projectId="@Model.Project.ProjectID" data-pwa-icon="add">New location</a>
<button type="button" class="btn btn-outline-secondary btn-sm" data-new-child data-pwa-icon="add" disabled>New child location</button>
<button type="button" class="btn btn-outline-secondary btn-sm" data-change-parent data-pwa-icon="merge" disabled>Change parent</button>
<button type="button" class="btn btn-outline-secondary btn-sm" data-create-relationship data-pwa-icon="relationships" disabled>Create relationship</button>
</div>
<button type="button" class="btn btn-outline-secondary btn-sm" data-panel-toggle="attributes" data-pwa-icon="list" aria-expanded="true">Attributes</button>
<div role="group" aria-label="Location view"><button type="button" class="btn btn-outline-secondary btn-sm" data-view="tree" data-pwa-icon="location-level" aria-pressed="true">Hierarchy</button><button type="button" class="btn btn-outline-secondary btn-sm" data-view="cards" data-pwa-icon="layout" aria-pressed="false">Cards</button></div>
<button type="button" class="btn btn-outline-secondary btn-sm" data-expand="true" data-pwa-icon="add">Expand all</button><button type="button" class="btn btn-outline-secondary btn-sm" data-expand="false" data-pwa-icon="minimise">Collapse all</button>
<button type="button" class="btn btn-outline-secondary btn-sm" data-reveal data-pwa-icon="focus">Reveal selected</button>
<button type="button" class="btn btn-outline-secondary btn-sm" data-panel-toggle="details" data-pwa-icon="details" aria-expanded="true">Details</button>
<button type="button" class="btn btn-outline-secondary btn-sm" data-undo hidden data-pwa-icon="undo">Undo</button>
</div>
<div class="locations-search"><input type="search" class="form-control form-control-sm" data-search aria-label="Search location names and aliases" placeholder="Search locations and aliases…" /><button type="button" class="btn btn-outline-secondary btn-sm" data-clear-search>Clear search</button><select class="form-select form-select-sm" data-sort aria-label="Sort locations"><option value="asc">Name A–Z</option><option value="desc">Name Z–A</option></select><span data-result-count role="status"></span></div>
<div class="locations-layout">
<aside class="locations-attributes" aria-label="Location attributes"><h2>Attributes</h2><p class="small muted">Click to filter. Drag to assign, or select locations and choose Assign.</p><button type="button" class="btn btn-outline-secondary btn-sm" data-clear-filters>Clear filters</button><div data-groups>Loading attributes…</div></aside>
<section class="locations-centre" aria-label="Location directory">
<div class="locations-selection"><button type="button" class="btn btn-outline-secondary btn-sm" data-select-visible>Select displayed</button><button type="button" class="btn btn-outline-secondary btn-sm" data-clear-selection>Clear selection</button><span data-selection-count>0 selected</span><button type="button" class="btn btn-outline-secondary btn-sm" data-selection-menu>Selection ⋯</button></div>
<div class="locations-root" data-root-drop tabindex="0">Root locations <span class="muted">— drop here to remove a parent</span></div>
<p role="alert" class="text-danger" data-workspace-error></p>
<div data-location-records role="tree" aria-label="Location hierarchy" aria-busy="true"></div>
</section>
<aside class="locations-details" aria-label="Selected location details"><div data-details><h2>Your world, in detail</h2><p class="muted">Select a location to explore its place in your world, edit its attributes, and open associated maps and floor plans.</p></div></aside>
</div>
<dialog data-location-dialog class="locations-dialog"><form method="dialog"><h2 data-dialog-title></h2><div data-dialog-body></div><p class="text-danger" data-dialog-error role="alert"></p><div class="button-row"><button type="button" class="btn btn-primary btn-sm" data-dialog-save>Save</button><button type="button" class="btn btn-outline-secondary btn-sm" data-dialog-cancel>Cancel</button></div></form></dialog>
<noscript><p>The interactive workspace requires JavaScript. Traditional location forms remain available.</p><partial name="_LocationTree" model="Model" /></noscript>
</div>
<link rel="stylesheet" href="~/css/workspace-surface.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/locations-workspace.css" asp-append-version="true" />
<script src="~/js/workspace-surface.js" asp-append-version="true" defer></script>
<script src="~/js/locations-workspace.js" asp-append-version="true" defer></script>