mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Sort sound synthetizers in admin page.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
@@ -43,16 +45,25 @@ namespace Cicm.Database.Models
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int? CompanyId { get; set; }
|
||||
[DisplayName("Model code")]
|
||||
public string ModelCode { get; set; }
|
||||
public DateTime? Introduced { get; set; }
|
||||
[DisplayName("PCM voices")]
|
||||
public int? Voices { get; set; }
|
||||
[DisplayName("Sample rate (Hz)")]
|
||||
public double? Frequency { get; set; }
|
||||
[DisplayName("Sample resolution")]
|
||||
public int? Depth { get; set; }
|
||||
[DisplayName("Square wave channels")]
|
||||
public int? SquareWave { get; set; }
|
||||
[DisplayName("White noise channels")]
|
||||
public int? WhiteNoise { get; set; }
|
||||
public int? Type { get; set; }
|
||||
|
||||
public virtual Company Company { get; set; }
|
||||
public virtual ICollection<SoundByMachine> SoundByMachine { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="CompanyId"
|
||||
<label asp-for="Company"
|
||||
class="control-label">
|
||||
</label>
|
||||
<select asp-for="CompanyId"
|
||||
@@ -54,6 +54,16 @@
|
||||
asp-items="ViewBag.CompanyId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Name"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Name"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ModelCode"
|
||||
class="control-label">
|
||||
@@ -74,6 +84,16 @@
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Type"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Type"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Voices"
|
||||
class="control-label">
|
||||
@@ -124,16 +144,6 @@
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Type"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Type"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary"
|
||||
type="submit"
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
<h4>Sound synthetizer</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
@@ -58,7 +64,13 @@
|
||||
@Html.DisplayNameFor(model => model.Introduced)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Introduced)
|
||||
@Html.DisplayFor(model => model.IntroducedView)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Voices)
|
||||
@@ -90,18 +102,6 @@
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.WhiteNoise)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
|
||||
@@ -41,6 +41,12 @@
|
||||
<h4>Sound synthetizer</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
@@ -57,7 +63,13 @@
|
||||
@Html.DisplayNameFor(model => model.Introduced)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Introduced)
|
||||
@Html.DisplayFor(model => model.IntroducedView)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Voices)
|
||||
@@ -89,21 +101,16 @@
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.WhiteNoise)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Company.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
<a asp-action="Edit"
|
||||
asp-route-id="@Model.Id"
|
||||
class="btn btn-primary">
|
||||
Edit
|
||||
</a>
|
||||
<a asp-action="Index"
|
||||
class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
@@ -48,17 +48,7 @@
|
||||
<input type="hidden"
|
||||
asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Name"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Name"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Name"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="CompanyId"
|
||||
<label asp-for="Company"
|
||||
class="control-label">
|
||||
</label>
|
||||
<select asp-for="CompanyId"
|
||||
@@ -69,6 +59,16 @@
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Name"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Name"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ModelCode"
|
||||
class="control-label">
|
||||
@@ -89,6 +89,16 @@
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Type"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Type"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Voices"
|
||||
class="control-label">
|
||||
@@ -139,16 +149,6 @@
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type"
|
||||
class="control-label">
|
||||
</label>
|
||||
<input asp-for="Type"
|
||||
class="form-control" />
|
||||
<span asp-validation-for="Type"
|
||||
class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary"
|
||||
type="submit"
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</th>
|
||||
@@ -56,27 +59,9 @@
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Introduced)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Voices)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Frequency)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Depth)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SquareWave)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.WhiteNoise)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -84,6 +69,9 @@
|
||||
@foreach(SoundSynth item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Company.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
@@ -91,29 +79,11 @@
|
||||
@Html.DisplayFor(modelItem => item.ModelCode)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Introduced)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Voices)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Frequency)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Depth)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SquareWave)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.WhiteNoise)
|
||||
@Html.DisplayFor(modelItem => item.IntroducedView)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Company.Name)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details"
|
||||
asp-route-id="@item.Id"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Version>3.0.99.450</Version>
|
||||
<Version>3.0.99.451</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user