summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-17 18:10:08 -0400
committerMichael <[email protected]>2017-05-17 18:10:08 -0400
commitdb85baaf3c0e0be584286512c8e132f5fc01d06b (patch)
tree6bbb470c2a99fdb9e50959463f885fb677b8cedc
parent86e05cdf68382f408c9ab62db85c014bb9d412c5 (diff)
downloadproject-unite-db85baaf3c0e0be584286512c8e132f5fc01d06b.tar.gz
project-unite-db85baaf3c0e0be584286512c8e132f5fc01d06b.tar.bz2
project-unite-db85baaf3c0e0be584286512c8e132f5fc01d06b.zip
liking and disliking of topics
-rw-r--r--Project-Unite/Views/Forum/ViewTopic.cshtml14
1 files changed, 14 insertions, 0 deletions
diff --git a/Project-Unite/Views/Forum/ViewTopic.cshtml b/Project-Unite/Views/Forum/ViewTopic.cshtml
index 5b05478..fe10691 100644
--- a/Project-Unite/Views/Forum/ViewTopic.cshtml
+++ b/Project-Unite/Views/Forum/ViewTopic.cshtml
@@ -30,6 +30,20 @@
<li><a href="#"><span class="glyphicon glyphicon-lock"></span> Locked.</a></li>
}
}
+ if (Request.IsAuthenticated)
+ {
+ if(User.Identity.GetUserId() != Model.AuthorId)
+ {
+ <li><a href="@Url.Action("Like", "Forum", new { id = Model.Discriminator })"><span class="glyphicon glyphicon-thumbs-up"></span> @Model.Likes.Length</a></li>
+ <li><a href="@Url.Action("Dislike", "Forum", new { id = Model.Discriminator })"><span class="glyphicon glyphicon-thumbs-down"></span> @Model.Dislikes.Length</a></li>
+ }
+ }
+ else
+ {
+ <li><span class="glyphicon glyphicon-thumbs-up"></span> @Model.Likes.Length</li>
+ <li><span class="glyphicon glyphicon-thumbs-down"></span> @Model.Dislikes.Length</li>
+
+ }
if (User.Identity.IsModerator())
{
<li class="dropdown"><a data-toggle="dropdown" href="#" class="dropdown-toggle">Quick mod <span class="caret"></span></a>