mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Sort supported densities.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using DiscImageChef.CommonTypes.Metadata;
|
using DiscImageChef.CommonTypes.Metadata;
|
||||||
using DiscImageChef.Server.Models;
|
using DiscImageChef.Server.Models;
|
||||||
@@ -15,7 +16,14 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
|||||||
public SupportedDensitiesController(DicServerContext context) => _context = context;
|
public SupportedDensitiesController(DicServerContext context) => _context = context;
|
||||||
|
|
||||||
// GET: Admin/SupportedDensities
|
// GET: Admin/SupportedDensities
|
||||||
public async Task<IActionResult> Index() => View(await _context.SupportedDensity.ToListAsync());
|
public async Task<IActionResult> Index() => View(await _context.
|
||||||
|
SupportedDensity.OrderBy(d => d.Organization).
|
||||||
|
ThenBy(d => d.Name).ThenBy(d => d.Description).
|
||||||
|
ThenBy(d => d.Capacity).ThenBy(d => d.PrimaryCode).
|
||||||
|
ThenBy(d => d.SecondaryCode).ThenBy(d => d.BitsPerMm).
|
||||||
|
ThenBy(d => d.Width).ThenBy(d => d.Tracks).
|
||||||
|
ThenBy(d => d.DefaultDensity).ThenBy(d => d.Writable).
|
||||||
|
ThenBy(d => d.Duplicate).ToListAsync());
|
||||||
|
|
||||||
// GET: Admin/SupportedDensities/Delete/5
|
// GET: Admin/SupportedDensities/Delete/5
|
||||||
public async Task<IActionResult> Delete(int? id)
|
public async Task<IActionResult> Delete(int? id)
|
||||||
|
|||||||
@@ -36,21 +36,24 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Organization)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Name)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Description)
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.Capacity)
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.PrimaryCode)
|
@Html.DisplayNameFor(model => model.PrimaryCode)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.SecondaryCode)
|
@Html.DisplayNameFor(model => model.SecondaryCode)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Writable)
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Duplicate)
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.DefaultDensity)
|
|
||||||
</th>
|
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.BitsPerMm)
|
@Html.DisplayNameFor(model => model.BitsPerMm)
|
||||||
</th>
|
</th>
|
||||||
@@ -61,16 +64,13 @@
|
|||||||
@Html.DisplayNameFor(model => model.Tracks)
|
@Html.DisplayNameFor(model => model.Tracks)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Capacity)
|
@Html.DisplayNameFor(model => model.DefaultDensity)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Organization)
|
@Html.DisplayNameFor(model => model.Writable)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Name)
|
@Html.DisplayNameFor(model => model.Duplicate)
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.Description)
|
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -79,21 +79,24 @@
|
|||||||
@foreach (var item in Model)
|
@foreach (var item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Organization)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Name)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Description)
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.Capacity)
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.PrimaryCode)
|
@Html.DisplayFor(modelItem => item.PrimaryCode)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.SecondaryCode)
|
@Html.DisplayFor(modelItem => item.SecondaryCode)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Writable)
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Duplicate)
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.DefaultDensity)
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.BitsPerMm)
|
@Html.DisplayFor(modelItem => item.BitsPerMm)
|
||||||
</td>
|
</td>
|
||||||
@@ -104,16 +107,13 @@
|
|||||||
@Html.DisplayFor(modelItem => item.Tracks)
|
@Html.DisplayFor(modelItem => item.Tracks)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Capacity)
|
@Html.DisplayFor(modelItem => item.DefaultDensity)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Organization)
|
@Html.DisplayFor(modelItem => item.Writable)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Name)
|
@Html.DisplayFor(modelItem => item.Duplicate)
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.Description)
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user