Change view of companies in admin area.

This commit is contained in:
2019-05-18 10:20:13 +01:00
parent 531d23599b
commit f21640a451
2 changed files with 45 additions and 73 deletions

View File

@@ -29,6 +29,7 @@
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@using Cicm.Database.Models
@model IEnumerable<Cicm.Database.Models.Company>
@{
@@ -42,51 +43,31 @@
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Founded)
</th>
<th>
@Html.DisplayNameFor(model => model.Website)
</th>
<th>
@Html.DisplayNameFor(model => model.Twitter)
</th>
<th>
@Html.DisplayNameFor(model => model.Facebook)
</th>
<th>
@Html.DisplayNameFor(model => model.Sold)
</th>
<th>
@Html.DisplayNameFor(model => model.Address)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.Province)
</th>
<th>
@Html.DisplayNameFor(model => model.PostalCode)
</th>
<th>
@Html.DisplayNameFor(model => model.Status)
</th>
<th>
@Html.DisplayNameFor(model => model.Country)
</th>
<th>
@Html.DisplayNameFor(model => model.SoldTo)
</th>
<th></th>
</tr>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Founded)
</th>
<th>
@Html.DisplayNameFor(model => model.Status)
</th>
<th>
@Html.DisplayNameFor(model => model.Country)
</th>
<th>
@Html.DisplayNameFor(model => model.Sold)
</th>
<th>
@Html.DisplayNameFor(model => model.SoldTo)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
@foreach(Company item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
@@ -94,45 +75,36 @@
<td>
@Html.DisplayFor(modelItem => item.Founded)
</td>
<td>
@Html.DisplayFor(modelItem => item.Website)
</td>
<td>
@Html.DisplayFor(modelItem => item.Twitter)
</td>
<td>
@Html.DisplayFor(modelItem => item.Facebook)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sold)
</td>
<td>
@Html.DisplayFor(modelItem => item.Address)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.Province)
</td>
<td>
@Html.DisplayFor(modelItem => item.PostalCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
<td>
@Html.DisplayFor(modelItem => item.Country.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sold)
</td>
<td>
@Html.DisplayFor(modelItem => item.SoldTo.Name)
</td>
<td>
<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>
<a asp-action="Edit"
asp-route-id="@item.Id"
class="btn btn-secondary">
Edit
</a>
<a asp-action="Details"
asp-route-id="@item.Id"
class="btn btn-primary">
Details
</a>
<a asp-action="Delete"
asp-route-id="@item.Id"
class="btn btn-danger">
Delete
</a>
</td>
</tr>
}
}
</tbody>
</table>
</table>

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.387</Version>
<Version>3.0.99.388</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>