@model TightWiki.Models.ViewModels.Admin.OrphanedPageAttachmentsViewModel @using TightWiki.Library @using TightWiki.Models @{ Layout = "/Views/Shared/_Layout.cshtml"; var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null."); }

Orphaned Page Attachments

These are all of the page attachments that are no longer attached to any page revision.

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) {
@Html.Raw(Model.ErrorMessage)
} @if (!string.IsNullOrEmpty(Model.SuccessMessage)) {
@Html.Raw(Model.SuccessMessage)
} @Html.Raw(TightWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, "This will permanently purge all orphaned page attachments. Continue?", "Purge Orphaned Attachments", "/Admin/PurgeOrphanedAttachments", Context.Request.Path.Value))

@using (Html.BeginForm(null, null, FormMethod.Get, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" })) { @if (Model.Files.Count > 0) { @foreach (var p in Model.Files) { }
Page File Size Revision Action
@if (string.IsNullOrEmpty(@p.Namespace) == false) { @p.Namespace :: } @p.PageTitle @p.FileName @NTDLS.Helpers.Formatters.FileSize((long)@p.Size) @p.FileRevision @Html.Raw(TightWiki.Library.ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, "This will permanently delete the specified attachment. Continue?", "Delete", $"/Admin/PurgeOrphanedAttachment/{@p.PageFileId}/{@p.FileRevision}", Context.Request.Path.Value))
@Html.Raw(TightWiki.Library.PageSelectorGenerator.Generate(Context.Request.QueryString, Model.PaginationPageCount)) } }