PlotDirector/PlotLine/Views/Locations/_LocationTree.cshtml
Nick Beckley e48889ac05 Complete desktop workspaces, context menus and plot health
Commit the pending application, help and browser regression work. Pin the patched PKCS dependency for the production release.
2026-10-31 09:27:04 +00:00

25 lines
1.9 KiB
Plaintext

@model LocationListViewModel
<section class="edit-panel location-tree" data-location-tree>
@foreach (var location in Model.Locations)
{
<div data-pd-context="location" data-pd-context-id="@location.LocationID" data-pd-context-label="@location.LocationName" class="location-tree-row" draggable="true" data-drag-type="location" data-drag-id="@location.LocationID" data-drag-label="@location.LocationName" data-parent-location-id="@location.ParentLocationID" data-parent-location-name="@location.ParentLocationName" style="--location-depth:@location.Depth">
<div>
<a asp-action="Details" asp-route-id="@location.LocationID"><strong>@location.LocationName</strong></a>
@if (!string.IsNullOrWhiteSpace(location.LocationTypeName))
{
<span class="location-badge">@location.LocationTypeName</span>
}
<span class="muted">@location.LocationPath</span>
</div>
<div class="button-row compact-buttons">
<a class="btn btn-outline-secondary btn-sm" asp-action="Edit" asp-route-id="@location.LocationID">Edit</a>
<form asp-action="Archive" method="post" data-confirm-message="Archive this location?&#10;&#10;This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
<input type="hidden" name="id" value="@location.LocationID" />
<input type="hidden" name="projectId" value="@Model.Project.ProjectID" />
<button class="btn btn-outline-danger btn-sm" type="submit">Archive</button>
</form>
</div>
</div>
}
</section>