mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 11:04:25 +00:00
69 lines
2.6 KiB
Plaintext
69 lines
2.6 KiB
Plaintext
@{
|
|
/******************************************************************************
|
|
// MARECHAI: Master repository of computing history artifacts information
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
//
|
|
// --[ 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/instruction_sets/details/{Id:int}"
|
|
@page "/admin/instruction_sets/edit/{Id:int}"
|
|
@page "/admin/instruction_sets/create"
|
|
@using Marechai.Database.Models
|
|
@inherits OwningComponentBase<InstructionSetsService>
|
|
@inject IStringLocalizer<InstructionSetsService> L
|
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
|
@inject NavigationManager NavigationManager
|
|
@inject UserManager<ApplicationUser> UserManager
|
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
|
<h3>@L["Instruction set details"]</h3>
|
|
<hr />
|
|
@if(!_loaded)
|
|
{
|
|
<p align="center">@L["Loading..."]</p>
|
|
|
|
return;
|
|
}
|
|
<div>
|
|
<Field>
|
|
<FieldLabel>@L["Name"]</FieldLabel>
|
|
<Validation Validator="@ValidateName">
|
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
|
<Feedback>
|
|
<ValidationError>@L["Please enter a valid instruction set name."]</ValidationError>
|
|
</Feedback>
|
|
</TextEdit>
|
|
</Validation>
|
|
</Field>
|
|
</div>
|
|
<div>
|
|
@if(!_editing)
|
|
{
|
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
|
}
|
|
else
|
|
{
|
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
|
}
|
|
<a class="btn btn-secondary" href="/admin/instruction_sets">@L["Back to list"]</a>
|
|
</div> |