diff options
Diffstat (limited to 'Project-Unite/Views/Profiles')
| -rw-r--r-- | Project-Unite/Views/Profiles/ViewProfile.cshtml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Project-Unite/Views/Profiles/ViewProfile.cshtml b/Project-Unite/Views/Profiles/ViewProfile.cshtml index 94ca858..80c8e7a 100644 --- a/Project-Unite/Views/Profiles/ViewProfile.cshtml +++ b/Project-Unite/Views/Profiles/ViewProfile.cshtml @@ -24,4 +24,32 @@ <li><strong>Topics: </strong>@Model.TopicCount</li> </ul> </div> + <div class="col-xs-4"> + @if(Model.UserName == User.Identity.Name) + { + Html.RenderPartial("~/Profiles/_NewPost.cshtml", new Project_Unite.Models.UserPost()); + } + @foreach(var post in Model.Posts.OrderByDescending(x => x.PostedAt)) + { + + <div class="panel"> + <p><strong>Posted on @post.PostedAt</strong>:</p> + <p>@Html.Markdown(post.PostContents</p> + <ul class="nav nav-pills"> + @{ + string likeLink = "#"; + string dislikeLink = ""; + if(Model.UserName != User.Identity.Name) + { + likeLink = "/Profiles/LikePost/" + post.Id; + dislikeLink = likeLink.Replace("Like", "Dislike"); + } + } + <li><a href="@likeLink"><span class="glyphicon-thumbs-up"></span> @post.Likes.Length</a></li> + <li><a href="@dislikeLink"><span class="glyphicon-thumbs-down"></span> @post.Dislikes.Length</a></li> + + </ul> + </div> + } + </div> </div>
\ No newline at end of file |
