From cdc61eb4ea5309769ad4db84d92594e4dc3dff67 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Mar 2017 16:45:17 -0400 Subject: Initial commit (azure deploy test) --- Project-Unite/Views/Forum/ViewTopic.cshtml | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Project-Unite/Views/Forum/ViewTopic.cshtml (limited to 'Project-Unite/Views/Forum/ViewTopic.cshtml') diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml new file mode 100644 index 0000000..4348518 --- /dev/null +++ b/Project-Unite/Views/Forum/ViewTopic.cshtml @@ -0,0 +1,69 @@ +@model Project_Unite.Models.ForumTopic +@using Microsoft.AspNet.Identity +@{ + ViewBag.Title = Model.Subject; +} + +@if(ViewBag.Error != null) +{ +
+
+

@ViewBag.Error

+
+
+} + +@if(Model.IsUnlisted == true) +{ +
+
+

This topic is unlisted. Only those with the topic link as well as moderators may see this topic. Please respect its privacy.

+
+
+} + +

@Model.Subject

+ +

Started by @Html.UserLink(Model.AuthorId) at @Model.StartedAt

+ +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} + +@foreach (var post in Model.Posts.OrderBy(x => x.PostedAt)) +{ +
+
+
+
+ @Html.UserLink(post.AuthorId)
+ @{ + var user = ACL.GetUserInfo(post.AuthorId); +

@user.Codepoints Codepoints

+

@user.HighestRole.Name

+

+ @if (ACL.Granted(User.Identity.Name, "CanAccessModCP")) + { + if (ACL.Granted(User.Identity.Name, "CanViewUserInfo")) + { + @Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" }) + } + } +

+ } +
+
+

@Model.Subject

+

@Html.UserLink(post.AuthorId) at @post.PostedAt

+

@Html.Markdown(post.Body)

+ @{ + Html.RenderPartial("~/Views/Shared/_PostModerationBar.cshtml", post); + } +
+
+
+} + +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} -- cgit v1.2.3