mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
93 lines
2.9 KiB
Plaintext
93 lines
2.9 KiB
Plaintext
@using cicm_web.Areas.Admin.Models
|
|
@model IEnumerable<cicm_web.Areas.Admin.Models.MachinePhotoViewModel>
|
|
|
|
@{
|
|
ViewData["Title"] = "Index";
|
|
}
|
|
|
|
<h1>Machine photos</h1>
|
|
|
|
<p>
|
|
<a asp-action="Create"
|
|
class="btn btn-primary">
|
|
Create New
|
|
</a>
|
|
</p>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Machine)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.UploadUser)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.UploadDate)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Author)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.License)
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach(MachinePhotoViewModel item in Model)
|
|
{
|
|
<tr>
|
|
<td class="text-center">
|
|
<picture>
|
|
<source type="image/webp"
|
|
srcset="/assets/photos/machines/thumbs/webp/1x/@(item.Id).webp,
|
|
/assets/photos/machines/thumbs/webp/2x/@(item.Id).webp 2x,
|
|
/assets/photos/machines/thumbs/webp/3x/@(item.Id).webp 3x">
|
|
<img srcset="/assets/photos/machines/thumbs/jpg/1x/@(item.Id).jpg,
|
|
/assets/photos/machines/thumbs/jpg/2x/@(item.Id).jpg 2x,
|
|
/assets/photos/machines/thumbs/jpg/3x/@(item.Id).jpg 3x"
|
|
src="/assets/photos/machines/thumbs/jpg/1x/@(item.Id).jpg")
|
|
alt=""
|
|
height="auto"
|
|
width="auto"
|
|
style="max-height: 64px; max-width: 64px" />
|
|
</picture>
|
|
</td>
|
|
<td class="align-middle">
|
|
@Html.DisplayFor(modelItem => item.Machine)
|
|
</td>
|
|
<td class="align-middle">
|
|
@Html.DisplayFor(modelItem => item.UploadUser)
|
|
</td>
|
|
<td class="align-middle">
|
|
@Html.DisplayFor(modelItem => item.UploadDate)
|
|
</td>
|
|
<td class="align-middle">
|
|
@Html.DisplayFor(modelItem => item.Author)
|
|
</td>
|
|
<td class="align-middle">
|
|
@Html.DisplayFor(modelItem => item.License)
|
|
</td>
|
|
<td class="align-middle">
|
|
<a asp-action="Details"
|
|
asp-route-id="@item.Id"
|
|
class="btn btn-primary">
|
|
Details
|
|
</a>
|
|
<a asp-action="Edit"
|
|
asp-route-id="@item.Id"
|
|
class="btn btn-secondary">
|
|
Edit
|
|
</a>
|
|
<a asp-action="Delete"
|
|
asp-route-id="@item.Id"
|
|
class="btn btn-danger">
|
|
Delete
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table> |