diff options
| author | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-20 16:45:17 -0400 |
| commit | cdc61eb4ea5309769ad4db84d92594e4dc3dff67 (patch) | |
| tree | a8297a7aecc4376f07a497a5e02ab5ff165bfbd3 /Project-Unite/Views/Forum/ViewTopic.cshtml | |
| parent | d9f475e1f33bbf39ca0d79d7a6b0c2fd501b4f2d (diff) | |
| download | project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.gz project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.tar.bz2 project-unite-cdc61eb4ea5309769ad4db84d92594e4dc3dff67.zip | |
Initial commit (azure deploy test)
Diffstat (limited to 'Project-Unite/Views/Forum/ViewTopic.cshtml')
| -rw-r--r-- | Project-Unite/Views/Forum/ViewTopic.cshtml | 69 |
1 files changed, 69 insertions, 0 deletions
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) +{ + <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"> + <div class="panel-body"> + <p><span class="glyphicon glyphicon-eye-close"></span> <strong>This topic is unlisted.</strong> Only those with the topic link as well as moderators may see this topic. Please respect its privacy.</p> + </div> + </div> +} + +<h2>@Model.Subject</h2> + +<p>Started by <strong>@Html.UserLink(Model.AuthorId)</strong> at <strong>@Model.StartedAt</strong></p> + +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} + +@foreach (var post in Model.Posts.OrderBy(x => x.PostedAt)) +{ + <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/> + <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")) + { + @Html.ActionLink("User info", "UserDetails", "Moderator", new { id = ACL.UserNameRaw(post.AuthorId) }, new { @class = "btn btn-default" }) + } + } + </p> + } + </div> + <div class="col-xs-8"><!--Post body, subject, author, time--> + <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); + } + </div> + </div> + </div> +} + +@{ + Html.RenderPartial("~/Views/Shared/_ModeratorBar.cshtml", Model); +} |
