summaryrefslogtreecommitdiff
path: root/Project-Unite
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-17 10:20:54 -0400
committerMichael <[email protected]>2017-05-17 10:20:54 -0400
commit733b545c40d33ba23077c7d2fb5e847208475fb3 (patch)
treedbc586e648f3008685616a48a29f78296328352f /Project-Unite
parent7e54c9b3fad48c7bce1134f7937924f120f1999c (diff)
downloadproject-unite-733b545c40d33ba23077c7d2fb5e847208475fb3.tar.gz
project-unite-733b545c40d33ba23077c7d2fb5e847208475fb3.tar.bz2
project-unite-733b545c40d33ba23077c7d2fb5e847208475fb3.zip
Start ViewTopic revamp
Diffstat (limited to 'Project-Unite')
-rw-r--r--Project-Unite/Content/Site.css4
-rw-r--r--Project-Unite/Views/Forum/ViewTopic.cshtml39
2 files changed, 19 insertions, 24 deletions
diff --git a/Project-Unite/Content/Site.css b/Project-Unite/Content/Site.css
index fa3b04e..de84403 100644
--- a/Project-Unite/Content/Site.css
+++ b/Project-Unite/Content/Site.css
@@ -2,6 +2,10 @@
/* padding-top: 50px; */
padding-bottom: 20px;
}
+/*make avatars rounded*/
+.avatar {
+ border-radius: 100%;
+}
/* Set padding to keep content from hitting the edges */
.body-content {
diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml
index 97b3918..35607e0 100644
--- a/Project-Unite/Views/Forum/ViewTopic.cshtml
+++ b/Project-Unite/Views/Forum/ViewTopic.cshtml
@@ -5,15 +5,6 @@
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)
{
<div class="panel panel-warning">
@@ -27,10 +18,6 @@
<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))
{
if (Request.IsAuthenticated)
@@ -44,20 +31,17 @@
<div class="row panel panel-default">
<div class="panel-body">
<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/>
@{
var user = ACL.GetUserInfo(post.AuthorId);
<p><strong>@user.Codepoints</strong> Codepoints</p>
<p><strong><u>@user.HighestRole.Name</u></strong></p>
<p>
- @if (ACL.Granted(User.Identity.Name, "CanAccessModCP"))
- {
- if (ACL.Granted(User.Identity.Name, "CanViewUserInfo"))
+ @if (User?.Identity?.IsModerator()==true)
{
@Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" })
}
- }
</p>
}
</div>
@@ -65,18 +49,25 @@
<h4>@Model.Subject</h4>
<p>@Html.UserLink(post.AuthorId) at @post.PostedAt</p>
<p>@Html.Markdown(post.Body)</p>
- @{
- Html.RenderPartial("~/Views/Shared/_PostModerationBar.cshtml", post);
+
+ @if (post.EditHistory.Length > 0)
+ {
+ <div class="panel panel-primary">
+ <div class="panel-body">
+ <h4>Latest edit</h4>
+ @{
+ 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>
}
-@{
- Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model);
-}
-
<p>Pages:
<ul class="pagination">
<li>@Html.ActionLink("First", "ViewTopic", "Forum", new { id = Model.Discriminator, page = 1 }, null)</li>