mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Sort browser tests in admin page.
This commit is contained in:
@@ -28,26 +28,37 @@
|
|||||||
// Copyright © 2003-2018 Natalia Portillo
|
// Copyright © 2003-2018 Natalia Portillo
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Cicm.Database.Models
|
namespace Cicm.Database.Models
|
||||||
{
|
{
|
||||||
public class BrowserTest
|
public class BrowserTest
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
[DisplayName("User agent")]
|
||||||
public string UserAgent { get; set; }
|
public string UserAgent { get; set; }
|
||||||
public string Browser { get; set; }
|
public string Browser { get; set; }
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public string Os { get; set; }
|
[DisplayName("Operating system")]
|
||||||
public string Platform { get; set; }
|
public string Os { get; set; }
|
||||||
public bool Gif87 { get; set; }
|
public string Platform { get; set; }
|
||||||
public bool Gif89 { get; set; }
|
[DisplayName("GIF87")]
|
||||||
public bool Jpeg { get; set; }
|
public bool Gif87 { get; set; }
|
||||||
public bool Png { get; set; }
|
[DisplayName("GIF89")]
|
||||||
public bool Pngt { get; set; }
|
public bool Gif89 { get; set; }
|
||||||
public bool Agif { get; set; }
|
[DisplayName("JPEG")]
|
||||||
public bool Table { get; set; }
|
public bool Jpeg { get; set; }
|
||||||
public bool Colors { get; set; }
|
[DisplayName("PNG")]
|
||||||
public bool Js { get; set; }
|
public bool Png { get; set; }
|
||||||
public bool Frames { get; set; }
|
[DisplayName("Transparent PNG")]
|
||||||
public bool Flash { get; set; }
|
public bool Pngt { get; set; }
|
||||||
|
[DisplayName("Animated GIF")]
|
||||||
|
public bool Agif { get; set; }
|
||||||
|
public bool Table { get; set; }
|
||||||
|
public bool Colors { get; set; }
|
||||||
|
[DisplayName("JavaScript")]
|
||||||
|
public bool Js { get; set; }
|
||||||
|
public bool Frames { get; set; }
|
||||||
|
public bool Flash { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,9 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GET: Admin/BrowserTests
|
// GET: Admin/BrowserTests
|
||||||
public async Task<IActionResult> Index() => View(await _context.BrowserTests.ToListAsync());
|
public async Task<IActionResult> Index() =>
|
||||||
|
View(await _context.BrowserTests.OrderBy(b => b.Browser).ThenBy(b => b.Version).ThenBy(b => b.Os)
|
||||||
|
.ThenBy(b => b.Platform).ThenBy(b => b.UserAgent).ToListAsync());
|
||||||
|
|
||||||
// GET: Admin/BrowserTests/Details/5
|
// GET: Admin/BrowserTests/Details/5
|
||||||
public async Task<IActionResult> Details(int? id)
|
public async Task<IActionResult> Details(int? id)
|
||||||
|
|||||||
@@ -41,9 +41,6 @@
|
|||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
|
||||||
@Html.DisplayNameFor(model => model.UserAgent)
|
|
||||||
</th>
|
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Browser)
|
@Html.DisplayNameFor(model => model.Browser)
|
||||||
</th>
|
</th>
|
||||||
@@ -56,6 +53,9 @@
|
|||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Platform)
|
@Html.DisplayNameFor(model => model.Platform)
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
@Html.DisplayNameFor(model => model.UserAgent)
|
||||||
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Gif87)
|
@Html.DisplayNameFor(model => model.Gif87)
|
||||||
</th>
|
</th>
|
||||||
@@ -96,9 +96,6 @@
|
|||||||
@foreach(BrowserTest item in Model)
|
@foreach(BrowserTest item in Model)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
|
||||||
@Html.DisplayFor(modelItem => item.UserAgent)
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Browser)
|
@Html.DisplayFor(modelItem => item.Browser)
|
||||||
</td>
|
</td>
|
||||||
@@ -111,6 +108,9 @@
|
|||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Platform)
|
@Html.DisplayFor(modelItem => item.Platform)
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
@Html.DisplayFor(modelItem => item.UserAgent)
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Gif87)
|
@Html.DisplayFor(modelItem => item.Gif87)
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -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.397</Version>
|
<Version>3.0.99.398</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