source: PostgreSqlDotnetCore/Views/VetCenter/Index.cshtml@ 57fc402

main
Last change on this file since 57fc402 was 57fc402, checked in by ElenaMoskova <elena.moskova99@…>, 5 weeks ago

Аsync, access permission, and other fixes.

Regulation of access permissions. Which fields can be accessed by different users.

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