From db85baaf3c0e0be584286512c8e132f5fc01d06b Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 17 May 2017 18:10:08 -0400 Subject: [PATCH] liking and disliking of topics --- Project-Unite/Views/Forum/ViewTopic.cshtml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@
  • Locked.
  • } } + if (Request.IsAuthenticated) + { + if(User.Identity.GetUserId() != Model.AuthorId) + { +
  • @Model.Likes.Length
  • +
  • @Model.Dislikes.Length
  • + } + } + else + { +
  • @Model.Likes.Length
  • +
  • @Model.Dislikes.Length
  • + + } if (User.Identity.IsModerator()) {