mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Sort medias.
This commit is contained in:
@@ -15,7 +15,8 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
|||||||
public MediasController(DicServerContext context) => _context = context;
|
public MediasController(DicServerContext context) => _context = context;
|
||||||
|
|
||||||
// GET: Admin/Medias
|
// GET: Admin/Medias
|
||||||
public async Task<IActionResult> Index() => View(await _context.Medias.ToListAsync());
|
public IActionResult Index() => View(_context.Medias.ToList().OrderBy(m => m.PhysicalType).
|
||||||
|
ThenBy(m => m.LogicalType).ThenBy(m => m.Real));
|
||||||
|
|
||||||
// GET: Admin/Medias/Delete/5
|
// GET: Admin/Medias/Delete/5
|
||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
|
|||||||
@@ -37,7 +37,10 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Type)
|
@Html.DisplayNameFor(model => model.PhysicalType)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.LogicalType)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Real)
|
@Html.DisplayNameFor(model => model.Real)
|
||||||
@@ -53,7 +56,10 @@
|
|||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Type)
|
@Html.DisplayFor(modelItem => item.PhysicalType)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.LogicalType)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Real)
|
@Html.DisplayFor(modelItem => item.Real)
|
||||||
@@ -62,8 +68,6 @@
|
|||||||
@Html.DisplayFor(modelItem => item.Count)
|
@Html.DisplayFor(modelItem => item.Count)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<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>
|
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user