mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-23 01:32:16 +00:00
Start ViewTopic revamp
This commit is contained in:
parent
7e54c9b3fa
commit
733b545c40
2 changed files with 19 additions and 24 deletions
|
@ -2,6 +2,10 @@
|
||||||
/* padding-top: 50px; */
|
/* padding-top: 50px; */
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
/*make avatars rounded*/
|
||||||
|
.avatar {
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set padding to keep content from hitting the edges */
|
/* Set padding to keep content from hitting the edges */
|
||||||
.body-content {
|
.body-content {
|
||||||
|
|
|
@ -5,15 +5,6 @@
|
||||||
ViewBag.Title = Model.Subject;
|
ViewBag.Title = Model.Subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if(ViewBag.Error != null)
|
|
||||||
{
|
|
||||||
<div class="panel panel-error">
|
|
||||||
<div class="panel-body">
|
|
||||||
<p><span class="glyphicon glyphicon-exclamation-sign"></span> @ViewBag.Error</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
@if(Model.IsUnlisted == true)
|
@if(Model.IsUnlisted == true)
|
||||||
{
|
{
|
||||||
<div class="panel panel-warning">
|
<div class="panel panel-warning">
|
||||||
|
@ -27,10 +18,6 @@
|
||||||
|
|
||||||
<p>Started by <strong>@Html.UserLink(Model.AuthorId)</strong> at <strong>@Model.StartedAt</strong></p>
|
<p>Started by <strong>@Html.UserLink(Model.AuthorId)</strong> at <strong>@Model.StartedAt</strong></p>
|
||||||
|
|
||||||
@{
|
|
||||||
Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model);
|
|
||||||
}
|
|
||||||
|
|
||||||
@foreach (Project_Unite.Models.ForumPost post in PaginationExtensions.GetItemsOnPage<Project_Unite.Models.ForumPost>(Model.Posts.OrderBy(x => x.PostedAt).ToArray(), ViewBag.Page, ViewBag.PageSize))
|
@foreach (Project_Unite.Models.ForumPost post in PaginationExtensions.GetItemsOnPage<Project_Unite.Models.ForumPost>(Model.Posts.OrderBy(x => x.PostedAt).ToArray(), ViewBag.Page, ViewBag.PageSize))
|
||||||
{
|
{
|
||||||
if (Request.IsAuthenticated)
|
if (Request.IsAuthenticated)
|
||||||
|
@ -44,20 +31,17 @@
|
||||||
<div class="row panel panel-default">
|
<div class="row panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="col-xs-4"> <!--Mini profile data-->
|
<div class="col-xs-4"> <!--Mini profile data-->
|
||||||
<img src="@ACL.GetUserInfo(post.AuthorId).AvatarUrl" width="128" height="128" /><br/>
|
<img class="avatar" src="@ACL.GetUserInfo(post.AuthorId).AvatarUrl" width="128" height="128" /><br/>
|
||||||
<strong>@Html.UserLink(post.AuthorId)</strong><br/>
|
<strong>@Html.UserLink(post.AuthorId)</strong><br/>
|
||||||
@{
|
@{
|
||||||
var user = ACL.GetUserInfo(post.AuthorId);
|
var user = ACL.GetUserInfo(post.AuthorId);
|
||||||
<p><strong>@user.Codepoints</strong> Codepoints</p>
|
<p><strong>@user.Codepoints</strong> Codepoints</p>
|
||||||
<p><strong><u>@user.HighestRole.Name</u></strong></p>
|
<p><strong><u>@user.HighestRole.Name</u></strong></p>
|
||||||
<p>
|
<p>
|
||||||
@if (ACL.Granted(User.Identity.Name, "CanAccessModCP"))
|
@if (User?.Identity?.IsModerator()==true)
|
||||||
{
|
|
||||||
if (ACL.Granted(User.Identity.Name, "CanViewUserInfo"))
|
|
||||||
{
|
{
|
||||||
@Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" })
|
@Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" })
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,16 +49,23 @@
|
||||||
<h4>@Model.Subject</h4>
|
<h4>@Model.Subject</h4>
|
||||||
<p>@Html.UserLink(post.AuthorId) at @post.PostedAt</p>
|
<p>@Html.UserLink(post.AuthorId) at @post.PostedAt</p>
|
||||||
<p>@Html.Markdown(post.Body)</p>
|
<p>@Html.Markdown(post.Body)</p>
|
||||||
@{
|
|
||||||
Html.RenderPartial("~/Views/Shared/_PostModerationBar.cshtml", post);
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@if (post.EditHistory.Length > 0)
|
||||||
|
{
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h4>Latest edit</h4>
|
||||||
@{
|
@{
|
||||||
Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model);
|
var edit = post.EditHistory.OrderByDescending(x => x.EditedAt).First();
|
||||||
|
}
|
||||||
|
<p>By @Html.UserLink(edit.UserId) at @edit.EditedAt</p>
|
||||||
|
<p><strong>Reason: </strong>@Html.Markdown(edit.EditReason)</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>Pages:
|
<p>Pages:
|
||||||
|
|
Loading…
Reference in a new issue