Files
ZelWiki/TightWiki/Views/Admin/MissingPages.cshtml
2025-02-10 16:50:57 +08:00

59 lines
2.1 KiB
Plaintext

@model TightWiki.Models.ViewModels.Admin.MissingPagesViewModel
@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.");
}
<h3>
丢失页
</h3>
<p>
已链接但不存在的页面。.<br /><br />
</p>
<td height="52" valign="middle" align="left">
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
{
<div class="alert alert-danger">@Html.Raw(Model.ErrorMessage)</div>
}
@if (!string.IsNullOrEmpty(Model.SuccessMessage))
{
<div class="alert alert-success">@Html.Raw(Model.SuccessMessage)</div>
}
@using (Html.BeginForm(null, null, FormMethod.Get, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
{
@if (Model.Pages.Count > 0)
{
<table class="table fixedTable100 table-striped" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td><strong><a href="?@QueryStringConverter.OrderHelper(sessionState, "SourcePage")">Source Page</a></strong></td>
<td><strong><a href="?@QueryStringConverter.OrderHelper(sessionState, "TargetPage")">Target Page</a></strong></td>
</tr>
</thead>
@foreach (var p in Model.Pages)
{
<tr>
<td><a href="@GlobalConfiguration.BasePath/@p.SourcePageNavigation">@p.SourcePageName</a></td>
<td><a href="@GlobalConfiguration.BasePath/@p.TargetPageNavigation/Edit?Name=@p.TargetPageName">@p.TargetPageName</a></td>
</tr>
}
</table>
@Html.Raw(TightWiki.Library.PageSelectorGenerator.Generate(Context.Request.QueryString, Model.PaginationPageCount))
}
else
{
<div class="d-flex small text-muted mb-0">
<strong>
暂无数据.
</strong>
</div>
}
}