+ @using (Html.BeginForm("PostContent", "Profiles"))
+ {
+ @Html.AntiForgeryToken()
+ @Html.ValidationSummary();
+ @Html.TextAreaFor(Model=>Model.PostContents, new {@class="form-control", rows="5"})
+
+ }
+
+
+
+
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 @@
+ @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))
+ {
+
+
+
Posted on @post.PostedAt:
+
@Html.Markdown(post.PostContents
+
+ @{
+ string likeLink = "#";
+ string dislikeLink = "";
+ if(Model.UserName != User.Identity.Name)
+ {
+ likeLink = "/Profiles/LikePost/" + post.Id;
+ dislikeLink = likeLink.Replace("Like", "Dislike");
+ }
+ }
+ - @post.Likes.Length
+ - @post.Dislikes.Length
+
+
+
+ }
+
\ No newline at end of file