Files
ZelWiki/TightWiki/Views/Page/Delete.cshtml
2025-01-22 23:31:03 +08:00

39 lines
1.6 KiB
Plaintext

@using TightWiki.Models
@model TightWiki.Models.ViewModels.Page.PageDeleteViewModel
@{
Layout = "/Views/Shared/_Layout.cshtml";
var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null.");
}
@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>
}
@if (string.IsNullOrEmpty(Model.ErrorMessage))
{
<div class="card border-danger mb-3">
<div class="card-header bg-danger text-white">
<strong>Delete page "@Model.PageName"?</strong>
</div>
<div class="card-body">
Deleting "@Model.PageName" will move the page, all @Model.PageRevision revisions and @Model.CountOfAttachments file attachments to the deletion queue.
This action can only be undone by an administrator or moderator.
<br /><br />
Are you sure you want to continue with this deletion?<br /><br />
@using (Html.BeginForm(null, null, FormMethod.Post, new { action = $"{GlobalConfiguration.BasePath}{Context.Request.Path}" }))
{
<div class="form-group"><button type="submit" class="btn btn-danger rounded-0" name="IsActionConfirmed" value="true">Yes</button>&nbsp;&nbsp;<button type="submit" class="btn btn-success rounded-0" name="IsActionConfirmed" value="false">No</button></div>
}
</div>
</div>
}