mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Move sound synthesizers admin index to Blazor.
This commit is contained in:
114
Marechai/Pages/Admin/SoundSynths.razor
Normal file
114
Marechai/Pages/Admin/SoundSynths.razor
Normal file
@@ -0,0 +1,114 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : SoundSynths.razor
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// List of sound synthesizers
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
|
||||
@page "/admin/sound_synths"
|
||||
@using Marechai.Database.Models
|
||||
@inherits OwningComponentBase<SoundSynthsService>
|
||||
@inject IStringLocalizer<SoundSynthsService> L
|
||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||
<h3>@L["Sound synthesizers"]</h3>
|
||||
@if (_soundSynths is null)
|
||||
{
|
||||
<p>@L["Loading..."]</p>
|
||||
|
||||
return;
|
||||
}
|
||||
<p>
|
||||
<span class="btn btn-primary">
|
||||
@L["Create new"]
|
||||
</span>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@L["Company"]
|
||||
</th>
|
||||
<th>
|
||||
@L["Name"]
|
||||
</th>
|
||||
<th>
|
||||
@L["Model code"]
|
||||
</th>
|
||||
<th>
|
||||
@L["Introduced"]
|
||||
</th>
|
||||
<th>
|
||||
@L["Type"]
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in _soundSynths)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@item.CompanyName
|
||||
</td>
|
||||
<td>
|
||||
@item.Name
|
||||
</td>
|
||||
<td>
|
||||
@item.ModelCode
|
||||
</td>
|
||||
<td>
|
||||
@item.IntroducedView
|
||||
</td>
|
||||
<td>
|
||||
@item.Type
|
||||
</td>
|
||||
<td>
|
||||
<span class="btn btn-primary">
|
||||
@L["Details"]
|
||||
</span>
|
||||
<span class="btn btn-secondary">
|
||||
@L["Edit"]
|
||||
</span>
|
||||
<span class="btn btn-danger">
|
||||
@L["Delete"]
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@code
|
||||
{
|
||||
List<SoundSynthViewModel> _soundSynths;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_soundSynths = await Service.GetAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user