mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Implement index page for people.
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Cicm.Database.Models
|
|||||||
public int? DocumentPersonId { get; set; }
|
public int? DocumentPersonId { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
|
[DisplayName("Name")]
|
||||||
public string FullName => $"{Name} {Surname}";
|
public string FullName => $"{Name} {Surname}";
|
||||||
|
|
||||||
public short? CountryOfBirthId { get; set; }
|
public short? CountryOfBirthId { get; set; }
|
||||||
|
|||||||
@@ -1,22 +1,19 @@
|
|||||||
@model IEnumerable<Cicm.Database.Models.Person>
|
@model IEnumerable<Cicm.Database.Models.Person>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Index";
|
ViewData["Title"] = "People";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h1>Index</h1>
|
<h1>People</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a asp-action="Create">Create New</a>
|
<a asp-action="Create" class="btn btn-primary">Create New</a>
|
||||||
</p>
|
</p>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Name)
|
@Html.DisplayNameFor(model => model.FullName)
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Surname)
|
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.CountryOfBirth)
|
@Html.DisplayNameFor(model => model.CountryOfBirth)
|
||||||
@@ -36,9 +33,6 @@
|
|||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Facebook)
|
@Html.DisplayNameFor(model => model.Facebook)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Photo)
|
|
||||||
</th>
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -46,10 +40,7 @@
|
|||||||
@foreach (var item in Model) {
|
@foreach (var item in Model) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Name)
|
@Html.DisplayFor(modelItem => item.FullName)
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Surname)
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.CountryOfBirth.Name)
|
@Html.DisplayFor(modelItem => item.CountryOfBirth.Name)
|
||||||
@@ -64,18 +55,21 @@
|
|||||||
@Html.DisplayFor(modelItem => item.Webpage)
|
@Html.DisplayFor(modelItem => item.Webpage)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Twitter)
|
@if(item.Twitter != null)
|
||||||
|
{
|
||||||
|
<a href="https://twitter.com/@Html.DisplayFor(modelItem => item.Twitter)">@Html.DisplayFor(modelItem => item.Twitter)</a>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Facebook)
|
@if(item.Facebook != null)
|
||||||
|
{
|
||||||
|
<a href="https://www.facebook.com/@Html.DisplayFor(modelItem => item.Facebook)">@Html.DisplayFor(modelItem => item.Facebook)</a>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Photo)
|
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||||
</td>
|
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||||
<td>
|
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
|
||||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
|
||||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
<Version>3.0.99.865</Version>
|
<Version>3.0.99.867</Version>
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
Reference in New Issue
Block a user