summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-17 17:22:26 -0400
committerMichael <[email protected]>2017-05-17 17:22:26 -0400
commit86e05cdf68382f408c9ab62db85c014bb9d412c5 (patch)
tree4a15d3ddd7d96e6c2482f3a2fa3e5887dff921ba
parent513edd13359350aee171875e8141f7fbb5b1cca6 (diff)
downloadproject-unite-86e05cdf68382f408c9ab62db85c014bb9d412c5.tar.gz
project-unite-86e05cdf68382f408c9ab62db85c014bb9d412c5.tar.bz2
project-unite-86e05cdf68382f408c9ab62db85c014bb9d412c5.zip
show global announcements and topic icons
-rw-r--r--Project-Unite/Views/Forum/ViewForum.cshtml63
1 files changed, 63 insertions, 0 deletions
diff --git a/Project-Unite/Views/Forum/ViewForum.cshtml b/Project-Unite/Views/Forum/ViewForum.cshtml
index 92fb802..185b840 100644
--- a/Project-Unite/Views/Forum/ViewForum.cshtml
+++ b/Project-Unite/Views/Forum/ViewForum.cshtml
@@ -46,6 +46,49 @@
@if (globals.Count() > 0)
{
<hr />
+ <div class="row">
+ <div class="col-xs-6">Global announcements</div>
+ <div class="col-xs-2">Posts</div>
+ <div class="col-xs-4">Most recent post</div>
+ </div>
+ foreach (var topic in globals)
+ {
+ <div class="row">
+ <div class="col-xs-6">
+ @if (topic.IsSticky)
+ {
+ <span class="glyphicon glyphicon-info"></span>
+ }
+ @if (topic.IsAnnounce)
+ {
+ <span class="glyphicon glyphicon-star"></span>
+ }
+ @if (topic.IsGlobal)
+ {
+ <span class="glyphicon glyphicon-globe"></span>
+ }
+ @if (topic.IsUnlisted)
+ {
+ <span class="glyphicon glyphicon-eye-close"></span>
+ }
+ @if (topic.IsLocked)
+ {
+ <span class="glyphicon glyphicon-ban-circle"></span>
+ }
+ @Html.ActionLink(topic.Subject, "ViewTopic", "Forum", new { id = topic.Discriminator }, null)
+ <br />
+ <p><strong>Started by </strong> @Html.UserLink(topic.AuthorId) <strong>at </strong> @topic.StartedAt &bull; <span class="glyphicon glyphicon-thumbs-up"></span> @topic.Likes.Length &bull; <span class="glyphicon glyphicon-thumbs-down"></span> @topic.Dislikes.Length</p>
+ </div>
+ <div class="col-xs-2">
+ <strong>@topic.Posts.Length</strong>
+ </div>
+ <div class="col-xs-4">
+ @topic.Posts.OrderByDescending(x => x.PostedAt).First().Subject <br />
+ by @Html.UserLink(topic.Posts.OrderByDescending(x => x.PostedAt).First().AuthorId) <br />
+ at @topic.Posts.OrderByDescending(x => x.PostedAt).First().PostedAt
+ </div>
+ </div>
+ }
}
@@ -63,6 +106,26 @@
{
<div class="row">
<div class="col-xs-6">
+ @if (topic.IsSticky)
+ {
+ <span class="glyphicon glyphicon-info"></span>
+ }
+ @if (topic.IsAnnounce)
+ {
+ <span class="glyphicon glyphicon-star"></span>
+ }
+ @if (topic.IsGlobal)
+ {
+ <span class="glyphicon glyphicon-globe"></span>
+ }
+ @if (topic.IsUnlisted)
+ {
+ <span class="glyphicon glyphicon-eye-close"></span>
+ }
+ @if (topic.IsLocked)
+ {
+ <span class="glyphicon glyphicon-ban-circle"></span>
+ }
@Html.ActionLink(topic.Subject, "ViewTopic", "Forum", new { id = topic.Discriminator }, null)
<br/>
<p><strong>Started by </strong> @Html.UserLink(topic.AuthorId) <strong>at </strong> @topic.StartedAt &bull; <span class="glyphicon glyphicon-thumbs-up"></span> @topic.Likes.Length &bull; <span class="glyphicon glyphicon-thumbs-down"></span> @topic.Dislikes.Length</p>