source: PostgreSqlDotnetCore/Views/VetCenter/Index.cshtml@ 99d0ecc

main
Last change on this file since 99d0ecc was 99d0ecc, checked in by ElenaMoskova <elena.moskova99@…>, 4 weeks ago

fix update/create petcares

add new field modify functions

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