2020-05-26 01:19:50 +01:00
|
|
|
@{
|
2020-12-20 21:34:13 +00:00
|
|
|
/******************************************************************************
|
2020-02-10 01:52:56 +00:00
|
|
|
// MARECHAI: Master repository of computing history artifacts information
|
2018-08-11 10:50:22 +01:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// 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/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-02-10 03:05:39 +00:00
|
|
|
// Copyright © 2003-2020 Natalia Portillo
|
2018-08-11 10:50:22 +01:00
|
|
|
*******************************************************************************/
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-26 01:19:50 +01:00
|
|
|
@page "/admin/instruction_sets/details/{Id:int}"
|
2020-05-27 18:46:01 +01:00
|
|
|
@page "/admin/instruction_sets/edit/{Id:int}"
|
2020-05-28 01:38:31 +01:00
|
|
|
@page "/admin/instruction_sets/create"
|
2020-06-10 00:27:39 +01:00
|
|
|
@using Marechai.Database.Models
|
2020-05-26 01:19:50 +01:00
|
|
|
@inherits OwningComponentBase<InstructionSetsService>
|
|
|
|
|
@inject IStringLocalizer<InstructionSetsService> L
|
|
|
|
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
2020-05-27 18:46:01 +01:00
|
|
|
@inject NavigationManager NavigationManager
|
2020-12-20 21:34:13 +00:00
|
|
|
@inject UserManager<ApplicationUser> UserManager
|
2020-06-10 00:27:39 +01:00
|
|
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
2020-05-26 01:19:50 +01:00
|
|
|
<h3>@L["Instruction set details"]</h3>
|
|
|
|
|
<hr />
|
2020-12-20 21:34:13 +00:00
|
|
|
@if(!_loaded)
|
2020-05-26 01:19:50 +01:00
|
|
|
{
|
|
|
|
|
<p align="center">@L["Loading..."]</p>
|
|
|
|
|
|
|
|
|
|
return;
|
2018-08-11 10:50:22 +01:00
|
|
|
}
|
|
|
|
|
<div>
|
2020-05-26 01:19:50 +01:00
|
|
|
<Field>
|
|
|
|
|
<FieldLabel>@L["Name"]</FieldLabel>
|
2020-05-27 18:46:01 +01:00
|
|
|
<Validation Validator="@ValidateName">
|
2020-12-20 21:34:13 +00:00
|
|
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
2020-05-27 18:46:01 +01:00
|
|
|
<Feedback>
|
|
|
|
|
<ValidationError>@L["Please enter a valid instruction set name."]</ValidationError>
|
|
|
|
|
</Feedback>
|
|
|
|
|
</TextEdit>
|
|
|
|
|
</Validation>
|
2020-05-26 01:19:50 +01:00
|
|
|
</Field>
|
2018-08-11 10:50:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div>
|
2020-12-20 21:34:13 +00:00
|
|
|
@if(!_editing)
|
2020-05-27 18:46:01 +01:00
|
|
|
{
|
2020-12-20 21:34:13 +00:00
|
|
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
|
|
|
|
}
|
2020-05-27 18:46:01 +01:00
|
|
|
else
|
|
|
|
|
{
|
2020-12-20 21:34:13 +00:00
|
|
|
<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>
|
2020-02-10 22:44:18 +00:00
|
|
|
</div>
|