@using TightWiki.Models @model TightWiki.Models.ViewModels.Page.PageDisplayViewModel @{ Layout = "/Views/Shared/_Layout.cshtml"; var sessionState = ViewData["SessionState"] as TightWiki.SessionState ?? throw new Exception("Wiki State Context cannot be null."); } @if (Model.Revision < Model.MostCurrentRevision) {
Viewing a historical version

You are viewing revision @Model.Revision of "@Model.Name" modified by @Model.ModifiedByUserName on @Model.ModifiedDate.
View latest revision @if(sessionState.CanModerate) { Revert to revision @Model.Revision }

} @Html.Raw(Model.Body) @if (TightWiki.Models.GlobalConfiguration.ShowLastModifiedOnPageFooter && string.IsNullOrWhiteSpace(@Model.ModifiedByUserName) == false && Model.HideFooterLastModified != true) {
if (TightWiki.Models.GlobalConfiguration.EnablePublicProfiles) { Last modified by @Model.ModifiedByUserName @@ @Model.ModifiedDate } else { Last modified by @Model.ModifiedByUserName @@ @Model.ModifiedDate }
} @if (Model.HideFooterComments == false) { @if (TightWiki.Models.GlobalConfiguration.EnablePageComments && TightWiki.Models.GlobalConfiguration.ShowCommentsOnPageFooter) {

Comments

} @if (TightWiki.Models.GlobalConfiguration.EnablePageComments && TightWiki.Models.GlobalConfiguration.ShowCommentsOnPageFooter) { if (@sessionState.IsAuthenticated == true) {
} else { @:Login to leave a comment.
} } @if (TightWiki.Models.GlobalConfiguration.EnablePageComments && TightWiki.Models.GlobalConfiguration.ShowCommentsOnPageFooter && Model.Comments != null && Model.Comments.Count > 0) {
@foreach (var h in Model.Comments) {

@Html.Raw(h.Body)

Avatar @Html.DisplayTextFor(x => h.UserName)   

@Html.DisplayTextFor(x => h.CreatedDate)

@if (sessionState.CanModerate == true || h.UserId == sessionState.Profile?.UserId) { Delete }
}
} @if (TightWiki.Models.GlobalConfiguration.EnablePageComments && TightWiki.Models.GlobalConfiguration.ShowCommentsOnPageFooter) { View all comments } }