mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
108 lines
2.9 KiB
Plaintext
108 lines
2.9 KiB
Plaintext
@{
|
|
/******************************************************************************
|
|
// MARECHAI: Master repository of computing history artifacts information
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// Filename : Screens.razor
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
//
|
|
// --[ Description ] ----------------------------------------------------------
|
|
//
|
|
// List of screens
|
|
//
|
|
// --[ 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/screens"
|
|
@using Marechai.Database.Models
|
|
@inherits OwningComponentBase<ScreensService>
|
|
@inject IStringLocalizer<ScreensService> L
|
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
|
<h3>@L["Screens"]</h3>
|
|
@if (_screens 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["Diagonal"]
|
|
</th>
|
|
<th>
|
|
@L["Native resolution"]
|
|
</th>
|
|
<th>
|
|
@L["Effective colors"]
|
|
</th>
|
|
<th>
|
|
@L["Type"]
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in _screens)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@string.Format(L["{0}\""], item.Diagonal)
|
|
</td>
|
|
<td>
|
|
@item.NativeResolution.ToString()
|
|
</td>
|
|
<td>
|
|
@item.EffectiveColors
|
|
</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<Screen> _screens;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
_screens = Service.Get();
|
|
}
|
|
} |