66 lines
2.2 KiB
Plaintext
66 lines
2.2 KiB
Plaintext
@model List<Person>
|
|
@{
|
|
ViewData["Title"] = "Sökresultat";
|
|
}
|
|
|
|
<h2 class="text-center mt-3 mb-4">@ViewData["Title"]</h2>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<a href="/Person/Create" class="btn btn-success mb-5">Skapa ny medlem</a>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<form asp-action="Search" method="post">
|
|
<div class="form-group">
|
|
<label class="control-label">
|
|
<input name="search" id="search" class="form-control" tabindex="1" placeholder="Namn eller E-post" />
|
|
</label>
|
|
<input type="submit" value="Sök" class="btn btn-primary" />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container mb-5">
|
|
@if (Model.Count() >= 0) {
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Namn</th>
|
|
<th>Epost</th>
|
|
<th>Alder</th>
|
|
<th>Registrerad</th>
|
|
<th>Visningsbild</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var person in Model) {
|
|
<tr>
|
|
<td>@person.PersonId</td>
|
|
<td>@person.PersonNamn</td>
|
|
<td>@person.Epost</td>
|
|
<td>@person.Alder</td>
|
|
<td>@person.StartDatum</td>
|
|
<td><img src="~/images/userphoto/@person.Visningsbild" alt="@person.PersonNamn" class="visningsbild" /></td>
|
|
<td>
|
|
<a asp-action="Delete" asp-controller="Person" asp-route-Id="@person.PersonId">Ta bort</a> |
|
|
<a asp-action="Edit" asp-controller="Person" asp-route-Id="@person.PersonId">Editera</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
|
|
</table>
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
@section Scripts {
|
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
|
}
|
|
|