@model TightWiki.Models.ViewModels.Admin.PagesViewModel @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."); }

Pages

All pages contained in the wiki.

@if (!string.IsNullOrEmpty(Model.ErrorMessage)) {
@Html.Raw(Model.ErrorMessage)
} @if (!string.IsNullOrEmpty(Model.SuccessMessage)) {
@Html.Raw(Model.SuccessMessage)
} @Html.Raw(ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath, "This will rebuild all pages in the wiki. This could take some time! Continue?", "Rebuild All Pages", "/Admin/RebuildAllPages", Context.Request.Path.Value)) @Html.Raw(ConfirmActionHelper.GenerateWarnLink(GlobalConfiguration.BasePath, "This will compile all pages in the wiki and store them in cache. This could take some time! Continue?", "Pre-Cache All Pages", "/Admin/PreCacheAllPages", Context.Request.Path.Value)) @Html.Raw(ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, "Truncating the page revisions will delete all the revision history for all pages and page attachments. This will leave only the most current revision of all objects. This is generally considered a big deal! Continue?", "Truncate Page Revisions", "/Admin/TruncatePageRevisions", Context.Request.Path.Value))

@using (Html.BeginForm(null, null, FormMethod.Get, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" })) {
@Html.TextBoxFor(x => x.SearchString, new { @class = "form-control" })

@if (Model.Pages.Count > 0) { @foreach (var p in Model.Pages) { }
Name Revision Deleted Revisions Modified By Modified Date Action
@if (string.IsNullOrEmpty(@p.Namespace) == false) { @p.Namespace :: } @p.Title @p.Revision @p.DeletedRevisionCount @p.ModifiedByUserName @p.ModifiedDate @Html.Raw(ConfirmActionHelper.GenerateDangerLink(GlobalConfiguration.BasePath, $"Deleting \"{p.Name}\" will move the page, all {p.Revision} revisions and associated file attachments to the deletion queue. This action can only be undone by an administrator or moderator. Continue?", "Delete", "/Admin/DeletePage/" + @p.Id, Context.Request.Path.Value))
@Html.Raw(PageSelectorGenerator.Generate(Context.Request.QueryString, Model.PaginationPageCount)) } else {
Either there are no pages or your search criteria returned no results.
} }