Advertisement
Guest User

Untitled

a guest
May 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. @model EuropePeaceConvention.Models.ArticleDetailsViewModels
  2. @using Microsoft.AspNet.Identity
  3.  
  4. @{
  5. ViewBag.Title = "Details";
  6. }
  7.  
  8. <h2 style="font-family:Times New Roman;">Details</h2>
  9.  
  10. <div>
  11. <hr />
  12. <h3 style="font-family:Times New Roman;">@Html.DisplayFor(model => model.Article.Title)</h3>
  13.  
  14. <p style="font-family:Times New Roman;">@Html.DisplayFor(model => model.Article.Content)</p>
  15.  
  16. <p style="font-family:Times New Roman;">@Html.DisplayFor(model => model.Article.User) @Html.DisplayFor(model => model.Article.PostDate)</p>
  17. </div>
  18. <p>
  19. @if (Model.Article.User == User.Identity.GetUserName())
  20. {
  21. <p>
  22. @Html.ActionLink("Edit", "Edit", new { id = Model.Article.Id }) |
  23. @Html.ActionLink("Delete", "Delete", new { id = Model.Article.Id })
  24. </p>
  25. }
  26. @Html.ActionLink("Back to List", "Index")
  27. </p>
  28.  
  29. <br>
  30. <h4>Leave a Comment:</h4>
  31. <form role="form" method="post">
  32. <div class="form-group">
  33. <textarea class="form-control" rows="3" required id="Content" name="Content"></textarea>
  34. </div>
  35. <button type="submit" class="btn btn-success">Submit</button>
  36. </form>
  37. <br>
  38.  
  39. <p>Comments:</p><br>
  40. <div class="row">
  41.  
  42. @foreach (var item in Model.Comment)
  43. {
  44. <div class="col-sm-10">
  45. <h4>@Html.DisplayFor(modelItem => item.User) <small>@Html.DisplayFor(modelItem => item.PostDate)</small></h4>
  46. <p>@Html.DisplayFor(modelItem => item.Content)</p>
  47. <br>
  48. </div>
  49. }
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement