[2aea0fd] | 1 | @using Microsoft.AspNetCore.Identity
|
---|
| 2 | @inject SignInManager<IdentityUser> SignInManager
|
---|
[e9bb9d1] | 3 | @* IEnumerable<PostgreSqlDotnetCore.Models.VetCenter>*@
|
---|
| 4 | @model IEnumerable<PostgreSqlDotnetCore.Models.VetCenterWithCity>
|
---|
| 5 |
|
---|
[2aea0fd] | 6 |
|
---|
| 7 | @{
|
---|
| 8 | ViewBag.Title = "VetCenter";
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | <h2>Vet Center</h2>
|
---|
| 12 |
|
---|
[57fc402] | 13 | @*<p>
|
---|
[2aea0fd] | 14 | @Html.ActionLink("Create New", "Create")
|
---|
| 15 | </p>
|
---|
[57fc402] | 16 | *@
|
---|
| 17 | @if (ViewBag.hasAccess != null && ViewBag.hasAccess == true)
|
---|
| 18 | {
|
---|
| 19 | <p>
|
---|
| 20 | @Html.ActionLink("Create New", "Create")
|
---|
| 21 | </p>
|
---|
| 22 | }
|
---|
| 23 |
|
---|
[2aea0fd] | 24 | <table class="table">
|
---|
| 25 | <tr>
|
---|
| 26 | <th>
|
---|
[e9bb9d1] | 27 | @Html.DisplayNameFor(model => model.vet_center_name)
|
---|
[2aea0fd] | 28 | </th>
|
---|
| 29 | <th>
|
---|
| 30 | @Html.DisplayNameFor(model => model.adress)
|
---|
| 31 | </th>
|
---|
| 32 |
|
---|
| 33 | <th>
|
---|
| 34 | @Html.DisplayNameFor(model => model.workinghours)
|
---|
| 35 | </th>
|
---|
| 36 | <th>
|
---|
| 37 | @Html.DisplayNameFor(model => model.description)
|
---|
| 38 | </th>
|
---|
| 39 | <th>
|
---|
| 40 | @Html.DisplayNameFor(model => model.phonenumber)
|
---|
| 41 | </th>
|
---|
| 42 | <th>
|
---|
| 43 | @Html.DisplayNameFor(model => model.latitude)
|
---|
| 44 | </th>
|
---|
| 45 | <th>
|
---|
| 46 | @Html.DisplayNameFor(model => model.longitude)
|
---|
| 47 | </th>
|
---|
| 48 | <th>
|
---|
[e9bb9d1] | 49 | @Html.DisplayNameFor(model => model.city_name)
|
---|
[2aea0fd] | 50 | </th>
|
---|
| 51 | <th></th>
|
---|
| 52 | </tr>
|
---|
| 53 |
|
---|
| 54 | @foreach (var item in Model)
|
---|
| 55 | {
|
---|
| 56 | <tr>
|
---|
| 57 | <td>
|
---|
[e9bb9d1] | 58 | @Html.DisplayFor(modelItem => item.vet_center_name)
|
---|
[2aea0fd] | 59 | </td>
|
---|
| 60 | <td>
|
---|
| 61 | @Html.DisplayFor(modelItem => item.adress)
|
---|
| 62 | </td>
|
---|
| 63 | <td>
|
---|
| 64 | @Html.DisplayFor(modelItem => item.workinghours)
|
---|
| 65 | </td>
|
---|
| 66 | <td>
|
---|
| 67 | @Html.DisplayFor(modelItem => item.description)
|
---|
| 68 | </td>
|
---|
| 69 |
|
---|
| 70 | <td>
|
---|
| 71 | @Html.DisplayFor(modelItem => item.phonenumber)
|
---|
| 72 | </td>
|
---|
| 73 | <td>
|
---|
| 74 | @Html.DisplayFor(modelItem => item.latitude)
|
---|
| 75 | </td>
|
---|
| 76 | <td>
|
---|
| 77 | @Html.DisplayFor(modelItem => item.longitude)
|
---|
| 78 | </td>
|
---|
| 79 | <td>
|
---|
[e9bb9d1] | 80 | @Html.DisplayFor(modelItem => item.city_name)
|
---|
[2aea0fd] | 81 | </td>
|
---|
| 82 | <td>
|
---|
| 83 | @*@Html.DisplayFor(modelItem => item.email)*@
|
---|
| 84 | </td>
|
---|
| 85 | <td>
|
---|
| 86 | @*@Html.DisplayFor(modelItem => item.number)*@
|
---|
| 87 | </td>
|
---|
| 88 |
|
---|
[72b1da2] | 89 |
|
---|
[2aea0fd] | 90 |
|
---|
[e9bb9d1] | 91 | @* @if ((SignInManager.IsSignedIn(User)))
|
---|
| 92 | {
|
---|
| 93 | <td>
|
---|
[2aea0fd] | 94 |
|
---|
[e9bb9d1] | 95 | @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
|
---|
| 96 | @Html.ActionLink("Details", "Details", new { id = item.id }) |
|
---|
| 97 | @Html.ActionLink("Delete", "Delete", new { id = item.id })
|
---|
| 98 |
|
---|
| 99 | </td>
|
---|
| 100 | }
|
---|
| 101 | *@
|
---|
[72b1da2] | 102 |
|
---|
| 103 | @* Додадете условие за проверка на улогите *@
|
---|
| 104 | @if (SignInManager.IsSignedIn(User) && (ViewBag.hasAccess != null && ViewBag.hasAccess == true))
|
---|
| 105 | {
|
---|
| 106 | <td>
|
---|
| 107 | @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
|
---|
| 108 | @Html.ActionLink("Details", "Details", new { id = item.id }) |
|
---|
| 109 | @Html.ActionLink("Delete", "Delete", new { id = item.id })
|
---|
| 110 | </td>
|
---|
| 111 | }
|
---|
[2aea0fd] | 112 |
|
---|
| 113 | </tr>
|
---|
| 114 | }
|
---|
| 115 |
|
---|
| 116 | </table>
|
---|