25 lines
1.7 KiB
Plaintext
25 lines
1.7 KiB
Plaintext
@model LocationListViewModel
|
|
<section class="edit-panel location-tree" data-location-tree>
|
|
@foreach (var location in Model.Locations)
|
|
{
|
|
<div 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? 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>
|