source: PostgreSqlDotnetCore/Views/Blog/Details.cshtml@ a850333

main
Last change on this file since a850333 was 118e414, checked in by ElenaMoskova <elena.moskova99@…>, 3 months ago

fix access

implement multiple access pages with different roles
optimize present three structure of BlogPost and Answer

  • Property mode set to 100644
File size: 2.2 KB
Line 
1@model PostgreSqlDotnetCore.Models.BlogPostConsultation
2
3@{
4 ViewBag.Title = "Details";
5}
6
7@*<h2>Одговори</h2>*@
8@*
9<div>
10 <h4>Blog post for consultations</h4>
11 <hr />
12 <dl class="dl-horizontal">
13 <dt>
14 @Html.DisplayNameFor(model => model.date_askes)
15 </dt>
16
17 <dd>
18 @Html.DisplayFor(model => model.date_askes)
19 </dd>
20
21 <dt>
22 @Html.DisplayNameFor(model => model.title)
23 </dt>
24 <dd>
25 @Html.DisplayFor(model => model.title)
26 </dd>
27
28 <dt>
29 @Html.DisplayNameFor(model => model.description)
30 </dt>
31
32 <dd>
33 @Html.DisplayFor(model => model.description)
34 </dd>
35
36 <dt>
37 @Html.DisplayNameFor(model => model.users_id)
38 </dt>
39
40 <dd>
41 @Html.DisplayFor(model => model.users_id)
42 </dd>
43
44
45 </dl>
46</div>
47*@
48
49<hr/>
50<div>
51 <h2>Answers</h2>
52 <hr />
53
54 <table class="table">
55 <tr>
56
57 <th>
58 Reply
59 </th>
60 <th>
61 UsersId
62 </th>
63 <th></th>
64
65 </tr>
66
67 @foreach (var item in Model.BlogPostAnswers)
68 {
69 <tr>
70 <td>
71 @Html.DisplayFor(modelItem => item.reply)
72 </td>
73
74 <th>
75 @Html.DisplayFor(model => item.usersid)
76 </th>
77
78 <td>
79 @Html.ActionLink("Edit", "Edit", "BlogPostAnswers", new { id = item.id }) |
80 @Html.ActionLink("Details", "Details", "BlogPostAnswers", new { id = item.id }) |
81 @Html.ActionLink("Delete", "Delete", "BlogPostAnswers", new { id = item.id })
82
83 @Html.ActionLink("Create an Answer", "Create", "BlogPostAnswers", new { id = item.BlogPostConsultationid, parentId = item.id })
84 </td>
85 </tr>
86 }
87
88 </table>
89</div>
90<p>
91 @Html.ActionLink("Create an Answer", "Create", "BlogPostAnswers", new { id = Model.id, parentId = Model.id })
92 @Html.ActionLink("Edit", "Edit", new { id = Model.id }) |
93 @Html.ActionLink("Back to List", "Index")
94</p>
Note: See TracBrowser for help on using the repository browser.