[e90ba32] | 1 | @model IEnumerable<PostgreSqlDotnetCore.Models.BlogUsers>
|
---|
[2aea0fd] | 2 |
|
---|
| 3 | @{
|
---|
| 4 | ViewBag.Title = "BlogPostConsultation";
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | <h2>Blog post for consultations.</h2>
|
---|
| 8 |
|
---|
| 9 | <p>
|
---|
| 10 | @Html.ActionLink("Ask for Advice", "Create")
|
---|
| 11 | </p>
|
---|
| 12 | <table class="table">
|
---|
| 13 | <tr>
|
---|
| 14 |
|
---|
| 15 | <th>
|
---|
[e90ba32] | 16 | @Html.DisplayNameFor(model => model.id)
|
---|
[2aea0fd] | 17 | </th>
|
---|
| 18 | <th>
|
---|
[e90ba32] | 19 | @Html.DisplayNameFor(model => model.user_name)
|
---|
[2aea0fd] | 20 | </th>
|
---|
| 21 | <th>
|
---|
[e90ba32] | 22 | @Html.DisplayNameFor(model => model.user_email)
|
---|
[2aea0fd] | 23 | </th>
|
---|
| 24 | <th>
|
---|
[e90ba32] | 25 | @Html.DisplayNameFor(model => model.consultation_title)
|
---|
| 26 | </th>
|
---|
| 27 | <th>
|
---|
| 28 | @Html.DisplayNameFor(model => model.consultation_description)
|
---|
| 29 | </th>
|
---|
| 30 | <th>
|
---|
| 31 | @Html.DisplayNameFor(model => model.consultation_date)
|
---|
[2aea0fd] | 32 | </th>
|
---|
| 33 | <th></th>
|
---|
| 34 |
|
---|
| 35 | </tr>
|
---|
| 36 |
|
---|
[118e414] | 37 | @foreach (var item in Model)
|
---|
| 38 | {
|
---|
| 39 | <tr>
|
---|
| 40 | <td>
|
---|
[e90ba32] | 41 | @Html.DisplayFor(modelItem => item.id)
|
---|
[118e414] | 42 | </td>
|
---|
| 43 | <td>
|
---|
[e90ba32] | 44 | @Html.DisplayFor(modelItem => item.user_name)
|
---|
| 45 | </td>
|
---|
| 46 | <td>
|
---|
| 47 | @Html.DisplayFor(model => item.user_email)
|
---|
| 48 | </td>
|
---|
| 49 | <td>
|
---|
| 50 | @Html.DisplayFor(modelItem => item.consultation_title)
|
---|
| 51 | </td>
|
---|
| 52 | <td>
|
---|
| 53 | @Html.DisplayFor(modelItem => item.consultation_description)
|
---|
[118e414] | 54 | </td>
|
---|
| 55 | <td>
|
---|
[e90ba32] | 56 | @Html.DisplayFor(modelItem => item.consultation_date)
|
---|
[118e414] | 57 | </td>
|
---|
| 58 |
|
---|
| 59 | @*<td>
|
---|
| 60 | @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
|
---|
| 61 | @Html.ActionLink("Answers", "Details", new { id = item.id }) |
|
---|
| 62 | @Html.ActionLink("Delete", "Delete", new { id = item.id })
|
---|
[2aea0fd] | 63 | </td>
|
---|
[118e414] | 64 | *@
|
---|
[2aea0fd] | 65 |
|
---|
| 66 |
|
---|
[72b1da2] | 67 |
|
---|
| 68 |
|
---|
[118e414] | 69 | @if (item.users_id == ViewBag.CurrentUserId)
|
---|
[e9bb9d1] | 70 |
|
---|
[118e414] | 71 | {
|
---|
| 72 | <td>
|
---|
| 73 | @Html.ActionLink("Edit", "Edit", new { id = item.id })
|
---|
| 74 | @Html.ActionLink("Delete", "Delete", new { id = item.id })
|
---|
[72b1da2] | 75 |
|
---|
[118e414] | 76 | </td>
|
---|
[72b1da2] | 77 | }
|
---|
[e9bb9d1] | 78 |
|
---|
| 79 |
|
---|
[72b1da2] | 80 |
|
---|
| 81 | @if (item.users_id == ViewBag.CurrentUserId || item.users_id != ViewBag.CurrentUserId)
|
---|
| 82 | {
|
---|
| 83 | <td>
|
---|
[118e414] | 84 |
|
---|
| 85 | @Html.ActionLink("Answers", "Details", new { id = item.id })
|
---|
| 86 |
|
---|
[72b1da2] | 87 |
|
---|
| 88 | </td>
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 |
|
---|
[118e414] | 92 |
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | </tr>
|
---|
| 97 | }
|
---|
[2aea0fd] | 98 |
|
---|
| 99 | </table>
|
---|