Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. @model GlasgowTheatre.Models.Post
  2.  
  3. @{
  4. ViewBag.Title = "Details";
  5. }
  6.  
  7. <h2>Details</h2>
  8.  
  9. <div>
  10. <h4>Post</h4>
  11. <hr />
  12. <dl class="dl-horizontal">
  13. <dt>
  14. @Html.DisplayNameFor(model => model.UserName)
  15. </dt>
  16.  
  17. <dd>
  18. @Html.DisplayFor(model => model.UserName)
  19. </dd>
  20.  
  21. <dt>
  22. @Html.DisplayNameFor(model => model.PostTitle)
  23. </dt>
  24.  
  25. <dd>
  26. @Html.DisplayFor(model => model.PostTitle)
  27. </dd>
  28.  
  29. <dt>
  30. @Html.DisplayNameFor(model => model.PostDesc)
  31. </dt>
  32.  
  33. <dd>
  34. @Html.DisplayFor(model => model.PostDesc)
  35. </dd>
  36.  
  37. <dt>
  38. @Html.DisplayNameFor(model => model.PostDate)
  39. </dt>
  40.  
  41. <dd>
  42. @Html.DisplayFor(model => model.PostDate)
  43. </dd>
  44.  
  45. </dl>
  46. <div>
  47. @foreach (var item in Model.Comments)
  48. {
  49. <div>@item.CommentBody</div>
  50. <div>
  51. <label>by</label>
  52. <label>@item.UserName</label>
  53. <label> on </label>
  54. <label>@item.CommentDate</label>
  55. </div>
  56.  
  57. }
  58. </div>
  59. @if (!User.IsInRole("Restricted"))
  60. {
  61. <div>
  62. @Html.Partial("_AddComment", new GlasgowTheatre.Models.Comment { PostID = Model.PostID })
  63. </div>
  64. }
  65. </div>
  66. <p>
  67. @Html.ActionLink("Edit", "Edit", new { id = Model.PostID }) |
  68. @Html.ActionLink("Back to List", "Index")
  69. </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement