mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 11:04:25 +00:00
Code refactor.
This commit is contained in:
@@ -221,7 +221,7 @@ space_after_last_attribute=false
|
|||||||
space_before_self_closing=true
|
space_before_self_closing=true
|
||||||
attribute_style=on_single_line
|
attribute_style=on_single_line
|
||||||
attribute_indent=align_by_first_attribute
|
attribute_indent=align_by_first_attribute
|
||||||
sort_attributes=true
|
sort_attributes=false
|
||||||
sort_class_selectors=true
|
sort_class_selectors=true
|
||||||
max_blank_lines_between_tags=0
|
max_blank_lines_between_tags=0
|
||||||
linebreak_before_all_elements=true
|
linebreak_before_all_elements=true
|
||||||
@@ -630,3 +630,10 @@ indent_type_constraints=true
|
|||||||
[*.{js,js.map,ts}]
|
[*.{js,js.map,ts}]
|
||||||
quote_style=doublequoted
|
quote_style=doublequoted
|
||||||
termination_style=ensure_semicolon
|
termination_style=ensure_semicolon
|
||||||
|
|
||||||
|
[*.razor]
|
||||||
|
razor_always_use_end_of_line_brace_style=false
|
||||||
|
blank_lines_around_razor_sections=true
|
||||||
|
blank_lines_around_razor_helpers=true
|
||||||
|
blank_lines_around_razor_functions=true
|
||||||
|
sort_attributes=false
|
||||||
@@ -38,8 +38,7 @@ namespace Marechai.Database.Models
|
|||||||
public class MarechaiContext : IdentityDbContext<ApplicationUser, ApplicationRole, string>
|
public class MarechaiContext : IdentityDbContext<ApplicationUser, ApplicationRole, string>
|
||||||
{
|
{
|
||||||
readonly ValueConverter<string, byte[]> hexToBytesConverter =
|
readonly ValueConverter<string, byte[]> hexToBytesConverter =
|
||||||
new ValueConverter<string, byte[]>(v => HexStringToBytesConverter.StringToHex(v),
|
new(v => HexStringToBytesConverter.StringToHex(v), v => HexStringToBytesConverter.HexToString(v));
|
||||||
v => HexStringToBytesConverter.HexToString(v));
|
|
||||||
|
|
||||||
public MarechaiContext() {}
|
public MarechaiContext() {}
|
||||||
|
|
||||||
@@ -142,13 +141,17 @@ namespace Marechai.Database.Models
|
|||||||
|
|
||||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
|
||||||
IConfigurationRoot configuration = builder.Build();
|
IConfigurationRoot configuration = builder.Build();
|
||||||
optionsBuilder.UseMySql(configuration.GetConnectionString("DefaultConnection"), new MariaDbServerVersion(new Version(10, 5, 0)), b=> b.UseMicrosoftJson()).UseLazyLoadingProxies();
|
|
||||||
|
optionsBuilder.
|
||||||
|
UseMySql(configuration.GetConnectionString("DefaultConnection"),
|
||||||
|
new MariaDbServerVersion(new Version(10, 5, 0)), b => b.UseMicrosoftJson()).
|
||||||
|
UseLazyLoadingProxies();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> SaveChangesWithUserAsync(string userId)
|
public async Task<int> SaveChangesWithUserAsync(string userId)
|
||||||
{
|
{
|
||||||
ChangeTracker.DetectChanges();
|
ChangeTracker.DetectChanges();
|
||||||
List<Audit> audits = new List<Audit>();
|
List<Audit> audits = new();
|
||||||
|
|
||||||
foreach(EntityEntry entry in ChangeTracker.Entries())
|
foreach(EntityEntry entry in ChangeTracker.Entries())
|
||||||
{
|
{
|
||||||
@@ -161,10 +164,10 @@ namespace Marechai.Database.Models
|
|||||||
audit.UserId = userId;
|
audit.UserId = userId;
|
||||||
audit.Table = entry.Metadata.GetTableName();
|
audit.Table = entry.Metadata.GetTableName();
|
||||||
|
|
||||||
Dictionary<string, object> keys = new Dictionary<string, object>();
|
Dictionary<string, object> keys = new();
|
||||||
Dictionary<string, object> olds = new Dictionary<string, object>();
|
Dictionary<string, object> olds = new();
|
||||||
Dictionary<string, object> news = new Dictionary<string, object>();
|
Dictionary<string, object> news = new();
|
||||||
List<string> columns = new List<string>();
|
List<string> columns = new();
|
||||||
|
|
||||||
foreach(PropertyEntry property in entry.Properties)
|
foreach(PropertyEntry property in entry.Properties)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ namespace Marechai.Database
|
|||||||
|
|
||||||
Console.WriteLine("Getting all items from `console_company`");
|
Console.WriteLine("Getting all items from `console_company`");
|
||||||
|
|
||||||
Dictionary<int, string> consoleCompanies = new Dictionary<int, string>();
|
Dictionary<int, string> consoleCompanies = new();
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
|
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
|
||||||
dbCmd.CommandText = "SELECT * from console_company";
|
dbCmd.CommandText = "SELECT * from console_company";
|
||||||
@@ -376,7 +376,7 @@ namespace Marechai.Database
|
|||||||
foreach(DataRow dataRow in dataSet.Tables[0].Rows)
|
foreach(DataRow dataRow in dataSet.Tables[0].Rows)
|
||||||
consoleCompanies.Add(int.Parse(dataRow["id"].ToString()), dataRow["company"].ToString());
|
consoleCompanies.Add(int.Parse(dataRow["id"].ToString()), dataRow["company"].ToString());
|
||||||
|
|
||||||
Dictionary<int, int> conversionEquivalents = new Dictionary<int, int>();
|
Dictionary<int, int> conversionEquivalents = new();
|
||||||
IDbTransaction trans;
|
IDbTransaction trans;
|
||||||
|
|
||||||
Console.WriteLine("Converting all items from `console_company` to `companies`");
|
Console.WriteLine("Converting all items from `console_company` to `companies`");
|
||||||
@@ -417,7 +417,7 @@ namespace Marechai.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("Getting all items from `consoles`");
|
Console.WriteLine("Getting all items from `consoles`");
|
||||||
Dictionary<int, int> consoleIdAndCompanyId = new Dictionary<int, int>();
|
Dictionary<int, int> consoleIdAndCompanyId = new();
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
dataAdapter = dbCore.GetNewDataAdapter();
|
dataAdapter = dbCore.GetNewDataAdapter();
|
||||||
dbCmd.CommandText = "SELECT id,company from consoles";
|
dbCmd.CommandText = "SELECT id,company from consoles";
|
||||||
@@ -1309,7 +1309,7 @@ namespace Marechai.Database
|
|||||||
|
|
||||||
Console.WriteLine("Getting all items from `music_synths`");
|
Console.WriteLine("Getting all items from `music_synths`");
|
||||||
|
|
||||||
Dictionary<int, string> musicSynths = new Dictionary<int, string>();
|
Dictionary<int, string> musicSynths = new();
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
|
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
|
||||||
dbCmd.CommandText = "SELECT * from music_synths";
|
dbCmd.CommandText = "SELECT * from music_synths";
|
||||||
@@ -1320,7 +1320,7 @@ namespace Marechai.Database
|
|||||||
foreach(DataRow dataRow in dataSet.Tables[0].Rows)
|
foreach(DataRow dataRow in dataSet.Tables[0].Rows)
|
||||||
musicSynths.Add(int.Parse(dataRow["id"].ToString()), dataRow["name"].ToString());
|
musicSynths.Add(int.Parse(dataRow["id"].ToString()), dataRow["name"].ToString());
|
||||||
|
|
||||||
Dictionary<int, int> conversionEquivalents = new Dictionary<int, int>();
|
Dictionary<int, int> conversionEquivalents = new();
|
||||||
|
|
||||||
Console.WriteLine("Converting all items from `music_synths` to `sound_synths`");
|
Console.WriteLine("Converting all items from `music_synths` to `sound_synths`");
|
||||||
|
|
||||||
@@ -1359,7 +1359,7 @@ namespace Marechai.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("Getting all items from `consoles`");
|
Console.WriteLine("Getting all items from `consoles`");
|
||||||
Dictionary<int, int> consoleIdAndMusicSynthId = new Dictionary<int, int>();
|
Dictionary<int, int> consoleIdAndMusicSynthId = new();
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
dataAdapter = dbCore.GetNewDataAdapter();
|
dataAdapter = dbCore.GetNewDataAdapter();
|
||||||
dbCmd.CommandText = "SELECT id,music_synth from consoles";
|
dbCmd.CommandText = "SELECT id,music_synth from consoles";
|
||||||
@@ -1391,7 +1391,7 @@ namespace Marechai.Database
|
|||||||
trans.Commit();
|
trans.Commit();
|
||||||
|
|
||||||
Console.WriteLine("Getting all items from `computers`");
|
Console.WriteLine("Getting all items from `computers`");
|
||||||
Dictionary<int, int> computerIdAndMusicSynthId = new Dictionary<int, int>();
|
Dictionary<int, int> computerIdAndMusicSynthId = new();
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
dataAdapter = dbCore.GetNewDataAdapter();
|
dataAdapter = dbCore.GetNewDataAdapter();
|
||||||
dbCmd.CommandText = "SELECT id,music_synth from computers";
|
dbCmd.CommandText = "SELECT id,music_synth from computers";
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace Marechai.Database.Seeders
|
|||||||
public static void Seed(MarechaiContext context)
|
public static void Seed(MarechaiContext context)
|
||||||
{
|
{
|
||||||
List<DocumentRole> existingRoles = context.DocumentRoles.ToList();
|
List<DocumentRole> existingRoles = context.DocumentRoles.ToList();
|
||||||
List<DocumentRole> newDocumentRoles = new List<DocumentRole>();
|
List<DocumentRole> newDocumentRoles = new();
|
||||||
int updatedDocumentRolesCount = 0;
|
int updatedDocumentRolesCount = 0;
|
||||||
|
|
||||||
foreach(DocumentRole role in new[]
|
foreach(DocumentRole role in new[]
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace Marechai.Database.Seeders
|
|||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, Models.Iso4217> existingCodes = context.Iso4217.ToDictionary(c => c.Code);
|
Dictionary<string, Models.Iso4217> existingCodes = context.Iso4217.ToDictionary(c => c.Code);
|
||||||
Dictionary<string, Models.Iso4217> newCodes = new Dictionary<string, Models.Iso4217>();
|
Dictionary<string, Models.Iso4217> newCodes = new();
|
||||||
|
|
||||||
long modified = 0;
|
long modified = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace Marechai.Database.Seeders
|
|||||||
IEnumerable<string> files = Directory.EnumerateFiles("iso639", "iso-639-3_*.tab");
|
IEnumerable<string> files = Directory.EnumerateFiles("iso639", "iso-639-3_*.tab");
|
||||||
long modified = 0;
|
long modified = 0;
|
||||||
|
|
||||||
List<Models.Iso639> codes = new List<Models.Iso639>();
|
List<Models.Iso639> codes = new();
|
||||||
|
|
||||||
foreach(string file in files)
|
foreach(string file in files)
|
||||||
{
|
{
|
||||||
@@ -121,7 +121,7 @@ namespace Marechai.Database.Seeders
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Models.Iso639> existingCodes = context.Iso639.ToList();
|
List<Models.Iso639> existingCodes = context.Iso639.ToList();
|
||||||
List<Models.Iso639> newCodes = new List<Models.Iso639>();
|
List<Models.Iso639> newCodes = new();
|
||||||
|
|
||||||
foreach(Models.Iso639 code in codes)
|
foreach(Models.Iso639 code in codes)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace Marechai.Database.Seeders
|
|||||||
public static void Seed(MarechaiContext context)
|
public static void Seed(MarechaiContext context)
|
||||||
{
|
{
|
||||||
List<Models.License> existingLicenses = context.Licenses.ToList();
|
List<Models.License> existingLicenses = context.Licenses.ToList();
|
||||||
List<Models.License> newLicenses = new List<Models.License>();
|
List<Models.License> newLicenses = new();
|
||||||
int updatedLicencesCount = 0;
|
int updatedLicencesCount = 0;
|
||||||
|
|
||||||
foreach(Models.License license in new[]
|
foreach(Models.License license in new[]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<CascadingAuthenticationState>
|
<CascadingAuthenticationState>
|
||||||
<Router AppAssembly="@typeof(Program).Assembly">
|
<Router AppAssembly="@typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
<AuthorizeRouteView DefaultLayout="@typeof(MainLayout)" RouteData="@routeData" />
|
||||||
</Found>
|
</Found>
|
||||||
<NotFound>
|
<NotFound>
|
||||||
<LayoutView Layout="@typeof(MainLayout)">
|
<LayoutView Layout="@typeof(MainLayout)">
|
||||||
|
|||||||
@@ -4,4 +4,4 @@
|
|||||||
ViewData["Title"] = "Confirm email change";
|
ViewData["Title"] = "Confirm email change";
|
||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
<partial name="_StatusMessage" model="Model.StatusMessage" />
|
<partial model="Model.StatusMessage" name="_StatusMessage" />
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
public async Task<IActionResult> OnPost()
|
public async Task<IActionResult> OnPost()
|
||||||
{
|
{
|
||||||
if (SignInManager.IsSignedIn(User))
|
if(SignInManager.IsSignedIn(User))
|
||||||
{
|
{
|
||||||
await SignInManager.SignOutAsync();
|
await SignInManager.SignOutAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<h4>Use another service to log in.</h4>
|
<h4>Use another service to log in.</h4>
|
||||||
<hr />
|
<hr />
|
||||||
@{
|
@{
|
||||||
if ((Model.ExternalLogins?.Count ?? 0) == 0)
|
if((Model.ExternalLogins?.Count ?? 0) == 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
@@ -64,17 +64,17 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="form-horizontal">
|
<form asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" class="form-horizontal" id="external-account" method="post">
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
@foreach (var provider in Model.ExternalLogins)
|
@foreach(var provider in Model.ExternalLogins)
|
||||||
{
|
{
|
||||||
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
|
<button class="btn btn-primary" name="provider" title="Log in using your @provider.DisplayName account" type="submit" value="@provider.Name">@provider.DisplayName</button>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<p>Your login is protected with an authenticator app. Enter your authenticator code below.</p>
|
<p>Your login is protected with an authenticator app. Enter your authenticator code below.</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form method="post" asp-route-returnUrl="@Model.ReturnUrl">
|
<form asp-route-returnUrl="@Model.ReturnUrl" method="post">
|
||||||
<input asp-for="RememberMe" type="hidden" />
|
<input asp-for="RememberMe" type="hidden" />
|
||||||
<div asp-validation-summary="All" class="text-danger"></div>
|
<div asp-validation-summary="All" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Input.TwoFactorCode"></label>
|
<label asp-for="Input.TwoFactorCode"></label>
|
||||||
<input asp-for="Input.TwoFactorCode" class="form-control" autocomplete="off" />
|
<input asp-for="Input.TwoFactorCode" autocomplete="off" class="form-control" />
|
||||||
<span asp-validation-for="Input.TwoFactorCode" class="text-danger"></span>
|
<span asp-validation-for="Input.TwoFactorCode" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
Don't have access to your authenticator device? You can
|
Don't have access to your authenticator device? You can
|
||||||
<a id="recovery-code-login" asp-page="./LoginWithRecoveryCode" asp-route-returnUrl="@Model.ReturnUrl">log in with a recovery code</a>.
|
<a asp-page="./LoginWithRecoveryCode" asp-route-returnUrl="@Model.ReturnUrl" id="recovery-code-login">log in with a recovery code</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<div asp-validation-summary="All" class="text-danger"></div>
|
<div asp-validation-summary="All" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Input.RecoveryCode"></label>
|
<label asp-for="Input.RecoveryCode"></label>
|
||||||
<input asp-for="Input.RecoveryCode" class="form-control" autocomplete="off" />
|
<input asp-for="Input.RecoveryCode" autocomplete="off" class="form-control" />
|
||||||
<span asp-validation-for="Input.RecoveryCode" class="text-danger"></span>
|
<span asp-validation-for="Input.RecoveryCode" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary" type="submit">Log in</button>
|
<button class="btn btn-primary" type="submit">Log in</button>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
ViewData["ActivePage"] = ManageNavPages.ChangePassword;
|
ViewData["ActivePage"] = ManageNavPages.ChangePassword;
|
||||||
}
|
}
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form id="change-password-form" method="post">
|
<form id="change-password-form" method="post">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<form class="form-group" id="delete-user" method="post">
|
<form class="form-group" id="delete-user" method="post">
|
||||||
<div asp-validation-summary="All" class="text-danger"></div>
|
<div asp-validation-summary="All" class="text-danger"></div>
|
||||||
@if (Model.RequirePassword)
|
@if(Model.RequirePassword)
|
||||||
{
|
{
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Input.Password"></label>
|
<label asp-for="Input.Password"></label>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ViewData["Title"] = "Disable two-factor authentication (2FA)";
|
ViewData["Title"] = "Disable two-factor authentication (2FA)";
|
||||||
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h2>@ViewData["Title"]</h2>
|
<h2>@ViewData["Title"]</h2>
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace Marechai.Areas.Identity.Pages.Account.Manage
|
|||||||
_userManager.GetUserId(User));
|
_userManager.GetUserId(User));
|
||||||
|
|
||||||
// Only include personal data for download
|
// Only include personal data for download
|
||||||
Dictionary<string, string> personalData = new Dictionary<string, string>();
|
Dictionary<string, string> personalData = new();
|
||||||
|
|
||||||
IEnumerable<PropertyInfo> personalDataProps = typeof(ApplicationUser).GetProperties().
|
IEnumerable<PropertyInfo> personalDataProps = typeof(ApplicationUser).GetProperties().
|
||||||
Where(prop => Attribute.IsDefined(prop, typeof(PersonalDataAttribute)));
|
Where(prop => Attribute.IsDefined(prop, typeof(PersonalDataAttribute)));
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
ViewData["ActivePage"] = ManageNavPages.Email;
|
ViewData["ActivePage"] = ManageNavPages.Email;
|
||||||
}
|
}
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<partial name="_StatusMessage" model="Model.StatusMessage" />
|
<partial model="Model.StatusMessage" name="_StatusMessage" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form id="email-form" method="post">
|
<form id="email-form" method="post">
|
||||||
<div asp-validation-summary="All" class="text-danger"></div>
|
<div asp-validation-summary="All" class="text-danger"></div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Email"></label>
|
<label asp-for="Email"></label>
|
||||||
@if (Model.IsEmailConfirmed)
|
@if(Model.IsEmailConfirmed)
|
||||||
{
|
{
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input asp-for="Email" class="form-control" disabled />
|
<input asp-for="Email" class="form-control" disabled />
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
{
|
{
|
||||||
<input asp-for="Email" class="form-control" disabled />
|
<input asp-for="Email" class="form-control" disabled />
|
||||||
<button asp-page-handler="SendVerificationEmail" class="btn btn-link" id="email-verification" type="submit">Send verification email</button>
|
<button asp-page-handler="SendVerificationEmail" class="btn btn-link" id="email-verification" type="submit">Send verification email</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Input.NewEmail"></label>
|
<label asp-for="Input.NewEmail"></label>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ViewData["Title"] = "Configure authenticator app";
|
ViewData["Title"] = "Configure authenticator app";
|
||||||
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<div>
|
<div>
|
||||||
<p>To use an authenticator app go through the following steps:</p>
|
<p>To use an authenticator app go through the following steps:</p>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<a href="https://go.microsoft.com/fwlink/?Linkid=852423">enable QR code generation</a>.
|
<a href="https://go.microsoft.com/fwlink/?Linkid=852423">enable QR code generation</a>.
|
||||||
</div>
|
</div>
|
||||||
<div id="qrCode"></div>
|
<div id="qrCode"></div>
|
||||||
<div id="qrCodeData" data-url="@Html.Raw(Model.AuthenticatorUri)"></div>
|
<div data-url="@Html.Raw(Model.AuthenticatorUri)" id="qrCodeData"></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<form id="send-code" method="post">
|
<form id="send-code" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Input.Code" class="control-label">Verification Code</label>
|
<label asp-for="Input.Code" class="control-label">Verification Code</label>
|
||||||
<input asp-for="Input.Code" class="form-control" autocomplete="off" />
|
<input asp-for="Input.Code" autocomplete="off" class="form-control" />
|
||||||
<span asp-validation-for="Input.Code" class="text-danger"></span>
|
<span asp-validation-for="Input.Code" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary" type="submit">Verify</button>
|
<button class="btn btn-primary" type="submit">Verify</button>
|
||||||
|
|||||||
@@ -4,27 +4,27 @@
|
|||||||
ViewData["Title"] = "Manage your external logins";
|
ViewData["Title"] = "Manage your external logins";
|
||||||
ViewData["ActivePage"] = ManageNavPages.ExternalLogins;
|
ViewData["ActivePage"] = ManageNavPages.ExternalLogins;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
@if (Model.CurrentLogins?.Count > 0)
|
@if(Model.CurrentLogins?.Count > 0)
|
||||||
{
|
{
|
||||||
<h4>Registered Logins</h4>
|
<h4>Registered Logins</h4>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var login in Model.CurrentLogins)
|
@foreach(var login in Model.CurrentLogins)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td id="@($"login-provider-{login.LoginProvider}")">@login.ProviderDisplayName</td>
|
<td id="@($"login-provider-{login.LoginProvider}")">@login.ProviderDisplayName</td>
|
||||||
<td>
|
<td>
|
||||||
@if (Model.ShowRemoveButton)
|
@if(Model.ShowRemoveButton)
|
||||||
{
|
{
|
||||||
<form id="@($"remove-login-{login.LoginProvider}")" asp-page-handler="RemoveLogin" method="post">
|
<form asp-page-handler="RemoveLogin" id="@($"remove-login-{login.LoginProvider}")" method="post">
|
||||||
<div>
|
<div>
|
||||||
<input asp-for="@login.LoginProvider" name="LoginProvider" type="hidden" />
|
<input asp-for="@login.LoginProvider" name="LoginProvider" type="hidden" />
|
||||||
<input asp-for="@login.ProviderKey" name="ProviderKey" type="hidden" />
|
<input asp-for="@login.ProviderKey" name="ProviderKey" type="hidden" />
|
||||||
<button type="submit" class="btn btn-primary" title="Remove this @login.ProviderDisplayName login from your account">Remove</button>
|
<button class="btn btn-primary" title="Remove this @login.ProviderDisplayName login from your account" type="submit">Remove</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@:
|
@:
|
||||||
@@ -35,18 +35,17 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
}
|
}
|
||||||
@if (Model.OtherLogins?.Count > 0)
|
@if(Model.OtherLogins?.Count > 0)
|
||||||
{
|
{
|
||||||
<h4>Add another service to log in.</h4>
|
<h4>Add another service to log in.</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<form asp-page-handler="LinkLogin" class="form-horizontal" id="link-login-form" method="post">
|
<form asp-page-handler="LinkLogin" class="form-horizontal" id="link-login-form" method="post">
|
||||||
<div id="socialLoginList">
|
<div id="socialLoginList">
|
||||||
<p>
|
<p>
|
||||||
@foreach (var provider in Model.OtherLogins)
|
@foreach(var provider in Model.OtherLogins)
|
||||||
{
|
{
|
||||||
<button id="@($"link-login-button-{provider.Name}")" type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
|
<button class="btn btn-primary" id="@($"link-login-button-{provider.Name}")" name="provider" title="Log in using your @provider.DisplayName account" type="submit" value="@provider.Name">@provider.DisplayName</button>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>}
|
||||||
}
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
ViewData["Title"] = "Generate two-factor authentication (2FA) recovery codes";
|
ViewData["Title"] = "Generate two-factor authentication (2FA) recovery codes";
|
||||||
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
ViewData["ActivePage"] = ManageNavPages.Index;
|
ViewData["ActivePage"] = ManageNavPages.Index;
|
||||||
}
|
}
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<partial name="_StatusMessage" model="Model.StatusMessage" />
|
<partial model="Model.StatusMessage" name="_StatusMessage" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<form id="profile-form" method="post">
|
<form id="profile-form" method="post">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ViewData["Title"] = "Reset authenticator key";
|
ViewData["Title"] = "Reset authenticator key";
|
||||||
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
ViewData["ActivePage"] = ManageNavPages.ChangePassword;
|
ViewData["ActivePage"] = ManageNavPages.ChangePassword;
|
||||||
}
|
}
|
||||||
<h4>Set your password</h4>
|
<h4>Set your password</h4>
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<p class="text-info">
|
<p class="text-info">
|
||||||
You do not have a local username/password for this site. Add a local
|
You do not have a local username/password for this site. Add a local
|
||||||
account so you can log in without an external login.
|
account so you can log in without an external login.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
ViewData["Title"] = "Recovery codes";
|
ViewData["Title"] = "Recovery codes";
|
||||||
ViewData["ActivePage"] = "TwoFactorAuthentication";
|
ViewData["ActivePage"] = "TwoFactorAuthentication";
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
<div class="alert alert-warning" role="alert">
|
<div class="alert alert-warning" role="alert">
|
||||||
<p>
|
<p>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@for (var row = 0; row < Model.RecoveryCodes.Length; row += 2)
|
@for(var row = 0; row < Model.RecoveryCodes.Length; row += 2)
|
||||||
{
|
{
|
||||||
<code class="recovery-code">@Model.RecoveryCodes[row]</code>
|
<code class="recovery-code">@Model.RecoveryCodes[row]</code>
|
||||||
<text> </text>
|
<text> </text>
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
ViewData["Title"] = "Two-factor authentication (2FA)";
|
ViewData["Title"] = "Two-factor authentication (2FA)";
|
||||||
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication;
|
||||||
}
|
}
|
||||||
<partial name="_StatusMessage" for="StatusMessage" />
|
<partial for="StatusMessage" name="_StatusMessage" />
|
||||||
<h4>@ViewData["Title"]</h4>
|
<h4>@ViewData["Title"]</h4>
|
||||||
@if (Model.Is2faEnabled)
|
@if(Model.Is2faEnabled)
|
||||||
{
|
{
|
||||||
if (Model.RecoveryCodesLeft == 0)
|
if(Model.RecoveryCodesLeft == 0)
|
||||||
{
|
{
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<strong>You have no recovery codes left.</strong>
|
<strong>You have no recovery codes left.</strong>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else if (Model.RecoveryCodesLeft == 1)
|
else if(Model.RecoveryCodesLeft == 1)
|
||||||
{
|
{
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<strong>You have 1 recovery code left.</strong>
|
<strong>You have 1 recovery code left.</strong>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
else if (Model.RecoveryCodesLeft <= 3)
|
else if(Model.RecoveryCodesLeft <= 3)
|
||||||
{
|
{
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<strong>You have @Model.RecoveryCodesLeft recovery codes left.</strong>
|
<strong>You have @Model.RecoveryCodesLeft recovery codes left.</strong>
|
||||||
@@ -39,25 +39,22 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Model.IsMachineRemembered)
|
if(Model.IsMachineRemembered)
|
||||||
{
|
{
|
||||||
<form method="post" style="display: inline-block">
|
<form method="post" style="display: inline-block">
|
||||||
<button class="btn btn-default" type="submit">Forget this browser</button>
|
<button class="btn btn-default" type="submit">Forget this browser</button>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
<a asp-page="./Disable2fa" class="btn btn-default">Disable 2FA</a>
|
<a asp-page="./Disable2fa" class="btn btn-default">Disable 2FA</a>
|
||||||
<a asp-page="./GenerateRecoveryCodes" class="btn btn-default">Reset recovery codes</a>
|
<a asp-page="./GenerateRecoveryCodes" class="btn btn-default">Reset recovery codes</a>}
|
||||||
}
|
|
||||||
<h5>Authenticator app</h5>
|
<h5>Authenticator app</h5>
|
||||||
@if (!Model.HasAuthenticator)
|
@if(!Model.HasAuthenticator)
|
||||||
{
|
{
|
||||||
<a asp-page="./EnableAuthenticator" class="btn btn-default" id="enable-authenticator">Add authenticator app</a>
|
<a asp-page="./EnableAuthenticator" class="btn btn-default" id="enable-authenticator">Add authenticator app</a>}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<a asp-page="./EnableAuthenticator" class="btn btn-default" id="enable-authenticator">Setup authenticator app</a>
|
<a asp-page="./EnableAuthenticator" class="btn btn-default" id="enable-authenticator">Setup authenticator app</a>
|
||||||
<a asp-page="./ResetAuthenticator" class="btn btn-default" id="reset-authenticator">Reset authenticator app</a>
|
<a asp-page="./ResetAuthenticator" class="btn btn-default" id="reset-authenticator">Reset authenticator app</a>}
|
||||||
}
|
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
<partial name="_ValidationScriptsPartial" />
|
<partial name="_ValidationScriptsPartial" />
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
if (ViewData.TryGetValue("ParentLayout", out var parentLayout))
|
if(ViewData.TryGetValue("ParentLayout", out var parentLayout))
|
||||||
{
|
{
|
||||||
Layout = (string)parentLayout;
|
Layout = (string)parentLayout;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,24 +5,24 @@
|
|||||||
}
|
}
|
||||||
<ul class="flex-column nav nav-pills">
|
<ul class="flex-column nav nav-pills">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link @ManageNavPages.IndexNavClass(ViewContext)" id="profile" asp-page="./Index">Profile</a>
|
<a asp-page="./Index" class="nav-link @ManageNavPages.IndexNavClass(ViewContext)" id="profile">Profile</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link @ManageNavPages.EmailNavClass(ViewContext)" id="email" asp-page="./Email">Email</a>
|
<a asp-page="./Email" class="nav-link @ManageNavPages.EmailNavClass(ViewContext)" id="email">Email</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link @ManageNavPages.ChangePasswordNavClass(ViewContext)" id="change-password" asp-page="./ChangePassword">Password</a>
|
<a asp-page="./ChangePassword" class="nav-link @ManageNavPages.ChangePasswordNavClass(ViewContext)" id="change-password">Password</a>
|
||||||
</li>
|
</li>
|
||||||
@if (hasExternalLogins)
|
@if(hasExternalLogins)
|
||||||
{
|
{
|
||||||
<li class="nav-item" id="external-logins">
|
<li class="nav-item" id="external-logins">
|
||||||
<a id="external-login" class="nav-link @ManageNavPages.ExternalLoginsNavClass(ViewContext)" asp-page="./ExternalLogins">External logins</a>
|
<a asp-page="./ExternalLogins" class="nav-link @ManageNavPages.ExternalLoginsNavClass(ViewContext)" id="external-login">External logins</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)" id="two-factor" asp-page="./TwoFactorAuthentication">Two-factor authentication</a>
|
<a asp-page="./TwoFactorAuthentication" class="nav-link @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)" id="two-factor">Two-factor authentication</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link @ManageNavPages.PersonalDataNavClass(ViewContext)" id="personal-data" asp-page="./PersonalData">Personal data</a>
|
<a asp-page="./PersonalData" class="nav-link @ManageNavPages.PersonalDataNavClass(ViewContext)" id="personal-data">Personal data</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@model string
|
@model string
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(Model))
|
@if(!string.IsNullOrEmpty(Model))
|
||||||
{
|
{
|
||||||
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
|
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
|
||||||
<div class="alert alert-@statusMessageClass alert-dismissible" role="alert">
|
<div class="alert alert-@statusMessageClass alert-dismissible" role="alert">
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<h4>Use another service to register.</h4>
|
<h4>Use another service to register.</h4>
|
||||||
<hr />
|
<hr />
|
||||||
@{
|
@{
|
||||||
if ((Model.ExternalLogins?.Count ?? 0) == 0)
|
if((Model.ExternalLogins?.Count ?? 0) == 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
@@ -45,17 +45,17 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<form id="external-account" asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" method="post" class="form-horizontal">
|
<form asp-page="./ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" class="form-horizontal" id="external-account" method="post">
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
@foreach (var provider in Model.ExternalLogins)
|
@foreach(var provider in Model.ExternalLogins)
|
||||||
{
|
{
|
||||||
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name" title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
|
<button class="btn btn-primary" name="provider" title="Log in using your @provider.DisplayName account" type="submit" value="@provider.Name">@provider.DisplayName</button>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
@{
|
@{
|
||||||
if (Model.DisplayConfirmAccountLink)
|
if(Model.DisplayConfirmAccountLink)
|
||||||
{
|
{
|
||||||
<p>
|
<p>
|
||||||
This app does not currently have a real email sender registered, see
|
This app does not currently have a real email sender registered, see
|
||||||
<a href="https://aka.ms/aspaccountconf">these docs</a> for how to configure a real email sender.
|
<a href="https://aka.ms/aspaccountconf">these docs</a> for how to configure a real email sender.
|
||||||
Normally this would be emailed:
|
Normally this would be emailed:
|
||||||
<a id="confirm-link" href="@Model.EmailConfirmationUrl">Click here to confirm your account</a>
|
<a href="@Model.EmailConfirmationUrl" id="confirm-link">Click here to confirm your account</a>
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@model string
|
@model string
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(Model))
|
@if(!string.IsNullOrEmpty(Model))
|
||||||
{
|
{
|
||||||
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
|
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
|
||||||
<div class="alert alert-@statusMessageClass alert-dismissible" role="alert">
|
<div class="alert alert-@statusMessageClass alert-dismissible" role="alert">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
}
|
}
|
||||||
<h1 class="text-danger">Error.</h1>
|
<h1 class="text-danger">Error.</h1>
|
||||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||||
@if (Model.ShowRequestId)
|
@if(Model.ShowRequestId)
|
||||||
{
|
{
|
||||||
<p>
|
<p>
|
||||||
<strong>Request ID:</strong>
|
<strong>Request ID:</strong>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@inject UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
@if (SignInManager.IsSignedIn(User))
|
@if(SignInManager.IsSignedIn(User))
|
||||||
{
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a asp-area="Identity" asp-page="/Account/Manage/Index" class="nav-link text-dark" title="Manage">Hello @User.Identity.Name!</a>
|
<a asp-area="Identity" asp-page="/Account/Manage/Index" class="nav-link text-dark" title="Manage">Hello @User.Identity.Name!</a>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Marechai.Helpers
|
|||||||
|
|
||||||
public static void EnsureCreated(string webRootPath, bool scan, string item)
|
public static void EnsureCreated(string webRootPath, bool scan, string item)
|
||||||
{
|
{
|
||||||
List<string> paths = new List<string>();
|
List<string> paths = new();
|
||||||
|
|
||||||
string photosRoot = Path.Combine(webRootPath, "assets", scan ? "scan" : "photos");
|
string photosRoot = Path.Combine(webRootPath, "assets", scan ? "scan" : "photos");
|
||||||
string itemPhotosRoot = Path.Combine(photosRoot, item);
|
string itemPhotosRoot = Path.Combine(photosRoot, item);
|
||||||
@@ -271,87 +271,82 @@ namespace Marechai.Helpers
|
|||||||
public void ConversionWorker(string webRootPath, Guid id, string originalFilePath, string sourceFormat,
|
public void ConversionWorker(string webRootPath, Guid id, string originalFilePath, string sourceFormat,
|
||||||
bool scan, string item)
|
bool scan, string item)
|
||||||
{
|
{
|
||||||
List<Task> pool = new List<Task>
|
List<Task> pool = new()
|
||||||
{
|
{
|
||||||
new Task(() => FinishedRenderingJpeg4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJpeg4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JPEG", "4k", true,
|
sourceFormat, "JPEG", "4k", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJpeg1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJpeg1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JPEG", "1440p", true,
|
sourceFormat, "JPEG", "1440p", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJpegHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJpegHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JPEG", "hd", true,
|
sourceFormat, "JPEG", "hd", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJpeg4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
new(() => FinishedRenderingJpeg4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
"JPEG", "4k", false, scan, item))),
|
"JPEG", "4k", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingJpeg1440?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJpeg1440?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
sourceFormat, "JPEG", "1440p", false, scan,
|
"JPEG", "1440p", false, scan, item))),
|
||||||
item))),
|
new(() => FinishedRenderingJpegHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
new Task(() => FinishedRenderingJpegHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
|
||||||
"JPEG", "hd", false, scan, item))),
|
"JPEG", "hd", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingJp2k4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJp2k4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JP2K", "4k", true,
|
sourceFormat, "JP2K", "4k", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJp2k1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJp2k1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JP2K", "1440p", true,
|
sourceFormat, "JP2K", "1440p", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJp2kHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJp2kHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "JP2K", "hd", true,
|
sourceFormat, "JP2K", "hd", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingJp2k4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
new(() => FinishedRenderingJp2k4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
"JP2K", "4k", false, scan, item))),
|
"JP2K", "4k", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingJp2k1440?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingJp2k1440?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
sourceFormat, "JP2K", "1440p", false, scan,
|
"JP2K", "1440p", false, scan, item))),
|
||||||
item))),
|
new(() => FinishedRenderingJp2kHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
new Task(() => FinishedRenderingJp2kHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
|
||||||
"JP2K", "hd", false, scan, item))),
|
"JP2K", "hd", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingWebp4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingWebp4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "WEBP", "4k", true,
|
sourceFormat, "WEBP", "4k", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingWebp1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingWebp1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "WEBP", "1440p", true,
|
sourceFormat, "WEBP", "1440p", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingWebpHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingWebpHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "WEBP", "hd", true,
|
sourceFormat, "WEBP", "hd", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingWebp4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
new(() => FinishedRenderingWebp4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
"WEBP", "4k", false, scan, item))),
|
"WEBP", "4k", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingWebp1440?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingWebp1440?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
sourceFormat, "WEBP", "1440p", false, scan,
|
"WEBP", "1440p", false, scan, item))),
|
||||||
item))),
|
new(() => FinishedRenderingWebpHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
new Task(() => FinishedRenderingWebpHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
|
||||||
"WEBP", "hd", false, scan, item))),
|
"WEBP", "hd", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingHeif4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingHeif4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "HEIF", "4k", true,
|
sourceFormat, "HEIF", "4k", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingHeif1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingHeif1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "HEIF", "1440p", true,
|
sourceFormat, "HEIF", "1440p", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingHeifHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingHeifHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "HEIF", "hd", true,
|
sourceFormat, "HEIF", "hd", true, scan,
|
||||||
scan, item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingHeif4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
new(() => FinishedRenderingHeif4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
"HEIF", "4k", false, scan, item))),
|
"HEIF", "4k", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingHeif1440?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingHeif1440?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
sourceFormat, "HEIF", "1440p", false, scan,
|
"HEIF", "1440p", false, scan, item))),
|
||||||
item))),
|
new(() => FinishedRenderingHeifHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
new Task(() => FinishedRenderingHeifHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
|
||||||
"HEIF", "hd", false, scan, item))),
|
"HEIF", "hd", false, scan, item))),
|
||||||
new Task(() => FinishedRenderingAvif4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
new(() => FinishedRenderingAvif4kThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
sourceFormat, "AVIF", "4k", true,
|
sourceFormat, "AVIF", "4k", true, scan,
|
||||||
scan, item))),
|
|
||||||
new Task(() => FinishedRenderingAvif1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
|
||||||
sourceFormat, "AVIF", "1440p", true,
|
|
||||||
scan, item))),
|
|
||||||
new Task(() => FinishedRenderingAvifHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
|
||||||
sourceFormat, "AVIF", "hd", true,
|
|
||||||
scan, item))),
|
|
||||||
new Task(() => FinishedRenderingAvif4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
|
||||||
"AVIF", "4k", false, scan, item))),
|
|
||||||
new Task(() => FinishedRenderingAvif1440?.Invoke(Convert(webRootPath, id, originalFilePath,
|
|
||||||
sourceFormat, "AVIF", "1440p", false, scan,
|
|
||||||
item))),
|
item))),
|
||||||
new Task(() => FinishedRenderingAvifHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
new(() => FinishedRenderingAvif1440Thumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
|
sourceFormat, "AVIF", "1440p", true, scan,
|
||||||
|
item))),
|
||||||
|
new(() => FinishedRenderingAvifHdThumbnail?.Invoke(Convert(webRootPath, id, originalFilePath,
|
||||||
|
sourceFormat, "AVIF", "hd", true, scan,
|
||||||
|
item))),
|
||||||
|
new(() => FinishedRenderingAvif4k?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
|
"AVIF", "4k", false, scan, item))),
|
||||||
|
new(() => FinishedRenderingAvif1440?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
|
"AVIF", "1440p", false, scan, item))),
|
||||||
|
new(() => FinishedRenderingAvifHd?.Invoke(Convert(webRootPath, id, originalFilePath, sourceFormat,
|
||||||
"AVIF", "hd", false, scan, item)))
|
"AVIF", "hd", false, scan, item)))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<BooksService>
|
@inherits OwningComponentBase<BooksService>
|
||||||
@inject IStringLocalizer<BooksService> L
|
@inject IStringLocalizer<BooksService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Books"]</h3>
|
<h3>@L["Books"]</h3>
|
||||||
@if (_books is null)
|
@if(_books is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _books)
|
@foreach(var item in _books)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/books/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/books/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/books/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/books/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete book"]</ModalTitle>
|
<ModalTitle>@L["Delete book"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the book {0}?"], _currentBook?.Title)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the book {0}?"], _currentBook?.Title)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
@inject IStringLocalizer<BrowserTestsService> L
|
@inject IStringLocalizer<BrowserTestsService> L
|
||||||
@attribute [Authorize(Roles = "UberAdmin")]
|
@attribute [Authorize(Roles = "UberAdmin")]
|
||||||
<h3>@L["Browser tests"]</h3>
|
<h3>@L["Browser tests"]</h3>
|
||||||
@if (_tests is null)
|
@if(_tests is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _tests)
|
@foreach(var item in _tests)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<CompaniesService>
|
@inherits OwningComponentBase<CompaniesService>
|
||||||
@inject IStringLocalizer<CompaniesService> L
|
@inject IStringLocalizer<CompaniesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Companies"]</h3>
|
<h3>@L["Companies"]</h3>
|
||||||
@if (_companies is null)
|
@if(_companies is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _companies)
|
@foreach(var item in _companies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -91,26 +91,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/companies/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/companies/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/companies/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/companies/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete company"]</ModalTitle>
|
<ModalTitle>@L["Delete company"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the company {0}?"], _currentCompany?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the company {0}?"], _currentCompany?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<CurrencyInflationService>
|
@inherits OwningComponentBase<CurrencyInflationService>
|
||||||
@inject IStringLocalizer<CurrencyInflationService> L
|
@inject IStringLocalizer<CurrencyInflationService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Currency inflation"]</h3>
|
<h3>@L["Currency inflation"]</h3>
|
||||||
@if (_inflations is null)
|
@if(_inflations is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _inflations)
|
@foreach(var item in _inflations)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -73,26 +73,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/currency_inflation/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/currency_inflation/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/currency_inflation/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/currency_inflation/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete currency inflation"]</ModalTitle>
|
<ModalTitle>@L["Delete currency inflation"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the inflation of {0:F} happened to currency {1} on {2}?"], _currentInflation?.Inflation, _currentInflation?.CurrencyName, _currentInflation?.Year)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the inflation of {0:F} happened to currency {1} on {2}?"], _currentInflation?.Inflation, _currentInflation?.CurrencyName, _currentInflation?.Year)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<CurrencyPeggingService>
|
@inherits OwningComponentBase<CurrencyPeggingService>
|
||||||
@inject IStringLocalizer<CurrencyPeggingService> L
|
@inject IStringLocalizer<CurrencyPeggingService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Currency pegging"]</h3>
|
<h3>@L["Currency pegging"]</h3>
|
||||||
@if (_peggings is null)
|
@if(_peggings is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _peggings)
|
@foreach(var item in _peggings)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/currency_pegging/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/currency_pegging/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/currency_pegging/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/currency_pegging/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete currency pegging"]</ModalTitle>
|
<ModalTitle>@L["Delete currency pegging"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the pegging of {0:F} happened to currency {1} with currency {2} since {3}?"], _currentPegging?.Ratio, _currentPegging?.SourceName, _currentPegging?.DestinationName, _currentPegging?.Start.ToLongDateString())</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the pegging of {0:F} happened to currency {1} with currency {2} since {3}?"], _currentPegging?.Ratio, _currentPegging?.SourceName, _currentPegging?.DestinationName, _currentPegging?.Start.ToLongDateString())</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -309,7 +309,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
newIsbn[1] = '7';
|
newIsbn[1] = '7';
|
||||||
newIsbn[2] = '8';
|
newIsbn[2] = '8';
|
||||||
|
|
||||||
int sum = (newIsbn[0] - 0x30) + ((newIsbn[1] - 0x30) * 3) + (newIsbn[2] - 0x30) +
|
int sum = newIsbn[0] - 0x30 + ((newIsbn[1] - 0x30) * 3) + (newIsbn[2] - 0x30) +
|
||||||
((newIsbn[3] - 0x30) * 3) + (newIsbn[4] - 0x30) + ((newIsbn[5] - 0x30) * 3) +
|
((newIsbn[3] - 0x30) * 3) + (newIsbn[4] - 0x30) + ((newIsbn[5] - 0x30) * 3) +
|
||||||
(newIsbn[6] - 0x30) + ((newIsbn[7] - 0x30) * 3) + (newIsbn[8] - 0x30) +
|
(newIsbn[6] - 0x30) + ((newIsbn[7] - 0x30) * 3) + (newIsbn[8] - 0x30) +
|
||||||
((newIsbn[9] - 0x30) * 3) + (newIsbn[10] - 0x30) + ((newIsbn[11] - 0x30) * 3);
|
((newIsbn[9] - 0x30) * 3) + (newIsbn[10] - 0x30) + ((newIsbn[11] - 0x30) * 3);
|
||||||
@@ -869,7 +869,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
{
|
{
|
||||||
await outFs.WriteAsync(buffer, 0, count);
|
await outFs.WriteAsync(buffer, 0, count);
|
||||||
|
|
||||||
double progress = ((double)fs.Position * 100) / fs.Length;
|
double progress = (double)fs.Position * 100 / fs.Length;
|
||||||
|
|
||||||
if(!(progress > lastProgress + 0.01))
|
if(!(progress > lastProgress + 0.01))
|
||||||
continue;
|
continue;
|
||||||
@@ -1465,4 +1465,6 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BookImpl : Book {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
@page "/admin/companies/details/{Id:int}"
|
@page "/admin/companies/details/{Id:int}"
|
||||||
@page "/admin/companies/edit/{Id:int}"
|
@page "/admin/companies/edit/{Id:int}"
|
||||||
@page "/admin/companies/create"
|
@page "/admin/companies/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
|
@using Marechai.Database
|
||||||
@inherits OwningComponentBase<CompaniesService>
|
@inherits OwningComponentBase<CompaniesService>
|
||||||
@inject IStringLocalizer<CompaniesService> L
|
@inject IStringLocalizer<CompaniesService> L
|
||||||
@inject Iso31661NumericService CountriesService
|
@inject Iso31661NumericService CountriesService
|
||||||
@@ -38,317 +38,272 @@
|
|||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IFileReaderService FileReaderService;
|
@inject IFileReaderService FileReaderService;
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Company details"]</h3>
|
<h3>@L["Company details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Common name (as usually displayed publicly)"]</FieldLabel>
|
<FieldLabel>@L["Common name (as usually displayed publicly)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.LegalName != null)
|
@if(_editing || _model.LegalName != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Legal name (as shown in governmental registries including \"Inc.\", \"Corp.\", \"gmbH\", etc...)"]</FieldLabel>
|
<FieldLabel>@L["Legal name (as shown in governmental registries including \"Inc.\", \"Corp.\", \"gmbH\", etc...)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownLegalName">@L["Unknown (legal name)"]</Check>
|
<Check @bind-Checked="@_unknownLegalName" @TValue="bool">@L["Unknown (legal name)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownLegalName)
|
!_unknownLegalName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLegalName">
|
<Validation Validator="@ValidateLegalName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.LegalName">
|
<TextEdit @bind-Text="@_model.LegalName" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid legal name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid legal name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
<Field>
|
||||||
}
|
|
||||||
<Field>
|
|
||||||
<FieldLabel>@L["Status"]</FieldLabel>
|
<FieldLabel>@L["Status"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="int" @bind-SelectedValue="@Status">
|
<Select @bind-SelectedValue="@Status" Disabled="!_editing" @TValue="int">
|
||||||
@foreach (int status in Enum.GetValues(typeof(CompanyStatus)))
|
@foreach(int status in Enum.GetValues(typeof(CompanyStatus)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@status">@(((CompanyStatus)status).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@status">@(((CompanyStatus)status).ToString())</SelectItem> }
|
||||||
}
|
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Founded != null)
|
@if(_editing || _model.Founded != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Founded"]</FieldLabel>
|
<FieldLabel>@L["Founded"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFounded">@L["Unknown (foundation date)"]</Check>
|
<Check @bind-Checked="@_unknownFounded" @TValue="bool">@L["Unknown (foundation date)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing || !_unknownFounded)
|
!_unknownFounded)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_model.FoundedMonthIsUnknown" Disabled="!_editing">@L["Unknown foundation month"]</Check>
|
<Check @bind-Checked="@_model.FoundedMonthIsUnknown" Disabled="!_editing" @TValue="bool">@L["Unknown foundation month"]</Check>
|
||||||
<Check TValue="bool" @bind-Checked="@_model.FoundedDayIsUnknown" Disabled="_model.FoundedMonthIsUnknown || !_editing">@L["Unknown foundation day"]</Check>
|
<Check @bind-Checked="@_model.FoundedDayIsUnknown" Disabled="_model.FoundedMonthIsUnknown || !_editing" @TValue="bool">@L["Unknown foundation day"]</Check>
|
||||||
@L["If the foundation day or month are selected as unknown, pick anyone in the field below, it will be ignored."]
|
@L["If the foundation day or month are selected as unknown, pick anyone in the field below, it will be ignored."]
|
||||||
<Validation Validator="@ValidateFounded">
|
<Validation Validator="@ValidateFounded">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.Founded" >
|
<DateEdit @bind-Date="@_model.Founded" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid foundation date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid foundation date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.Website != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.Website != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Website"]</FieldLabel>
|
<FieldLabel>@L["Website"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownWebsite">@L["Unknown (website)"]</Check>
|
<Check @bind-Checked="@_unknownWebsite" @TValue="bool">@L["Unknown (website)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownWebsite)
|
!_unknownWebsite)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateWebsite">
|
<Validation Validator="@ValidateWebsite">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Website">
|
<TextEdit @bind-Text="@_model.Website" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid website."]</ValidationError>
|
<ValidationError>@L["Please enter a valid website."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.Twitter != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.Twitter != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Twitter"]</FieldLabel>
|
<FieldLabel>@L["Twitter"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownTwitter">@L["Unknown (twitter)"]</Check>
|
<Check @bind-Checked="@_unknownTwitter" @TValue="bool">@L["Unknown (twitter)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownTwitter)
|
!_unknownTwitter)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateTwitter">
|
<Validation Validator="@ValidateTwitter">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Twitter">
|
<TextEdit @bind-Text="@_model.Twitter" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid Twitter handle."]</ValidationError>
|
<ValidationError>@L["Please enter a valid Twitter handle."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.Facebook != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.Facebook != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Facebook"]</FieldLabel>
|
<FieldLabel>@L["Facebook"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFacebook">@L["Unknown (facebook)"]</Check>
|
<Check @bind-Checked="@_unknownFacebook" @TValue="bool">@L["Unknown (facebook)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownFacebook)
|
!_unknownFacebook)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFacebook">
|
<Validation Validator="@ValidateFacebook">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Facebook">
|
<TextEdit @bind-Text="@_model.Facebook" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid Facebook user name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid Facebook user name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.Address != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.Address != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Address"]</FieldLabel>
|
<FieldLabel>@L["Address"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownAddress">@L["Unknown (address)"]</Check>
|
<Check @bind-Checked="@_unknownAddress" @TValue="bool">@L["Unknown (address)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownAddress)
|
!_unknownAddress)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateAddress">
|
<Validation Validator="@ValidateAddress">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Address">
|
<TextEdit @bind-Text="@_model.Address" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid address."]</ValidationError>
|
<ValidationError>@L["Please enter a valid address."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.City != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.City != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["City"]</FieldLabel>
|
<FieldLabel>@L["City"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCity">@L["Unknown (city)"]</Check>
|
<Check @bind-Checked="@_unknownCity" @TValue="bool">@L["Unknown (city)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownCity)
|
!_unknownCity)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateCity">
|
<Validation Validator="@ValidateCity">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.City">
|
<TextEdit @bind-Text="@_model.City" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid city."]</ValidationError>
|
<ValidationError>@L["Please enter a valid city."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.Province != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.Province != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Province"]</FieldLabel>
|
<FieldLabel>@L["Province"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProvince">@L["Unknown (province)"]</Check>
|
<Check @bind-Checked="@_unknownProvince" @TValue="bool">@L["Unknown (province)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownProvince)
|
!_unknownProvince)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateProvince">
|
<Validation Validator="@ValidateProvince">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Province">
|
<TextEdit @bind-Text="@_model.Province" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid province."]</ValidationError>
|
<ValidationError>@L["Please enter a valid province."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.PostalCode != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.PostalCode != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Postal code"]</FieldLabel>
|
<FieldLabel>@L["Postal code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPostalCode">@L["Unknown (postal code)"]</Check>
|
<Check @bind-Checked="@_unknownPostalCode" @TValue="bool">@L["Unknown (postal code)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownPostalCode)
|
!_unknownPostalCode)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidatePostalCode">
|
<Validation Validator="@ValidatePostalCode">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.PostalCode">
|
<TextEdit @bind-Text="@_model.PostalCode" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid postal code."]</ValidationError>
|
<ValidationError>@L["Please enter a valid postal code."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field>}
|
||||||
</Field>
|
@if(_editing || _model.CountryId != null)
|
||||||
}
|
{
|
||||||
@if (_editing || _model.CountryId != null)
|
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Country"]</FieldLabel>
|
<FieldLabel>@L["Country"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCountry">@L["Unknown (country)"]</Check>
|
<Check @bind-Checked="@_unknownCountry" @TValue="bool">@L["Unknown (country)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownCountry)
|
!_unknownCountry)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="short?" @bind-SelectedValue="@_model.CountryId">
|
<Select @bind-SelectedValue="@_model.CountryId" Disabled="!_editing" @TValue="short?">
|
||||||
@foreach (var country in _countries)
|
@foreach(var country in _countries)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="short?" Value="@country.Id">@country.Name</SelectItem>
|
<SelectItem @TValue="short?" Value="@country.Id">@country.Name</SelectItem> }
|
||||||
}
|
</Select> }
|
||||||
</Select>
|
</Field>}
|
||||||
}
|
@if((int)_model.Status > 1)
|
||||||
</Field>
|
{
|
||||||
}
|
@if(_editing || _model.Sold != null)
|
||||||
@if (((int)_model.Status) > 1)
|
|
||||||
{
|
|
||||||
@if (_editing || _model.Sold != null)
|
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Sold"]</FieldLabel>
|
<FieldLabel>@L["Sold"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSold">@L["Unknown (sold/merged/bankrupt date)"]</Check>
|
<Check @bind-Checked="@_unknownSold" @TValue="bool">@L["Unknown (sold/merged/bankrupt date)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownSold)
|
!_unknownSold)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_model.SoldMonthIsUnknown" Disabled="!_editing">@L["Unknown sold/merge/bankruptcy month"]</Check>
|
<Check @bind-Checked="@_model.SoldMonthIsUnknown" Disabled="!_editing" @TValue="bool">@L["Unknown sold/merge/bankruptcy month"]</Check>
|
||||||
<Check TValue="bool" @bind-Checked="@_model.SoldDayIsUnknown" Disabled="_model.SoldMonthIsUnknown || !_editing">@L["Unknown sold/merge/bankruptcy day"]</Check>
|
<Check @bind-Checked="@_model.SoldDayIsUnknown" Disabled="_model.SoldMonthIsUnknown || !_editing" @TValue="bool">@L["Unknown sold/merge/bankruptcy day"]</Check>
|
||||||
@L["If the sold, merge or bankruptcy day or month are selected as unknown, pick anyone in the field below, it will be ignored."]
|
@L["If the sold, merge or bankruptcy day or month are selected as unknown, pick anyone in the field below, it will be ignored."]
|
||||||
<Validation Validator="@ValidateSold">
|
<Validation Validator="@ValidateSold">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.Sold">
|
<DateEdit @bind-Date="@_model.Sold" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid sold/merge/bankruptcy date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid sold/merge/bankruptcy date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field> }
|
||||||
</Field>
|
@if(_editing || _model.SoldToId != null)
|
||||||
}
|
|
||||||
@if (_editing || _model.SoldToId != null)
|
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Sold to"]</FieldLabel>
|
<FieldLabel>@L["Sold to"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSoldTo">@L["Unknown (sold to)"]</Check>
|
<Check @bind-Checked="@_unknownSoldTo" @TValue="bool">@L["Unknown (sold to)"]</Check> }
|
||||||
}
|
@if(!_editing ||
|
||||||
@if (!_editing ||
|
|
||||||
!_unknownSoldTo)
|
!_unknownSoldTo)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.SoldToId">
|
<Select @bind-SelectedValue="@_model.SoldToId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem> }
|
||||||
}
|
</Select> }
|
||||||
</Select>
|
</Field> }
|
||||||
}
|
|
||||||
</Field>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
@if (!_editing)
|
|
||||||
{
|
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
|
||||||
}
|
|
||||||
<a href="/admin/companies" class="btn btn-secondary">@L["Back to list"]</a>
|
|
||||||
@if (!_editing)
|
|
||||||
{
|
|
||||||
<Button Color="Color.Success" Clicked="@ShowUploadModal">@L["Upload new logo"]</Button>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@if (_logos.Count > 0)
|
<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/companies">@L["Back to list"]</a>
|
||||||
|
@if(!_editing)
|
||||||
|
{
|
||||||
|
<Button Clicked="@ShowUploadModal" Color="Color.Success">@L["Upload new logo"]</Button> }
|
||||||
|
</div>
|
||||||
|
@if(_logos.Count > 0)
|
||||||
{
|
{
|
||||||
<h4>@L["Logos"]</h4>
|
<h4>@L["Logos"]</h4>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -364,18 +319,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var logo in _logos)
|
@foreach(var logo in _logos)
|
||||||
{
|
{
|
||||||
bool logoFound = File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", logo.Guid + ".svg"));
|
var logoFound = File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", logo.Guid + ".svg"));
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@if (logoFound)
|
@if(logoFound)
|
||||||
{
|
{
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/logos/@(logo.Guid).svg">
|
<source srcset="/assets/logos/@(logo.Guid).svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/logos/webp/1x/@(logo.Guid).webp, /assets/logos/webp/2x/@(logo.Guid).webp 2x, /assets/logos/webp/3x/@(logo.Guid).webp 3x">
|
<source srcset="/assets/logos/webp/1x/@(logo.Guid).webp, /assets/logos/webp/2x/@(logo.Guid).webp 2x, /assets/logos/webp/3x/@(logo.Guid).webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/logos/png/1x/@(logo.Guid).png, /assets/logos/png/2x/@(logo.Guid).png 2x, /assets/logos/png/3x/@(logo.Guid).png 3x"
|
<img alt="" height="auto" src="/assets/logos/png/1x/@(logo.Guid).png" srcset="/assets/logos/png/1x/@(logo.Guid).png, /assets/logos/png/2x/@(logo.Guid).png 2x, /assets/logos/png/3x/@(logo.Guid).png 3x" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
src="/assets/logos/png/1x/@(logo.Guid).png" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
|
||||||
</picture>
|
</picture>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -384,7 +338,7 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (logo.Year.HasValue)
|
@if(logo.Year.HasValue)
|
||||||
{
|
{
|
||||||
@logo.Year
|
@logo.Year
|
||||||
}
|
}
|
||||||
@@ -394,110 +348,101 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (logoFound)
|
@if(logoFound)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="() => {ShowLogoYearModal(logo.Id);}">@L["Change year"]</Button>
|
<Button Clicked="() => {ShowLogoYearModal(logo.Id);}" Color="Color.Success">@L["Change year"]</Button> }
|
||||||
}
|
<Button Clicked="() => {ShowDeleteModal(logo.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowDeleteModal(logo.Id);}">@L["Delete"]</Button>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>}
|
||||||
}
|
<Modal Closing="@DeleteModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
|
<ModalBackdrop />
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@DeleteModalClosing">
|
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete logo"]</ModalTitle>
|
<ModalTitle>@L["Delete logo"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideDeleteModal"/>
|
<CloseButton Clicked="@HideDeleteModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
@if (_currentLogo?.Year != null)
|
@if(_currentLogo?.Year != null)
|
||||||
{
|
{
|
||||||
<Text>@string.Format(L["Are you sure you want to delete the company logo introduced in {0}?"], _currentLogo?.Year)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the company logo introduced in {0}?"], _currentLogo?.Year)</Text> }
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Text>@L["Are you sure you want to delete the company logo you selected?"]</Text>
|
<Text>@L["Are you sure you want to delete the company logo you selected?"]</Text> }
|
||||||
}
|
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideDeleteModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideDeleteModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<Modal Closing="@LogoYearModalClosing" IsCentered="true" ref="_frmLogoYear">
|
||||||
<Modal @ref="_frmLogoYear" IsCentered="true" Closing="@LogoYearModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Change logo year"]</ModalTitle>
|
<ModalTitle>@L["Change logo year"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideLogoYearModal"/>
|
<CloseButton Clicked="@HideLogoYearModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
@if (_currentLogo != null)
|
@if(_currentLogo != null)
|
||||||
{
|
{
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/logos/@(_currentLogo.Guid).svg">
|
<source srcset="/assets/logos/@(_currentLogo.Guid).svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/logos/webp/1x/@(_currentLogo.Guid).webp, /assets/logos/webp/2x/@(_currentLogo.Guid).webp 2x, /assets/logos/webp/3x/@(_currentLogo.Guid).webp 3x">
|
<source srcset="/assets/logos/webp/1x/@(_currentLogo.Guid).webp, /assets/logos/webp/2x/@(_currentLogo.Guid).webp 2x, /assets/logos/webp/3x/@(_currentLogo.Guid).webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/logos/png/1x/@(_currentLogo.Guid).png, /assets/logos/png/2x/@(_currentLogo.Guid).png 2x, /assets/logos/png/3x/@(_currentLogo.Guid).png 3x" src="/assets/logos/png/1x/@(_currentLogo.Guid).png" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="/assets/logos/png/1x/@(_currentLogo.Guid).png" srcset="/assets/logos/png/1x/@(_currentLogo.Guid).png, /assets/logos/png/2x/@(_currentLogo.Guid).png 2x, /assets/logos/png/3x/@(_currentLogo.Guid).png 3x" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Year logo came in use"]</FieldLabel>
|
<FieldLabel>@L["Year logo came in use"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownLogoYear">@L["Unknown (logo year)"]</Check>
|
<Check @bind-Checked="@_unknownLogoYear" @TValue="bool">@L["Unknown (logo year)"]</Check>
|
||||||
@if (!_unknownLogoYear)
|
@if(!_unknownLogoYear)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLogoYear">
|
<Validation Validator="@ValidateLogoYear">
|
||||||
<NumericEdit TValue="int?" Decimals="0" @bind-Value="@_currentLogoYear">
|
<NumericEdit @bind-Value="@_currentLogoYear" Decimals="0" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field> }
|
||||||
</Field>
|
|
||||||
}
|
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideLogoYearModal" Disabled="@_yearChangeInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideLogoYearModal" Color="Color.Primary" Disabled="@_yearChangeInProgress">@L["Cancel"]</Button>
|
||||||
@if (_currentLogo != null)
|
@if(_currentLogo != null)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmLogoYear" Disabled="@_yearChangeInProgress">@L["Save"]</Button>
|
<Button Clicked="@ConfirmLogoYear" Color="Color.Success" Disabled="@_yearChangeInProgress">@L["Save"]</Button> }
|
||||||
}
|
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<Modal Closing="@UploadModalClosing" IsCentered="true" ref="_frmUpload">
|
||||||
<Modal @ref="_frmUpload" IsCentered="true" Closing="@UploadModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true" Size="ModalSize.ExtraLarge">
|
<ModalContent Centered="true" Size="ModalSize.ExtraLarge">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Upload new logo"]</ModalTitle>
|
<ModalTitle>@L["Upload new logo"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideUploadModal"/>
|
<CloseButton Clicked="@HideUploadModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Field>
|
<Field>
|
||||||
@if (!_uploaded)
|
@if(!_uploaded)
|
||||||
{
|
{
|
||||||
@if (!_uploading)
|
@if(!_uploading)
|
||||||
{
|
{
|
||||||
<FieldLabel>@L["Choose SVG (version 1.1 or lower) logo file"]</FieldLabel>
|
<FieldLabel>@L["Choose SVG (version 1.1 or lower) logo file"]</FieldLabel>
|
||||||
<input type="file" @ref=_inputUpload Accept=".svg" /><br/>
|
<input Accept=".svg" @ref=_inputUpload type="file" />
|
||||||
<Button Color="Color.Success" Clicked="@UploadFile" Disabled="@_uploading">@L["Upload"]</Button><br/>
|
<br />
|
||||||
|
<Button Clicked="@UploadFile" Color="Color.Success" Disabled="@_uploading">@L["Upload"]</Button> <br />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@L["Uploading..."]
|
@L["Uploading..."]
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar" role="progressbar" style="width: @(_progressValue)%;" aria-valuenow="@_progressValue" aria-valuemin="0" aria-valuemax="100">@($"{_progressValue:F2}")%</div>
|
<div aria-valuemax="100" aria-valuemin="0" aria-valuenow="@_progressValue" class="progress-bar" role="progressbar" style="width: @(_progressValue)%;">@($"{_progressValue:F2}")%</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_uploadError)
|
@if(_uploadError)
|
||||||
{
|
{
|
||||||
<span class="text-danger">@_uploadErrorMessage</span>
|
<span class="text-danger">@_uploadErrorMessage</span>
|
||||||
}
|
}
|
||||||
@@ -524,61 +469,55 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<img src="@_uploadedSvgData" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@_uploadedSvgData" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img src="@_uploadedPngData" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@_uploadedPngData" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img src="@_uploadedWebpData" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@_uploadedWebpData" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Year logo came in use"]</FieldLabel>
|
<FieldLabel>@L["Year logo came in use"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownLogoYear">@L["Unknown (logo year)"]</Check>
|
<Check @bind-Checked="@_unknownLogoYear" @TValue="bool">@L["Unknown (logo year)"]</Check>
|
||||||
@if (!_unknownLogoYear)
|
@if(!_unknownLogoYear)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLogoYear">
|
<Validation Validator="@ValidateLogoYear">
|
||||||
<NumericEdit TValue="int?" Decimals="0" @bind-Value="@_currentLogoYear">
|
<NumericEdit @bind-Value="@_currentLogoYear" Decimals="0" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation> }
|
||||||
}
|
</Field> }
|
||||||
</Field>
|
|
||||||
}
|
|
||||||
</Field>
|
</Field>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideUploadModal" Disabled="_uploading || _savingLogo">@L["Cancel"]</Button>
|
<Button Clicked="@HideUploadModal" Color="Color.Primary" Disabled="_uploading || _savingLogo">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmUpload" Disabled="!_uploaded || _savingLogo">@L["Save"]</Button>
|
<Button Clicked="@ConfirmUpload" Color="Color.Success" Disabled="!_uploaded || _savingLogo">@L["Save"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<hr />
|
||||||
<hr/>
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h4>@L["Company description"]</h4>
|
<h4>@L["Company description"]</h4>
|
||||||
<hr/>
|
<hr />
|
||||||
@if (_readonlyDescription &&
|
@if(_readonlyDescription && _description is null)
|
||||||
_description is null)
|
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@AddNewDescription">@L["Add new description"]</Button>
|
<Button Clicked="@AddNewDescription" Color="Color.Success">@L["Add new description"]</Button> }
|
||||||
}
|
@if(!_readonlyDescription ||
|
||||||
@if (!_readonlyDescription || _description != null)
|
_description != null)
|
||||||
{
|
{
|
||||||
if (_readonlyDescription)
|
if(_readonlyDescription)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@EditDescription">@L["Edit"]</Button>
|
<Button Clicked="@EditDescription" Color="Color.Success">@L["Edit"]</Button> }
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@CancelDescription">@L["Cancel"]</Button>
|
<Button Clicked="@CancelDescription" Color="Color.Primary">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@SaveDescription">@L["Save"]</Button>
|
<Button Clicked="@SaveDescription" Color="Color.Success">@L["Save"]</Button> }
|
||||||
}
|
|
||||||
<Tabs SelectedTab="@_selectedDescriptionTab" SelectedTabChanged="@OnSelectedDescriptionTabChanged">
|
<Tabs SelectedTab="@_selectedDescriptionTab" SelectedTabChanged="@OnSelectedDescriptionTabChanged">
|
||||||
<Items>
|
<Items>
|
||||||
<Tab Name="markdown">Markdown</Tab>
|
<Tab Name="markdown">Markdown</Tab>
|
||||||
@@ -586,12 +525,11 @@
|
|||||||
</Items>
|
</Items>
|
||||||
<Content>
|
<Content>
|
||||||
<TabPanel Name="markdown">
|
<TabPanel Name="markdown">
|
||||||
<textarea onchange="OnCompanyMarkdownChanged()" class="form-control" rows="200" id="txtCompanyDescriptionMarkdown" readonly="@_readonlyDescription">@_description.Markdown</textarea>
|
<textarea class="form-control" id="txtCompanyDescriptionMarkdown" onchange="OnCompanyMarkdownChanged()" readonly="@_readonlyDescription" rows="200">@_description.Markdown</textarea>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="preview">
|
<TabPanel Name="preview">
|
||||||
@((MarkupString)_description.Html)
|
@((MarkupString)_description.Html)
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</Content>
|
</Content>
|
||||||
</Tabs>
|
</Tabs> }
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
@@ -471,7 +471,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
{
|
{
|
||||||
await _uploadMs.WriteAsync(buffer, 0, count);
|
await _uploadMs.WriteAsync(buffer, 0, count);
|
||||||
|
|
||||||
double progress = ((double)fs.Position * 100) / fs.Length;
|
double progress = (double)fs.Position * 100 / fs.Length;
|
||||||
|
|
||||||
if(!(progress > lastProgress + 0.01))
|
if(!(progress > lastProgress + 0.01))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@page "/admin/machines/photo/create/{MachineId:int}"
|
@page "/admin/machines/photo/create/{MachineId:int}"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MachinePhotosService>
|
@inherits OwningComponentBase<MachinePhotosService>
|
||||||
@inject IStringLocalizer<MachinePhotosService> L
|
@inject IStringLocalizer<MachinePhotosService> L
|
||||||
@@ -34,40 +33,39 @@
|
|||||||
@inject LicensesService LicensesService
|
@inject LicensesService LicensesService
|
||||||
@inject IFileReaderService FileReaderService;
|
@inject IFileReaderService FileReaderService;
|
||||||
@inject MachinesService MachinesService;
|
@inject MachinesService MachinesService;
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
@if (!_loaded)
|
@if(!_loaded)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<h3>@string.Format(L["Upload photo for machine {0} manufactured by {1}"], _machine.Name, _machine.Company)</h3>
|
<h3>@string.Format(L["Upload photo for machine {0} manufactured by {1}"], _machine.Name, _machine.Company)</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
@if(!_uploaded)
|
@if(!_uploaded)
|
||||||
{
|
{
|
||||||
@if(!_uploading)
|
@if(!_uploading)
|
||||||
{
|
{
|
||||||
<FieldLabel>@L["Choose photo file"]</FieldLabel>
|
<FieldLabel>@L["Choose photo file"]</FieldLabel>
|
||||||
<input type="file" @ref=_inputUpload /><br/>
|
<input ref=_inputUpload @type="file" />
|
||||||
|
<br />
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["License"]</FieldLabel>
|
<FieldLabel>@L["License"]</FieldLabel>
|
||||||
<Select TValue="int" @bind-SelectedValue="@_licenseId">
|
<Select @bind-SelectedValue="@_licenseId" @TValue="int">
|
||||||
@foreach (var license in _licenses)
|
@foreach(var license in _licenses)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@license.Id">@license.Name</SelectItem>
|
<SelectItem @TValue="int" Value="@license.Id">@license.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Source URL"]</FieldLabel>
|
<FieldLabel>@L["Source URL"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSource">@L["Unknown (source url)"]</Check>
|
<Check @bind-Checked="@_unknownSource" @TValue="bool">@L["Unknown (source url)"]</Check>
|
||||||
@if (!_unknownSource)
|
@if(!_unknownSource)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateSource">
|
<Validation Validator="@ValidateSource">
|
||||||
<TextEdit @bind-Text="@_sourceUrl">
|
<TextEdit @bind-Text="@_sourceUrl">
|
||||||
@@ -76,16 +74,16 @@
|
|||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
<div>TODO: Put legal disclaimer here</div>
|
<div>TODO: Put legal disclaimer here</div>
|
||||||
<Button Color="Color.Success" Clicked="@UploadFile" Disabled="@_uploading">@L["Upload"]</Button><br/>
|
<Button Clicked="@UploadFile" Color="Color.Success" Disabled="@_uploading">@L["Upload"]</Button> <br />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@L["Uploading..."]
|
@L["Uploading..."]
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="progress-bar" role="progressbar" style="width: @(_progressValue)%;" aria-valuenow="@_progressValue" aria-valuemin="0" aria-valuemax="100">@($"{_progressValue:F2}")%</div>
|
<div aria-valuemax="100" aria-valuemin="0" aria-valuenow="@_progressValue" class="progress-bar" role="progressbar" style="width: @(_progressValue)%;">@($"{_progressValue:F2}")%</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if(_uploadError)
|
@if(_uploadError)
|
||||||
@@ -96,7 +94,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<h5>@string.Format(L["Image format recognized as {0}"], _imageFormat)</h5>
|
<h5>@string.Format(L["Image format recognized as {0}"], _imageFormat)</h5>
|
||||||
@if (_allFinished)
|
@if(_allFinished)
|
||||||
{
|
{
|
||||||
<span class="text-success">@L["All finished!"]</span>
|
<span class="text-success">@L["All finished!"]</span>
|
||||||
<a class="btn btn-success" href="/admin/machines/photo/details/@_model.Id">@L["Go to photo details"]</a>
|
<a class="btn btn-success" href="/admin/machines/photo/details/@_model.Id">@L["Go to photo details"]</a>
|
||||||
@@ -135,7 +133,7 @@ else
|
|||||||
@if(_moveFile == true)
|
@if(_moveFile == true)
|
||||||
{
|
{
|
||||||
<a href="/assets/photos/machines/originals/@($"{_model.Id}{_model.OriginalExtension}")" target="_blank">
|
<a href="/assets/photos/machines/originals/@($"{_model.Id}{_model.OriginalExtension}")" target="_blank">
|
||||||
<img src="/assets/photos/machines/originals/@($"{_model.Id}{_model.OriginalExtension}")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="/assets/photos/machines/originals/@($"{_model.Id}{_model.OriginalExtension}")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -158,7 +156,7 @@ else
|
|||||||
@if(_convertJpegHdTh == true)
|
@if(_convertJpegHdTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jpeg/hd/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jpeg/hd/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jpeg/hd/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jpeg/hd/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -181,7 +179,7 @@ else
|
|||||||
@if(_convertJpeg1440Th == true)
|
@if(_convertJpeg1440Th == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jpeg/1440p/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jpeg/1440p/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jpeg/1440p/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jpeg/1440p/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -204,7 +202,7 @@ else
|
|||||||
@if(_convertJpeg4kTh == true)
|
@if(_convertJpeg4kTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jpeg/4k/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jpeg/4k/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jpeg/4k/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jpeg/4k/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -227,7 +225,7 @@ else
|
|||||||
@if(_convertJpegHd == true)
|
@if(_convertJpegHd == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jpeg/hd/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/jpeg/hd/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jpeg/hd/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jpeg/hd/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -250,7 +248,7 @@ else
|
|||||||
@if(_convertJpeg1440 == true)
|
@if(_convertJpeg1440 == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jpeg/1440p/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/jpeg/1440p/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jpeg/1440p/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jpeg/1440p/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -273,7 +271,7 @@ else
|
|||||||
@if(_convertJpeg4k == true)
|
@if(_convertJpeg4k == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jpeg/4k/{_model.Id}.jpg")" target="_blank">
|
<a href="@($"/assets/photos/machines/jpeg/4k/{_model.Id}.jpg")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jpeg/4k/{_model.Id}.jpg")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jpeg/4k/{_model.Id}.jpg")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -296,7 +294,7 @@ else
|
|||||||
@if(_convertJp2kHdTh == true)
|
@if(_convertJp2kHdTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jp2k/hd/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jp2k/hd/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jp2k/hd/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jp2k/hd/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -319,7 +317,7 @@ else
|
|||||||
@if(_convertJp2k1440Th == true)
|
@if(_convertJp2k1440Th == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jp2k/1440p/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jp2k/1440p/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jp2k/1440p/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jp2k/1440p/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -342,7 +340,7 @@ else
|
|||||||
@if(_convertJp2k4kTh == true)
|
@if(_convertJp2k4kTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/jp2k/4k/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/jp2k/4k/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/jp2k/4k/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/jp2k/4k/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -365,7 +363,7 @@ else
|
|||||||
@if(_convertJp2kHd == true)
|
@if(_convertJp2kHd == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jp2k/hd/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/jp2k/hd/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jp2k/hd/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jp2k/hd/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -388,7 +386,7 @@ else
|
|||||||
@if(_convertJp2k1440 == true)
|
@if(_convertJp2k1440 == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jp2k/1440p/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/jp2k/1440p/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jp2k/1440p/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jp2k/1440p/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -411,7 +409,7 @@ else
|
|||||||
@if(_convertJp2k4k == true)
|
@if(_convertJp2k4k == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/jp2k/4k/{_model.Id}.jp2")" target="_blank">
|
<a href="@($"/assets/photos/machines/jp2k/4k/{_model.Id}.jp2")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/jp2k/4k/{_model.Id}.jp2")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/jp2k/4k/{_model.Id}.jp2")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -434,7 +432,7 @@ else
|
|||||||
@if(_convertWebpHdTh == true)
|
@if(_convertWebpHdTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/webp/hd/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/webp/hd/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/webp/hd/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/webp/hd/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -457,7 +455,7 @@ else
|
|||||||
@if(_convertWebp1440Th == true)
|
@if(_convertWebp1440Th == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/webp/1440p/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/webp/1440p/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/webp/1440p/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/webp/1440p/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -480,7 +478,7 @@ else
|
|||||||
@if(_convertWebp4kTh == true)
|
@if(_convertWebp4kTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/webp/4k/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/webp/4k/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/webp/4k/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/webp/4k/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -503,7 +501,7 @@ else
|
|||||||
@if(_convertWebpHd == true)
|
@if(_convertWebpHd == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/webp/hd/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/webp/hd/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/webp/hd/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/webp/hd/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -526,7 +524,7 @@ else
|
|||||||
@if(_convertWebp1440 == true)
|
@if(_convertWebp1440 == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/webp/1440p/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/webp/1440p/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/webp/1440p/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/webp/1440p/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -549,7 +547,7 @@ else
|
|||||||
@if(_convertWebp4k == true)
|
@if(_convertWebp4k == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/webp/4k/{_model.Id}.webp")" target="_blank">
|
<a href="@($"/assets/photos/machines/webp/4k/{_model.Id}.webp")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/webp/4k/{_model.Id}.webp")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/webp/4k/{_model.Id}.webp")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -572,7 +570,7 @@ else
|
|||||||
@if(_convertHeifHdTh == true)
|
@if(_convertHeifHdTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/heif/hd/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/heif/hd/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/heif/hd/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/heif/hd/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -595,7 +593,7 @@ else
|
|||||||
@if(_convertHeif1440Th == true)
|
@if(_convertHeif1440Th == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/heif/1440p/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/heif/1440p/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/heif/1440p/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/heif/1440p/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -618,7 +616,7 @@ else
|
|||||||
@if(_convertHeif4kTh == true)
|
@if(_convertHeif4kTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/heif/4k/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/heif/4k/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/heif/4k/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/heif/4k/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -641,7 +639,7 @@ else
|
|||||||
@if(_convertHeifHd == true)
|
@if(_convertHeifHd == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/heif/hd/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/heif/hd/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/heif/hd/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/heif/hd/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -664,7 +662,7 @@ else
|
|||||||
@if(_convertHeif1440 == true)
|
@if(_convertHeif1440 == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/heif/1440p/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/heif/1440p/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/heif/1440p/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/heif/1440p/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -687,7 +685,7 @@ else
|
|||||||
@if(_convertHeif4k == true)
|
@if(_convertHeif4k == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/heif/4k/{_model.Id}.heic")" target="_blank">
|
<a href="@($"/assets/photos/machines/heif/4k/{_model.Id}.heic")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/heif/4k/{_model.Id}.heic")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/heif/4k/{_model.Id}.heic")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -710,7 +708,7 @@ else
|
|||||||
@if(_convertAvifHdTh == true)
|
@if(_convertAvifHdTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/avif/hd/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/avif/hd/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/avif/hd/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/avif/hd/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -733,7 +731,7 @@ else
|
|||||||
@if(_convertAvif1440Th == true)
|
@if(_convertAvif1440Th == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/avif/1440p/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/avif/1440p/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/avif/1440p/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/avif/1440p/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -756,7 +754,7 @@ else
|
|||||||
@if(_convertAvif4kTh == true)
|
@if(_convertAvif4kTh == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/thumbs/avif/4k/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/thumbs/avif/4k/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/thumbs/avif/4k/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/thumbs/avif/4k/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -779,7 +777,7 @@ else
|
|||||||
@if(_convertAvifHd == true)
|
@if(_convertAvifHd == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/avif/hd/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/avif/hd/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/avif/hd/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/avif/hd/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -802,7 +800,7 @@ else
|
|||||||
@if(_convertAvif1440 == true)
|
@if(_convertAvif1440 == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/avif/1440p/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/avif/1440p/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/avif/1440p/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/avif/1440p/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -825,7 +823,7 @@ else
|
|||||||
@if(_convertAvif4k == true)
|
@if(_convertAvif4k == true)
|
||||||
{
|
{
|
||||||
<a href="@($"/assets/photos/machines/avif/4k/{_model.Id}.avif")" target="_blank">
|
<a href="@($"/assets/photos/machines/avif/4k/{_model.Id}.avif")" target="_blank">
|
||||||
<img src="@($"/assets/photos/machines/avif/4k/{_model.Id}.avif")" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" height="auto" src="@($"/assets/photos/machines/avif/4k/{_model.Id}.avif")" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
@@ -847,5 +845,4 @@ else
|
|||||||
<td>
|
<td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>}
|
||||||
}
|
|
||||||
@@ -233,7 +233,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
{
|
{
|
||||||
await outFs.WriteAsync(buffer, 0, count);
|
await outFs.WriteAsync(buffer, 0, count);
|
||||||
|
|
||||||
double progress = ((double)fs.Position * 100) / fs.Length;
|
double progress = (double)fs.Position * 100 / fs.Length;
|
||||||
|
|
||||||
if(!(progress > lastProgress + 0.01))
|
if(!(progress > lastProgress + 0.01))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -34,35 +34,31 @@
|
|||||||
@inject Iso4217Service CurrenciesService
|
@inject Iso4217Service CurrenciesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Currency inflation details"]</h3>
|
<h3>@L["Currency inflation details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Currency"]</FieldLabel>
|
<FieldLabel>@L["Currency"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_model.CurrencyCode">
|
<Select @bind-SelectedValue="@_model.CurrencyCode" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var currency in _currencies)
|
@foreach(var currency in _currencies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Year"]</FieldLabel>
|
<FieldLabel>@L["Year"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateYear">
|
<Validation Validator="@ValidateYear">
|
||||||
<NumericEdit Disabled="!_editing" TValue="uint" Decimals="0" @bind-Value="@_model.Year">
|
<NumericEdit @bind-Value="@_model.Year" Decimals="0" Disabled="!_editing" @TValue="uint">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
<ValidationError>@L["Please enter a valid year."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -72,7 +68,7 @@
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Inflation (ratio)"]</FieldLabel>
|
<FieldLabel>@L["Inflation (ratio)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateInflation">
|
<Validation Validator="@ValidateInflation">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float" Decimals="3" @bind-Value="@_model.Inflation">
|
<NumericEdit @bind-Value="@_model.Inflation" Decimals="3" Disabled="!_editing" @TValue="float">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid inflation."]</ValidationError>
|
<ValidationError>@L["Please enter a valid inflation."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -81,14 +77,14 @@
|
|||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/currency_inflation" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/currency_inflation">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -34,44 +34,40 @@
|
|||||||
@inject Iso4217Service CurrenciesService
|
@inject Iso4217Service CurrenciesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Currency pegging details"]</h3>
|
<h3>@L["Currency pegging details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Source currency"]</FieldLabel>
|
<FieldLabel>@L["Source currency"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_model.SourceCode">
|
<Select @bind-SelectedValue="@_model.SourceCode" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var currency in _currencies)
|
@foreach(var currency in _currencies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Destination currency"]</FieldLabel>
|
<FieldLabel>@L["Destination currency"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_model.DestinationCode">
|
<Select @bind-SelectedValue="@_model.DestinationCode" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var currency in _currencies)
|
@foreach(var currency in _currencies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@currency.Code">@currency.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Pegging (ratio)"]</FieldLabel>
|
<FieldLabel>@L["Pegging (ratio)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidatePegging">
|
<Validation Validator="@ValidatePegging">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float" Decimals="3" @bind-Value="@_model.Ratio">
|
<NumericEdit @bind-Value="@_model.Ratio" Decimals="3" Disabled="!_editing" @TValue="float">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid pegging."]</ValidationError>
|
<ValidationError>@L["Please enter a valid pegging."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -81,44 +77,44 @@
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Start date"]</FieldLabel>
|
<FieldLabel>@L["Start date"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateStart">
|
<Validation Validator="@ValidateStart">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime" @bind-Date="@_model.Start">
|
<DateEdit @bind-Date="@_model.Start" Disabled="!_editing" @TValue="DateTime">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a start date."]</ValidationError>
|
<ValidationError>@L["Please enter a start date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.End.HasValue)
|
@if(_editing || _model.End.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["End date"]</FieldLabel>
|
<FieldLabel>@L["End date"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownEnd">@L["Unknown or never (end date)"]</Check>
|
<Check @bind-Checked="@_unknownEnd" @TValue="bool">@L["Unknown or never (end date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
(!_unknownEnd))
|
!_unknownEnd)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateEnd">
|
<Validation Validator="@ValidateEnd">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime?" @bind-Date="@_model.End">
|
<DateEdit @bind-Date="@_model.End" Disabled="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter an ending date."]</ValidationError>
|
<ValidationError>@L["Please enter an ending date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/currency_pegging" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/currency_pegging">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -818,7 +818,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
{
|
{
|
||||||
await outFs.WriteAsync(buffer, 0, count);
|
await outFs.WriteAsync(buffer, 0, count);
|
||||||
|
|
||||||
double progress = ((double)fs.Position * 100) / fs.Length;
|
double progress = (double)fs.Position * 100 / fs.Length;
|
||||||
|
|
||||||
if(!(progress > lastProgress + 0.01))
|
if(!(progress > lastProgress + 0.01))
|
||||||
continue;
|
continue;
|
||||||
@@ -1418,4 +1418,6 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DocumentImpl : Document {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,60 +33,58 @@
|
|||||||
@inject IStringLocalizer<DocumentCompaniesService> L
|
@inject IStringLocalizer<DocumentCompaniesService> L
|
||||||
@inject CompaniesService CompaniesService
|
@inject CompaniesService CompaniesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Document company details"]</h3>
|
<h3>@L["Document company details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.CompanyId != null)
|
@if(_editing || _model.CompanyId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Linked company"]</FieldLabel>
|
<FieldLabel>@L["Linked company"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_noLinkedCompany">@L["None (linked company)"]</Check>
|
<Check @bind-Checked="@_noLinkedCompany" @TValue="bool">@L["None (linked company)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_noLinkedCompany)
|
!_noLinkedCompany)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/document_people" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/document_people">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,134 +33,132 @@
|
|||||||
@inject IStringLocalizer<DocumentPeopleService> L
|
@inject IStringLocalizer<DocumentPeopleService> L
|
||||||
@inject PeopleService PeopleService
|
@inject PeopleService PeopleService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Document person details"]</h3>
|
<h3>@L["Document person details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.Name != null)
|
@if(_editing || _model.Name != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownName">@L["Unknown (name)"]</Check>
|
<Check @bind-Checked="@_unknownName" @TValue="bool">@L["Unknown (name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownName)
|
!_unknownName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Surname != null)
|
@if(_editing || _model.Surname != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Surname"]</FieldLabel>
|
<FieldLabel>@L["Surname"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSurname">@L["Unknown (surname)"]</Check>
|
<Check @bind-Checked="@_unknownSurname" @TValue="bool">@L["Unknown (surname)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSurname)
|
!_unknownSurname)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateSurname">
|
<Validation Validator="@ValidateSurname">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Surname">
|
<TextEdit @bind-Text="@_model.Surname" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid surname."]</ValidationError>
|
<ValidationError>@L["Please enter a valid surname."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Alias != null)
|
@if(_editing || _model.Alias != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Alias"]</FieldLabel>
|
<FieldLabel>@L["Alias"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownAlias">@L["Unknown (alias)"]</Check>
|
<Check @bind-Checked="@_unknownAlias" @TValue="bool">@L["Unknown (alias)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownAlias)
|
!_unknownAlias)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateAlias">
|
<Validation Validator="@ValidateAlias">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Alias">
|
<TextEdit @bind-Text="@_model.Alias" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid alias."]</ValidationError>
|
<ValidationError>@L["Please enter a valid alias."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.DisplayName != null)
|
@if(_editing || _model.DisplayName != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Display name"]</FieldLabel>
|
<FieldLabel>@L["Display name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDisplayName">@L["Unknown (display name)"]</Check>
|
<Check @bind-Checked="@_unknownDisplayName" @TValue="bool">@L["Unknown (display name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDisplayName)
|
!_unknownDisplayName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDisplayName">
|
<Validation Validator="@ValidateDisplayName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.DisplayName">
|
<TextEdit @bind-Text="@_model.DisplayName" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid display name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid display name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.PersonId != null)
|
@if(_editing || _model.PersonId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Linked person"]</FieldLabel>
|
<FieldLabel>@L["Linked person"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_noLinkedPerson">@L["None (linked person)"]</Check>
|
<Check @bind-Checked="@_noLinkedPerson" @TValue="bool">@L["None (linked person)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_noLinkedPerson)
|
!_noLinkedPerson)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.PersonId">
|
<Select @bind-SelectedValue="@_model.PersonId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var person in _people)
|
@foreach(var person in _people)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@person.Id">@person.DisplayName</SelectItem>
|
<SelectItem @TValue="int?" Value="@person.Id">@person.DisplayName</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/document_people" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/document_people">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
@page "/admin/dumps/details/{Id:long}"
|
@page "/admin/dumps/details/{Id:long}"
|
||||||
@page "/admin/dumps/edit/{Id:long}"
|
@page "/admin/dumps/edit/{Id:long}"
|
||||||
@page "/admin/dumps/create"
|
@page "/admin/dumps/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<DumpsService>
|
@inherits OwningComponentBase<DumpsService>
|
||||||
@inject IStringLocalizer<DumpsService> L
|
@inject IStringLocalizer<DumpsService> L
|
||||||
@@ -36,115 +35,112 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Dump details"]</h3>
|
<h3>@L["Dump details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Dumper"]</FieldLabel>
|
<FieldLabel>@L["Dumper"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateDumper">
|
<Validation Validator="@ValidateDumper">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Dumper">
|
<TextEdit @bind-Text="@_model.Dumper" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid dumper."]</ValidationError>
|
<ValidationError>@L["Please enter a valid dumper."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.UserId != null)
|
@if(_editing || _model.UserId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Dumper's user"]</FieldLabel>
|
<FieldLabel>@L["Dumper's user"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownUser">@L["Unknown (user)"]</Check>
|
<Check @bind-Checked="@_unknownUser" @TValue="bool">@L["Unknown (user)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownUser)
|
!_unknownUser)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_model.UserId">
|
<Select @bind-SelectedValue="@_model.UserId" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var user in _users)
|
@foreach(var user in _users)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@user.Id">@user.UserName</SelectItem>
|
<SelectItem @TValue="string" Value="@user.Id">@user.UserName</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.DumpingGroup != null)
|
@if(_editing || _model.DumpingGroup != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Dumping group, or group whose guidelines where followed to make the dump"]</FieldLabel>
|
<FieldLabel>@L["Dumping group, or group whose guidelines where followed to make the dump"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDumpingGroup">@L["Unknown (dumping group)"]</Check>
|
<Check @bind-Checked="@_unknownDumpingGroup" @TValue="bool">@L["Unknown (dumping group)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDumpingGroup)
|
!_unknownDumpingGroup)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDumpingGroup">
|
<Validation Validator="@ValidateDumpingGroup">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.DumpingGroup">
|
<TextEdit @bind-Text="@_model.DumpingGroup" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid dumping group."]</ValidationError>
|
<ValidationError>@L["Please enter a valid dumping group."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.DumpDate != null)
|
@if(_editing || _model.DumpDate != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Dump date"]</FieldLabel>
|
<FieldLabel>@L["Dump date"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDumpDate">@L["Unknown (dump date)"]</Check>
|
<Check @bind-Checked="@_unknownDumpDate" @TValue="bool">@L["Unknown (dump date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownDumpDate)
|
@if(!_editing ||
|
||||||
|
!_unknownDumpDate)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDumpDate">
|
<Validation Validator="@ValidateDumpDate">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.DumpDate" >
|
<DateEdit @bind-Date="@_model.DumpDate" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid dump date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid dump date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Media"]</FieldLabel>
|
<FieldLabel>@L["Media"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="ulong" @bind-SelectedValue="@_model.MediaId">
|
<Select @bind-SelectedValue="@_model.MediaId" Disabled="!_editing" @TValue="ulong">
|
||||||
@foreach (var media in _medias)
|
@foreach(var media in _medias)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong" Value="@media.Id">@media.Title</SelectItem>
|
<SelectItem @TValue="ulong" Value="@media.Id">@media.Title</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
@{
|
@{
|
||||||
// TODO: Dump hardware
|
// TODO: Dump hardware
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/dumps" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/dumps">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -35,236 +35,234 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject ResolutionsService ResolutionsService
|
@inject ResolutionsService ResolutionsService
|
||||||
@inject ResolutionsByGpuService ResolutionsByGpuService
|
@inject ResolutionsByGpuService ResolutionsByGpuService
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Graphical processing unit details"]</h3>
|
<h3>@L["Graphical processing unit details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.CompanyId != null)
|
@if(_editing || _model.CompanyId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCompany">@L["Unknown (company)"]</Check>
|
<Check @bind-Checked="@_unknownCompany" @TValue="bool">@L["Unknown (company)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCompany)
|
!_unknownCompany)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.ModelCode != null)
|
@if(_editing || _model.ModelCode != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Model code"]</FieldLabel>
|
<FieldLabel>@L["Model code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownModelCode">@L["Unknown (model code)"]</Check>
|
<Check @bind-Checked="@_unknownModelCode" @TValue="bool">@L["Unknown (model code)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownModelCode)
|
!_unknownModelCode)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateModelCode">
|
<Validation Validator="@ValidateModelCode">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.ModelCode">
|
<TextEdit @bind-Text="@_model.ModelCode" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Introduced.HasValue)
|
@if(_editing || _model.Introduced.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" Disabled="_prototype" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" Disabled="_prototype" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
<Check TValue="bool" Disabled="_unknownIntroduced" @bind-Checked="@_prototype">@L["Prototype"]</Check>
|
<Check @bind-Checked="@_prototype" Disabled="_unknownIntroduced" @TValue="bool">@L["Prototype"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
(!_prototype && !_unknownIntroduced))
|
!_prototype && !_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime?" @bind-Date="@_model.Introduced">
|
<DateEdit @bind-Date="@_model.Introduced" Disabled="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Package != null)
|
@if(_editing || _model.Package != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Package"]</FieldLabel>
|
<FieldLabel>@L["Package"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPackage">@L["Unknown (package)"]</Check>
|
<Check @bind-Checked="@_unknownPackage" @TValue="bool">@L["Unknown (package)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownPackage)
|
!_unknownPackage)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidatePackage">
|
<Validation Validator="@ValidatePackage">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Package">
|
<TextEdit @bind-Text="@_model.Package" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid package."]</ValidationError>
|
<ValidationError>@L["Please enter a valid package."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Process != null)
|
@if(_editing || _model.Process != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Process"]</FieldLabel>
|
<FieldLabel>@L["Process"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProcess">@L["Unknown (process)"]</Check>
|
<Check @bind-Checked="@_unknownProcess" @TValue="bool">@L["Unknown (process)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownProcess)
|
!_unknownProcess)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateProcess">
|
<Validation Validator="@ValidateProcess">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Process">
|
<TextEdit @bind-Text="@_model.Process" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid process."]</ValidationError>
|
<ValidationError>@L["Please enter a valid process."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.ProcessNm.HasValue)
|
@if(_editing || _model.ProcessNm.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Process (nm)"]</FieldLabel>
|
<FieldLabel>@L["Process (nm)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProcessNm">@L["Unknown (process size)"]</Check>
|
<Check @bind-Checked="@_unknownProcessNm" @TValue="bool">@L["Unknown (process size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownProcessNm)
|
!_unknownProcessNm)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanOne">
|
<Validation Validator="@ValidateFloatBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="2" @bind-Value="@_model.ProcessNm">
|
<NumericEdit @bind-Value="@_model.ProcessNm" Decimals="2" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid process size in nanometers."]</ValidationError>
|
<ValidationError>@L["Please enter a valid process size in nanometers."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.DieSize.HasValue)
|
@if(_editing || _model.DieSize.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Die size (mm²)"]</FieldLabel>
|
<FieldLabel>@L["Die size (mm²)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDieSize">@L["Unknown (die size)"]</Check>
|
<Check @bind-Checked="@_unknownDieSize" @TValue="bool">@L["Unknown (die size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDieSize)
|
!_unknownDieSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanOne">
|
<Validation Validator="@ValidateFloatBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="2" @bind-Value="@_model.DieSize">
|
<NumericEdit @bind-Value="@_model.DieSize" Decimals="2" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid die size in square millimeters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid die size in square millimeters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Transistors.HasValue)
|
@if(_editing || _model.Transistors.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Transistors"]</FieldLabel>
|
<FieldLabel>@L["Transistors"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownTransistors">@L["Unknown (transistors)"]</Check>
|
<Check @bind-Checked="@_unknownTransistors" @TValue="bool">@L["Unknown (transistors)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownTransistors)
|
!_unknownTransistors)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLongBiggerThanZero">
|
<Validation Validator="@ValidateLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="long?" Decimals="0" @bind-Value="@_model.Transistors">
|
<NumericEdit @bind-Value="@_model.Transistors" Decimals="0" Disabled="!_editing" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of transistors."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of transistors."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/gpus" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/gpus">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Resolutions supported by this graphical processing unit"]</h3>
|
<h3>@L["Resolutions supported by this graphical processing unit"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddResolutionClick" Disabled="_addingResolution">@L["Add new (resolution by gpu)"]</Button>
|
<Button Clicked="OnAddResolutionClick" Color="Color.Success" Disabled="_addingResolution">@L["Add new (resolution by gpu)"]</Button>
|
||||||
@if (_addingResolution)
|
@if(_addingResolution)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Resolutions"]</FieldLabel>
|
<FieldLabel>@L["Resolutions"]</FieldLabel>
|
||||||
<Select Disabled="_savingResolution" TValue="int?" @bind-SelectedValue="@_addingResolutionId">
|
<Select @bind-SelectedValue="@_addingResolutionId" Disabled="_savingResolution" @TValue="int?">
|
||||||
@foreach (var resolution in _resolutions)
|
@foreach(var resolution in _resolutions)
|
||||||
{
|
{
|
||||||
@if (_gpuResolutions.All(r => r.ResolutionId != resolution.Id))
|
@if(_gpuResolutions.All(r => r.ResolutionId != resolution.Id))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@resolution.Id">@resolution</SelectItem>
|
<SelectItem @TValue="int?" Value="@resolution.Id">@resolution</SelectItem>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddResolution" Disabled="@_savingResolution">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddResolution" Color="Color.Primary" Disabled="@_savingResolution">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddResolution" Disabled="@_savingResolution">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddResolution" Color="Color.Success" Disabled="@_savingResolution">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_gpuResolutions?.Count > 0)
|
@if(_gpuResolutions?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -292,7 +290,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _gpuResolutions)
|
@foreach(var item in _gpuResolutions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -314,7 +312,7 @@
|
|||||||
@item.Resolution.Grayscale
|
@item.Resolution.Grayscale
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowResolutionDeleteModal(item.Id);}" Disabled="@_addingResolution">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowResolutionDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingResolution">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -323,7 +321,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -334,9 +332,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,23 +33,21 @@
|
|||||||
@inject IStringLocalizer<InstructionSetsService> L
|
@inject IStringLocalizer<InstructionSetsService> L
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
<h3>@L["Instruction set details"]</h3>
|
<h3>@L["Instruction set details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid instruction set name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid instruction set name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -58,14 +56,14 @@
|
|||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/instruction_sets" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/instruction_sets">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,23 +33,21 @@
|
|||||||
@inject IStringLocalizer<InstructionSetExtensionsService> L
|
@inject IStringLocalizer<InstructionSetExtensionsService> L
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
<h3>@L["Instruction set extension details"]</h3>
|
<h3>@L["Instruction set extension details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Extension"]</FieldLabel>
|
<FieldLabel>@L["Extension"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Extension">
|
<TextEdit @bind-Text="@_model.Extension" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid extension name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid extension name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -58,14 +56,14 @@
|
|||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/instruction_set_extensions" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/instruction_set_extensions">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -32,24 +32,22 @@
|
|||||||
@inherits OwningComponentBase<LicensesService>
|
@inherits OwningComponentBase<LicensesService>
|
||||||
@inject IStringLocalizer<LicensesService> L
|
@inject IStringLocalizer<LicensesService> L
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["License details"]</h3>
|
<h3>@L["License details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -59,7 +57,7 @@
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["SPDX identifier"]</FieldLabel>
|
<FieldLabel>@L["SPDX identifier"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateSpdx">
|
<Validation Validator="@ValidateSpdx">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.SPDX">
|
<TextEdit @bind-Text="@_model.SPDX" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid SPDX identifier."]</ValidationError>
|
<ValidationError>@L["Please enter a valid SPDX identifier."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -68,64 +66,64 @@
|
|||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["FSF approved"]</FieldLabel>
|
<FieldLabel>@L["FSF approved"]</FieldLabel>
|
||||||
<Check TValue="bool" Disabled="!_editing" @bind-Checked="@_model.FsfApproved"/>
|
<Check @bind-Checked="@_model.FsfApproved" Disabled="!_editing" @TValue="bool" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["OSI approved"]</FieldLabel>
|
<FieldLabel>@L["OSI approved"]</FieldLabel>
|
||||||
<Check TValue="bool" Disabled="!_editing" @bind-Checked="@_model.OsiApproved"/>
|
<Check @bind-Checked="@_model.OsiApproved" Disabled="!_editing" @TValue="bool" />
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Link != null)
|
@if(_editing || _model.Link != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["License text link"]</FieldLabel>
|
<FieldLabel>@L["License text link"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownLink">@L["Unknown or none (text link)"]</Check>
|
<Check @bind-Checked="@_unknownLink" @TValue="bool">@L["Unknown or none (text link)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownLink)
|
!_unknownLink)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLink">
|
<Validation Validator="@ValidateLink">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Link">
|
<TextEdit @bind-Text="@_model.Link" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a license text link."]</ValidationError>
|
<ValidationError>@L["Please enter a license text link."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Text != null)
|
@if(_editing || _model.Text != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["License text"]</FieldLabel>
|
<FieldLabel>@L["License text"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownText">@L["Unknown (license text)"]</Check>
|
<Check @bind-Checked="@_unknownText" @TValue="bool">@L["Unknown (license text)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownText)
|
!_unknownText)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateText">
|
<Validation Validator="@ValidateText">
|
||||||
<MemoEdit Rows="200" Plaintext="true" ReadOnly="!_editing" @bind-Text="@_model.Text">
|
<MemoEdit @bind-Text="@_model.Text" Plaintext="true" ReadOnly="!_editing" @Rows="200">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid license text."]</ValidationError>
|
<ValidationError>@L["Please enter a valid license text."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</MemoEdit>
|
</MemoEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/licenses" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/licenses">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
@page "/admin/machines/details/{Id:int}"
|
@page "/admin/machines/details/{Id:int}"
|
||||||
@page "/admin/machines/edit/{Id:int}"
|
@page "/admin/machines/edit/{Id:int}"
|
||||||
@page "/admin/machines/create"
|
@page "/admin/machines/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
|
@using Marechai.Database
|
||||||
@inherits OwningComponentBase<MachinesService>
|
@inherits OwningComponentBase<MachinesService>
|
||||||
@inject IStringLocalizer<MachinesService> L
|
@inject IStringLocalizer<MachinesService> L
|
||||||
@inject CompaniesService CompaniesService
|
@inject CompaniesService CompaniesService
|
||||||
@@ -46,33 +46,31 @@
|
|||||||
@inject ScreensByMachineService ScreensByMachineService
|
@inject ScreensByMachineService ScreensByMachineService
|
||||||
@inject ScreensService ScreensService
|
@inject ScreensService ScreensService
|
||||||
@inject MachinePhotosService MachinePhotosService
|
@inject MachinePhotosService MachinePhotosService
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Machine details"]</h3>
|
<h3>@L["Machine details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="int" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -81,111 +79,111 @@
|
|||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Type"]</FieldLabel>
|
<FieldLabel>@L["Type"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="int" @bind-SelectedValue="@Type">
|
<Select @bind-SelectedValue="@Type" Disabled="!_editing" @TValue="int">
|
||||||
@foreach (int type in Enum.GetValues(typeof(MachineType)))
|
@foreach(int type in Enum.GetValues(typeof(MachineType)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@type">@(((MachineType)type).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@type">@(((MachineType)type).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Model != null)
|
@if(_editing || _model.Model != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Model code"]</FieldLabel>
|
<FieldLabel>@L["Model code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownModel">@L["Unknown (model)"]</Check>
|
<Check @bind-Checked="@_unknownModel" @TValue="bool">@L["Unknown (model)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownModel)
|
!_unknownModel)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateModel">
|
<Validation Validator="@ValidateModel">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Model">
|
<TextEdit @bind-Text="@_model.Model" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid model."]</ValidationError>
|
<ValidationError>@L["Please enter a valid model."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Introduced.HasValue)
|
@if(_editing || _model.Introduced.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced (public release)"]</FieldLabel>
|
<FieldLabel>@L["Introduced (public release)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" Disabled="_prototype" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" Disabled="_prototype" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
<Check TValue="bool" Disabled="_unknownIntroduced" @bind-Checked="@_prototype">@L["Prototype"]</Check>
|
<Check @bind-Checked="@_prototype" Disabled="_unknownIntroduced" @TValue="bool">@L["Prototype"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
(!_prototype && !_unknownIntroduced))
|
!_prototype && !_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime?" @bind-Date="@_model.Introduced">
|
<DateEdit @bind-Date="@_model.Introduced" Disabled="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.FamilyId != null)
|
@if(_editing || _model.FamilyId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Family"]</FieldLabel>
|
<FieldLabel>@L["Family"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_noFamily">@L["No family"]</Check>
|
<Check @bind-Checked="@_noFamily" @TValue="bool">@L["No family"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_noFamily)
|
!_noFamily)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.FamilyId">
|
<Select @bind-SelectedValue="@_model.FamilyId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (MachineFamilyViewModel family in _families)
|
@foreach(var family in _families)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@family.Id">@family.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@family.Id">@family.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/machines" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/machines">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Graphical processing units belonging to this machine"]</h3>
|
<h3>@L["Graphical processing units belonging to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddGpuClick" Disabled="_addingGpu">@L["Add new (gpu by machine)"]</Button>
|
<Button Clicked="OnAddGpuClick" Color="Color.Success" Disabled="_addingGpu">@L["Add new (gpu by machine)"]</Button>
|
||||||
@if (_addingGpu)
|
@if(_addingGpu)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Graphical processing units"]</FieldLabel>
|
<FieldLabel>@L["Graphical processing units"]</FieldLabel>
|
||||||
<Select Disabled="_savingGpu" TValue="int?" @bind-SelectedValue="@_addingGpuId">
|
<Select @bind-SelectedValue="@_addingGpuId" Disabled="_savingGpu" @TValue="int?">
|
||||||
@foreach (var gpu in _gpus)
|
@foreach(var gpu in _gpus)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@gpu.Id">@gpu.Company - @gpu.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@gpu.Id">@gpu.Company - @gpu.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddGpu" Disabled="@_savingGpu">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddGpu" Color="Color.Primary" Disabled="@_savingGpu">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddGpu" Disabled="@_savingGpu">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddGpu" Color="Color.Success" Disabled="@_savingGpu">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineGpus?.Count > 0)
|
@if(_machineGpus?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -201,7 +199,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineGpus)
|
@foreach(var item in _machineGpus)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -211,7 +209,7 @@
|
|||||||
@item.Name
|
@item.Name
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowGpuDeleteModal(item.Id);}" Disabled="@_addingGpu">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowGpuDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingGpu">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -222,24 +220,24 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Sound synthesizers belonging to this machine"]</h3>
|
<h3>@L["Sound synthesizers belonging to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddSoundClick" Disabled="_addingSound">@L["Add new (sound by machine)"]</Button>
|
<Button Clicked="OnAddSoundClick" Color="Color.Success" Disabled="_addingSound">@L["Add new (sound by machine)"]</Button>
|
||||||
@if (_addingSound)
|
@if(_addingSound)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Sound synthesizers"]</FieldLabel>
|
<FieldLabel>@L["Sound synthesizers"]</FieldLabel>
|
||||||
<Select Disabled="_savingSound" TValue="int?" @bind-SelectedValue="@_addingSoundId">
|
<Select @bind-SelectedValue="@_addingSoundId" Disabled="_savingSound" @TValue="int?">
|
||||||
@foreach (var soundSynth in _soundSynths)
|
@foreach(var soundSynth in _soundSynths)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@soundSynth.Id">@soundSynth.CompanyName - @soundSynth.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@soundSynth.Id">@soundSynth.CompanyName - @soundSynth.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddSound" Disabled="@_savingSound">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddSound" Color="Color.Primary" Disabled="@_savingSound">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddSound" Disabled="@_savingSound">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddSound" Color="Color.Success" Disabled="@_savingSound">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineSound?.Count > 0)
|
@if(_machineSound?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -255,7 +253,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineSound)
|
@foreach(var item in _machineSound)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -265,7 +263,7 @@
|
|||||||
@item.Name
|
@item.Name
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowSoundDeleteModal(item.Id);}" Disabled="@_addingSound">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowSoundDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingSound">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -276,38 +274,38 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Processors belonging to this machine"]</h3>
|
<h3>@L["Processors belonging to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddCpuClick" Disabled="_addingCpu">@L["Add new (processor by machine)"]</Button>
|
<Button Clicked="OnAddCpuClick" Color="Color.Success" Disabled="_addingCpu">@L["Add new (processor by machine)"]</Button>
|
||||||
@if (_addingCpu)
|
@if(_addingCpu)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Processors"]</FieldLabel>
|
<FieldLabel>@L["Processors"]</FieldLabel>
|
||||||
<Select Disabled="_savingCpu" TValue="int?" @bind-SelectedValue="@_addingCpuId">
|
<Select @bind-SelectedValue="@_addingCpuId" Disabled="_savingCpu" @TValue="int?">
|
||||||
@foreach (var cpu in _cpus)
|
@foreach(var cpu in _cpus)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@cpu.Id">@cpu.CompanyName - @cpu.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@cpu.Id">@cpu.CompanyName - @cpu.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Nominal speed (MHz)"]</FieldLabel>
|
<FieldLabel>@L["Nominal speed (MHz)"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProcessorSpeed">@L["Unknown (processor by machine speed)"]</Check>
|
<Check @bind-Checked="@_unknownProcessorSpeed" @TValue="bool">@L["Unknown (processor by machine speed)"]</Check>
|
||||||
@if (!_unknownProcessorSpeed)
|
@if(!_unknownProcessorSpeed)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateProcessorSpeed">
|
<Validation Validator="@ValidateProcessorSpeed">
|
||||||
<NumericEdit TValue="float?" Decimals="3" @bind-Value="@_addingProcessorSpeed" >
|
<NumericEdit @bind-Value="@_addingProcessorSpeed" Decimals="3" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid speed for this processor."]</ValidationError>
|
<ValidationError>@L["Please enter a valid speed for this processor."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddCpu" Disabled="@_savingCpu">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddCpu" Color="Color.Primary" Disabled="@_savingCpu">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddCpu" Disabled="@_savingCpu">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddCpu" Color="Color.Success" Disabled="@_savingCpu">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineCpus?.Count > 0)
|
@if(_machineCpus?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -326,7 +324,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineCpus)
|
@foreach(var item in _machineCpus)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -339,7 +337,7 @@
|
|||||||
@string.Format(L["{0:F3} MHz"], item.Speed)
|
@string.Format(L["{0:F3} MHz"], item.Speed)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowCpuDeleteModal(item.Id);}" Disabled="@_addingCpu">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowCpuDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingCpu">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -350,61 +348,61 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Memory belonging to this machine"]</h3>
|
<h3>@L["Memory belonging to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddMemoryClick" Disabled="_addingMemory">@L["Add new (memory by machine)"]</Button>
|
<Button Clicked="OnAddMemoryClick" Color="Color.Success" Disabled="_addingMemory">@L["Add new (memory by machine)"]</Button>
|
||||||
@if (_addingMemory)
|
@if(_addingMemory)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Memory type"]</FieldLabel>
|
<FieldLabel>@L["Memory type"]</FieldLabel>
|
||||||
<Select TValue="int" @bind-SelectedValue="@_addingMemoryType">
|
<Select @bind-SelectedValue="@_addingMemoryType" @TValue="int">
|
||||||
@foreach (int type in Enum.GetValues(typeof(MemoryType)))
|
@foreach(int type in Enum.GetValues(typeof(MemoryType)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@type">@(((MemoryType)type).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@type">@(((MemoryType)type).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Memory usage"]</FieldLabel>
|
<FieldLabel>@L["Memory usage"]</FieldLabel>
|
||||||
<Select TValue="int" @bind-SelectedValue="@_addingMemoryUsage">
|
<Select @bind-SelectedValue="@_addingMemoryUsage" @TValue="int">
|
||||||
@foreach (int usage in Enum.GetValues(typeof(MemoryUsage)))
|
@foreach(int usage in Enum.GetValues(typeof(MemoryUsage)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@usage">@(((MemoryUsage)usage).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@usage">@(((MemoryUsage)usage).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Nominal speed (Hz)"]</FieldLabel>
|
<FieldLabel>@L["Nominal speed (Hz)"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownMemorySpeed">@L["Unknown (memory by machine speed)"]</Check>
|
<Check @bind-Checked="@_unknownMemorySpeed" @TValue="bool">@L["Unknown (memory by machine speed)"]</Check>
|
||||||
@if (!_unknownMemorySpeed)
|
@if(!_unknownMemorySpeed)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateMemorySpeed">
|
<Validation Validator="@ValidateMemorySpeed">
|
||||||
<NumericEdit TValue="double?" Decimals="3" @bind-Value="@_addingMemorySpeed" >
|
<NumericEdit @bind-Value="@_addingMemorySpeed" Decimals="3" @TValue="double?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid speed for this memory."]</ValidationError>
|
<ValidationError>@L["Please enter a valid speed for this memory."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Memory size (bytes)"]</FieldLabel>
|
<FieldLabel>@L["Memory size (bytes)"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownMemorySize">@L["Unknown (memory by machine size)"]</Check>
|
<Check @bind-Checked="@_unknownMemorySize" @TValue="bool">@L["Unknown (memory by machine size)"]</Check>
|
||||||
@if (!_unknownMemorySize)
|
@if(!_unknownMemorySize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateMemorySize">
|
<Validation Validator="@ValidateMemorySize">
|
||||||
<NumericEdit TValue="long?" Decimals="0" @bind-Value="@_addingMemorySize" >
|
<NumericEdit @bind-Value="@_addingMemorySize" Decimals="0" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid size for this memory."]</ValidationError>
|
<ValidationError>@L["Please enter a valid size for this memory."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddMemory" Disabled="@_savingMemory">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddMemory" Color="Color.Primary" Disabled="@_savingMemory">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddMemory" Disabled="@_savingMemory">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddMemory" Color="Color.Success" Disabled="@_savingMemory">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineMemories?.Count > 0)
|
@if(_machineMemories?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -426,7 +424,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineMemories)
|
@foreach(var item in _machineMemories)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -436,7 +434,7 @@
|
|||||||
@item.Usage
|
@item.Usage
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Size.HasValue)
|
@if(item.Size.HasValue)
|
||||||
{
|
{
|
||||||
@string.Format(L["{0} bytes"], item.Size)
|
@string.Format(L["{0} bytes"], item.Size)
|
||||||
}
|
}
|
||||||
@@ -446,7 +444,7 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Speed.HasValue)
|
@if(item.Speed.HasValue)
|
||||||
{
|
{
|
||||||
@string.Format(L["{0:F3} Hz"], item.Speed)
|
@string.Format(L["{0:F3} Hz"], item.Speed)
|
||||||
}
|
}
|
||||||
@@ -456,7 +454,7 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowMemoryDeleteModal(item.Id);}" Disabled="@_addingMemory">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowMemoryDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingMemory">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -467,47 +465,47 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Storage belonging to this machine"]</h3>
|
<h3>@L["Storage belonging to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddStorageClick" Disabled="_addingStorage">@L["Add new (storage by machine)"]</Button>
|
<Button Clicked="OnAddStorageClick" Color="Color.Success" Disabled="_addingStorage">@L["Add new (storage by machine)"]</Button>
|
||||||
@if (_addingStorage)
|
@if(_addingStorage)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Storage type"]</FieldLabel>
|
<FieldLabel>@L["Storage type"]</FieldLabel>
|
||||||
<Select TValue="int" @bind-SelectedValue="@_addingStorageType">
|
<Select @bind-SelectedValue="@_addingStorageType" @TValue="int">
|
||||||
@foreach (int type in Enum.GetValues(typeof(StorageType)))
|
@foreach(int type in Enum.GetValues(typeof(StorageType)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@type">@(((StorageType)type).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@type">@(((StorageType)type).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Storage interface"]</FieldLabel>
|
<FieldLabel>@L["Storage interface"]</FieldLabel>
|
||||||
<Select TValue="int" @bind-SelectedValue="@_addingStorageInterface">
|
<Select @bind-SelectedValue="@_addingStorageInterface" @TValue="int">
|
||||||
@foreach (int usage in Enum.GetValues(typeof(StorageInterface)))
|
@foreach(int usage in Enum.GetValues(typeof(StorageInterface)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@usage">@(((StorageInterface)usage).ToString())</SelectItem>
|
<SelectItem @TValue="int" Value="@usage">@(((StorageInterface)usage).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Nominal capacity (bytes)"]</FieldLabel>
|
<FieldLabel>@L["Nominal capacity (bytes)"]</FieldLabel>
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownStorageSize">@L["Unknown or empty (storage by machine nominal capacity)"]</Check>
|
<Check @bind-Checked="@_unknownStorageSize" @TValue="bool">@L["Unknown or empty (storage by machine nominal capacity)"]</Check>
|
||||||
@if (!_unknownStorageSize)
|
@if(!_unknownStorageSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateStorageSize">
|
<Validation Validator="@ValidateStorageSize">
|
||||||
<NumericEdit TValue="long?" Decimals="0" @bind-Value="@_addingStorageSize" >
|
<NumericEdit @bind-Value="@_addingStorageSize" Decimals="0" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid size for this storage."]</ValidationError>
|
<ValidationError>@L["Please enter a valid size for this storage."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddStorage" Disabled="@_savingStorage">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddStorage" Color="Color.Primary" Disabled="@_savingStorage">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddStorage" Disabled="@_savingStorage">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddStorage" Color="Color.Success" Disabled="@_savingStorage">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineStorage?.Count > 0)
|
@if(_machineStorage?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -526,7 +524,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineStorage)
|
@foreach(var item in _machineStorage)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -536,7 +534,7 @@
|
|||||||
@item.Interface
|
@item.Interface
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Capacity.HasValue)
|
@if(item.Capacity.HasValue)
|
||||||
{
|
{
|
||||||
@string.Format(L["{0} bytes"], item.Capacity)
|
@string.Format(L["{0} bytes"], item.Capacity)
|
||||||
}
|
}
|
||||||
@@ -546,7 +544,7 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowStorageDeleteModal(item.Id);}" Disabled="@_addingStorage">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowStorageDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingStorage">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -557,27 +555,27 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Screens attached to this machine"]</h3>
|
<h3>@L["Screens attached to this machine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddScreenClick" Disabled="_addingScreen">@L["Add new (screen by machine)"]</Button>
|
<Button Clicked="OnAddScreenClick" Color="Color.Success" Disabled="_addingScreen">@L["Add new (screen by machine)"]</Button>
|
||||||
@if (_addingScreen)
|
@if(_addingScreen)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Screens"]</FieldLabel>
|
<FieldLabel>@L["Screens"]</FieldLabel>
|
||||||
<Select Disabled="_savingScreen" TValue="int?" @bind-SelectedValue="@_addingScreenId">
|
<Select @bind-SelectedValue="@_addingScreenId" Disabled="_savingScreen" @TValue="int?">
|
||||||
@foreach (var screen in _screens)
|
@foreach(var screen in _screens)
|
||||||
{
|
{
|
||||||
if (_machineScreens.All(s => s.ScreenId != screen.Id))
|
if(_machineScreens.All(s => s.ScreenId != screen.Id))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@screen.Id">@string.Format(L["{0}\" with a native resolution of {1}"],screen.Diagonal, screen.NativeResolution)</SelectItem>
|
<SelectItem @TValue="int?" Value="@screen.Id">@string.Format(L["{0}\" with a native resolution of {1}"], screen.Diagonal, screen.NativeResolution)</SelectItem>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddScreen" Disabled="@_savingScreen">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddScreen" Color="Color.Primary" Disabled="@_savingScreen">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddScreen" Disabled="@_savingScreen">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddScreen" Color="Color.Success" Disabled="@_savingScreen">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_machineScreens?.Count > 0)
|
@if(_machineScreens?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -605,7 +603,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineScreens)
|
@foreach(var item in _machineScreens)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -627,7 +625,7 @@
|
|||||||
@item.Screen.NativeResolution
|
@item.Screen.NativeResolution
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowScreenDeleteModal(item.Id);}" Disabled="@_addingScreen">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowScreenDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingScreen">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -636,7 +634,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -647,27 +645,28 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
@if(_photos.Count > 0)
|
@if(_photos.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var photo in _photos)
|
foreach(var photo in _photos)
|
||||||
{
|
{
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<figure class="figure">
|
<figure class="figure">
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/avif" srcset="/assets/photos/machines/thumbs/avif/hd/@(photo).avif, /assets/photos/machines/thumbs/avif/1440p/@(photo).avif 2x, /assets/photos/machines/thumbs/avif/4k/@(photo).avif 3x">
|
<source srcset="/assets/photos/machines/thumbs/avif/hd/@(photo).avif, /assets/photos/machines/thumbs/avif/1440p/@(photo).avif 2x, /assets/photos/machines/thumbs/avif/4k/@(photo).avif 3x" type="image/avif">
|
||||||
<source type="image/heic" srcset="/assets/photos/machines/thumbs/heif/hd/@(photo).heic, /assets/photos/machines/thumbs/heif/1440p/@(photo).heic 2x, /assets/photos/machines/thumbs/heif/4k/@(photo).heic 3x">
|
<source srcset="/assets/photos/machines/thumbs/heif/hd/@(photo).heic, /assets/photos/machines/thumbs/heif/1440p/@(photo).heic 2x, /assets/photos/machines/thumbs/heif/4k/@(photo).heic 3x" type="image/heic">
|
||||||
<source type="image/webp" srcset="/assets/photos/machines/thumbs/webp/hd/@(photo).webp, /assets/photos/machines/thumbs/webp/1440p/@(photo).webp 2x, /assets/photos/machines/thumbs/webp/4k/@(photo).webp 3x">
|
<source srcset="/assets/photos/machines/thumbs/webp/hd/@(photo).webp, /assets/photos/machines/thumbs/webp/1440p/@(photo).webp 2x, /assets/photos/machines/thumbs/webp/4k/@(photo).webp 3x" type="image/webp">
|
||||||
<source type="image/jp2" srcset="/assets/photos/machines/thumbs/jp2k/hd/@(photo).jp2, /assets/photos/machines/thumbs/jp2k/1440p/@(photo).jp2 2x, /assets/photos/machines/thumbs/jp2k/4k/@(photo).jp2 3x">
|
<source srcset="/assets/photos/machines/thumbs/jp2k/hd/@(photo).jp2, /assets/photos/machines/thumbs/jp2k/1440p/@(photo).jp2 2x, /assets/photos/machines/thumbs/jp2k/4k/@(photo).jp2 3x" type="image/jp2">
|
||||||
<img class="figure-img img-fluid rounded" srcset="/assets/photos/machines/thumbs/jpeg/hd/@(photo).jpg, /assets/photos/machines/thumbs/jpeg/1440p/@(photo).jpg 2x, /assets/photos/machines/thumbs/jpeg/4k/@(photo).jpg 3x" src="/assets/photos/machines/thumbs/jpeg/hd/@(photo).jpg" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
<img alt="" class="figure-img img-fluid rounded" height="auto" src="/assets/photos/machines/thumbs/jpeg/hd/@(photo).jpg" srcset="/assets/photos/machines/thumbs/jpeg/hd/@(photo).jpg, /assets/photos/machines/thumbs/jpeg/1440p/@(photo).jpg 2x, /assets/photos/machines/thumbs/jpeg/4k/@(photo).jpg 3x" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</picture>
|
</picture>
|
||||||
<figcaption class="figure-caption">
|
<figcaption class="figure-caption">
|
||||||
<a href="/admin/machines/photo/details/@photo" target="_blank">@L["Details"]</a></figcaption>
|
<a href="/admin/machines/photo/details/@photo" target="_blank">@L["Details"]</a>
|
||||||
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,53 +33,51 @@
|
|||||||
@inject IStringLocalizer<MachineFamiliesService> L
|
@inject IStringLocalizer<MachineFamiliesService> L
|
||||||
@inject CompaniesService CompaniesService
|
@inject CompaniesService CompaniesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Machine family details"]</h3>
|
<h3>@L["Machine family details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="int" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<FieldHelp>@L["Must not contain \"family\" or \"series\". Different regional names should be separated with /. Different numbers should be separated with comma."]</FieldHelp>
|
<FieldHelp>@L["Must not contain \"family\" or \"series\". Different regional names should be separated with /. Different numbers should be separated with comma."]</FieldHelp>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/machine_families" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/machine_families">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
@page "/admin/magazines/details/{Id:long}"
|
@page "/admin/magazines/details/{Id:long}"
|
||||||
@page "/admin/magazines/edit/{Id:long}"
|
@page "/admin/magazines/edit/{Id:long}"
|
||||||
@page "/admin/magazines/create"
|
@page "/admin/magazines/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MagazinesService>
|
@inherits OwningComponentBase<MagazinesService>
|
||||||
@inject IStringLocalizer<MagazinesService> L
|
@inject IStringLocalizer<MagazinesService> L
|
||||||
@@ -39,158 +38,155 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Magazine details"]</h3>
|
<h3>@L["Magazine details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Title using latin script"]</FieldLabel>
|
<FieldLabel>@L["Title using latin script"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateTitle">
|
<Validation Validator="@ValidateTitle">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Title">
|
<TextEdit @bind-Text="@_model.Title" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid title."]</ValidationError>
|
<ValidationError>@L["Please enter a valid title."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.NativeTitle != null)
|
@if(_editing || _model.NativeTitle != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Native title, that is, title using native script (cyrillic, chinese, etc)"]</FieldLabel>
|
<FieldLabel>@L["Native title, that is, title using native script (cyrillic, chinese, etc)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownNativeTitle">@L["Unknown (native title)"]</Check>
|
<Check @bind-Checked="@_unknownNativeTitle" @TValue="bool">@L["Unknown (native title)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownNativeTitle)
|
!_unknownNativeTitle)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateNativeTitle">
|
<Validation Validator="@ValidateNativeTitle">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.NativeTitle">
|
<TextEdit @bind-Text="@_model.NativeTitle" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid native title."]</ValidationError>
|
<ValidationError>@L["Please enter a valid native title."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.FirstPublication != null)
|
@if(_editing || _model.FirstPublication != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["First publication"]</FieldLabel>
|
<FieldLabel>@L["First publication"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFirstPublication">@L["Unknown (first publication date)"]</Check>
|
<Check @bind-Checked="@_unknownFirstPublication" @TValue="bool">@L["Unknown (first publication date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownFirstPublication)
|
@if(!_editing ||
|
||||||
|
!_unknownFirstPublication)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFirstPublication">
|
<Validation Validator="@ValidateFirstPublication">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.FirstPublication" >
|
<DateEdit @bind-Date="@_model.FirstPublication" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid first publication date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid first publication date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.CountryId != null)
|
@if(_editing || _model.CountryId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Country of publication"]</FieldLabel>
|
<FieldLabel>@L["Country of publication"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCountry">@L["Unknown (country of publication)"]</Check>
|
<Check @bind-Checked="@_unknownCountry" @TValue="bool">@L["Unknown (country of publication)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCountry)
|
!_unknownCountry)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="short?" @bind-SelectedValue="@_model.CountryId">
|
<Select @bind-SelectedValue="@_model.CountryId" Disabled="!_editing" @TValue="short?">
|
||||||
@foreach (var country in _countries)
|
@foreach(var country in _countries)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="short?" Value="@country.Id">@country.Name</SelectItem>
|
<SelectItem @TValue="short?" Value="@country.Id">@country.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Issn != null)
|
@if(_editing || _model.Issn != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["ISSN"]</FieldLabel>
|
<FieldLabel>@L["ISSN"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownIssn">@L["Unknown (ISSN)"]</Check>
|
<Check @bind-Checked="@_unknownIssn" @TValue="bool">@L["Unknown (ISSN)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownIssn)
|
!_unknownIssn)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIssn">
|
<Validation Validator="@ValidateIssn">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Issn">
|
<TextEdit @bind-Text="@_model.Issn" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid ISSN."]</ValidationError>
|
<ValidationError>@L["Please enter a valid ISSN."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/magazines" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/magazines">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Companies involved in this magazine"]</h3>
|
<h3>@L["Companies involved in this magazine"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddCompanyClick" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
<Button Clicked="OnAddCompanyClick" Color="Color.Success" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
||||||
@if (_addingCompany)
|
@if(_addingCompany)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="_savingCompany" TValue="int?" @bind-SelectedValue="@_addingCompanyId">
|
<Select @bind-SelectedValue="@_addingCompanyId" Disabled="_savingCompany" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Role"]</FieldLabel>
|
<FieldLabel>@L["Role"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_addingCompanyRoleId">
|
<Select @bind-SelectedValue="@_addingCompanyRoleId" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var role in _roles)
|
@foreach(var role in _roles)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddCompany" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddCompany" Color="Color.Primary" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddCompany" Disabled="@_savingCompany">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddCompany" Color="Color.Success" Disabled="@_savingCompany">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_magazineCompanies?.Count > 0)
|
@if(_magazineCompanies?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -206,7 +202,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _magazineCompanies)
|
@foreach(var item in _magazineCompanies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -216,7 +212,7 @@
|
|||||||
@item.Role
|
@item.Role
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Disabled="@_addingCompany">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingCompany">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -225,7 +221,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -236,9 +232,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -743,7 +743,7 @@ namespace Marechai.Pages.Admin.Details
|
|||||||
{
|
{
|
||||||
await outFs.WriteAsync(buffer, 0, count);
|
await outFs.WriteAsync(buffer, 0, count);
|
||||||
|
|
||||||
double progress = ((double)fs.Position * 100) / fs.Length;
|
double progress = (double)fs.Position * 100 / fs.Length;
|
||||||
|
|
||||||
if(!(progress > lastProgress + 0.01))
|
if(!(progress > lastProgress + 0.01))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,227 +33,226 @@
|
|||||||
@inject IStringLocalizer<PeopleService> L
|
@inject IStringLocalizer<PeopleService> L
|
||||||
@inject Iso31661NumericService CountriesService
|
@inject Iso31661NumericService CountriesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Person details"]</h3>
|
<h3>@L["Person details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.Name != null)
|
@if(_editing || _model.Name != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownName">@L["Unknown (name)"]</Check>
|
<Check @bind-Checked="@_unknownName" @TValue="bool">@L["Unknown (name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownName)
|
!_unknownName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Surname != null)
|
@if(_editing || _model.Surname != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Surname"]</FieldLabel>
|
<FieldLabel>@L["Surname"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSurname">@L["Unknown (surname)"]</Check>
|
<Check @bind-Checked="@_unknownSurname" @TValue="bool">@L["Unknown (surname)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSurname)
|
!_unknownSurname)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateSurname">
|
<Validation Validator="@ValidateSurname">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Surname">
|
<TextEdit @bind-Text="@_model.Surname" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid surname."]</ValidationError>
|
<ValidationError>@L["Please enter a valid surname."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Alias != null)
|
@if(_editing || _model.Alias != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Alias"]</FieldLabel>
|
<FieldLabel>@L["Alias"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownAlias">@L["Unknown (alias)"]</Check>
|
<Check @bind-Checked="@_unknownAlias" @TValue="bool">@L["Unknown (alias)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownAlias)
|
!_unknownAlias)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateAlias">
|
<Validation Validator="@ValidateAlias">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Alias">
|
<TextEdit @bind-Text="@_model.Alias" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid alias."]</ValidationError>
|
<ValidationError>@L["Please enter a valid alias."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.DisplayName != null)
|
@if(_editing || _model.DisplayName != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Display name"]</FieldLabel>
|
<FieldLabel>@L["Display name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDisplayName">@L["Unknown (display name)"]</Check>
|
<Check @bind-Checked="@_unknownDisplayName" @TValue="bool">@L["Unknown (display name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDisplayName)
|
!_unknownDisplayName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDisplayName">
|
<Validation Validator="@ValidateDisplayName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.DisplayName">
|
<TextEdit @bind-Text="@_model.DisplayName" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid display name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid display name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.CountryOfBirthId != null)
|
@if(_editing || _model.CountryOfBirthId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Country of birth"]</FieldLabel>
|
<FieldLabel>@L["Country of birth"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCountry">@L["Unknown (country of birth)"]</Check>
|
<Check @bind-Checked="@_unknownCountry" @TValue="bool">@L["Unknown (country of birth)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCountry)
|
!_unknownCountry)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="short?" @bind-SelectedValue="@_model.CountryOfBirthId">
|
<Select @bind-SelectedValue="@_model.CountryOfBirthId" Disabled="!_editing" @TValue="short?">
|
||||||
@foreach (var country in _countries)
|
@foreach(var country in _countries)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="short?" Value="@country.Id">@country.Name</SelectItem>
|
<SelectItem @TValue="short?" Value="@country.Id">@country.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Birth date"]</FieldLabel>
|
<FieldLabel>@L["Birth date"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateBirthDate">
|
<Validation Validator="@ValidateBirthDate">
|
||||||
<DateEdit TValue="DateTime" ReadOnly="!_editing" @bind-Date="@_model.BirthDate" >
|
<DateEdit @bind-Date="@_model.BirthDate" ReadOnly="!_editing" @TValue="DateTime">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid birth date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid birth date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.DeathDate != null)
|
@if(_editing || _model.DeathDate != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Date of death"]</FieldLabel>
|
<FieldLabel>@L["Date of death"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDeathDate">@L["Unknown (death date)"]</Check>
|
<Check @bind-Checked="@_unknownDeathDate" @TValue="bool">@L["Unknown (death date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownDeathDate)
|
@if(!_editing ||
|
||||||
|
!_unknownDeathDate)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDeathDate">
|
<Validation Validator="@ValidateDeathDate">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.DeathDate" >
|
<DateEdit @bind-Date="@_model.DeathDate" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid death date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid death date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Webpage != null)
|
@if(_editing || _model.Webpage != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Webpage"]</FieldLabel>
|
<FieldLabel>@L["Webpage"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownWebpage">@L["Unknown (webpage)"]</Check>
|
<Check @bind-Checked="@_unknownWebpage" @TValue="bool">@L["Unknown (webpage)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownWebpage)
|
!_unknownWebpage)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateWebpage">
|
<Validation Validator="@ValidateWebpage">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Webpage">
|
<TextEdit @bind-Text="@_model.Webpage" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid webpage."]</ValidationError>
|
<ValidationError>@L["Please enter a valid webpage."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Twitter != null)
|
@if(_editing || _model.Twitter != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Twitter"]</FieldLabel>
|
<FieldLabel>@L["Twitter"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownTwitter">@L["Unknown (twitter)"]</Check>
|
<Check @bind-Checked="@_unknownTwitter" @TValue="bool">@L["Unknown (twitter)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownTwitter)
|
!_unknownTwitter)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateTwitter">
|
<Validation Validator="@ValidateTwitter">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Twitter">
|
<TextEdit @bind-Text="@_model.Twitter" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid Twitter handle."]</ValidationError>
|
<ValidationError>@L["Please enter a valid Twitter handle."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Facebook != null)
|
@if(_editing || _model.Facebook != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Facebook"]</FieldLabel>
|
<FieldLabel>@L["Facebook"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFacebook">@L["Unknown (facebook)"]</Check>
|
<Check @bind-Checked="@_unknownFacebook" @TValue="bool">@L["Unknown (facebook)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownFacebook)
|
!_unknownFacebook)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFacebook">
|
<Validation Validator="@ValidateFacebook">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Facebook">
|
<TextEdit @bind-Text="@_model.Facebook" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid Facebook user name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid Facebook user name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/people" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/people">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -36,579 +36,553 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject InstructionSetExtensionsByProcessorService InstructionSetExtensionsByProcessorService
|
@inject InstructionSetExtensionsByProcessorService InstructionSetExtensionsByProcessorService
|
||||||
@inject InstructionSetExtensionsService InstructionSetExtensionsService
|
@inject InstructionSetExtensionsService InstructionSetExtensionsService
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Processor details"]</h3>
|
<h3>@L["Processor details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.CompanyId != null)
|
@if(_editing || _model.CompanyId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCompany">@L["Unknown (company)"]</Check>
|
<Check @bind-Checked="@_unknownCompany" @TValue="bool">@L["Unknown (company)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCompany)
|
!_unknownCompany)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
<Field>
|
||||||
<Field>
|
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.ModelCode != null)
|
@if(_editing || _model.ModelCode != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Model code"]</FieldLabel>
|
<FieldLabel>@L["Model code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownModelCode">@L["Unknown (model code)"]</Check>
|
<Check @bind-Checked="@_unknownModelCode" @TValue="bool">@L["Unknown (model code)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownModelCode)
|
!_unknownModelCode)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateModelCode">
|
<Validation Validator="@ValidateModelCode">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.ModelCode">
|
<TextEdit @bind-Text="@_model.ModelCode" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Introduced.HasValue)
|
||||||
@if (_editing || _model.Introduced.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" Disabled="_prototype" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" Disabled="_prototype" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
<Check TValue="bool" Disabled="_unknownIntroduced" @bind-Checked="@_prototype">@L["Prototype"]</Check>
|
<Check @bind-Checked="@_prototype" Disabled="_unknownIntroduced" @TValue="bool">@L["Prototype"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
(!_prototype && !_unknownIntroduced))
|
!_prototype && !_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime?" @bind-Date="@_model.Introduced">
|
<DateEdit @bind-Date="@_model.Introduced" Disabled="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.InstructionSetId != null)
|
||||||
@if (_editing || _model.InstructionSetId != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Instruction set"]</FieldLabel>
|
<FieldLabel>@L["Instruction set"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownInstructionSet">@L["Unknown (instruction set)"]</Check>
|
<Check @bind-Checked="@_unknownInstructionSet" @TValue="bool">@L["Unknown (instruction set)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownInstructionSet)
|
!_unknownInstructionSet)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.InstructionSetId">
|
<Select @bind-SelectedValue="@_model.InstructionSetId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var instructionSet in _instructionSets)
|
@foreach(var instructionSet in _instructionSets)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@instructionSet.Id">@instructionSet.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@instructionSet.Id">@instructionSet.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Speed.HasValue)
|
||||||
@if (_editing || _model.Speed.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Nominal speed (MHz)"]</FieldLabel>
|
<FieldLabel>@L["Nominal speed (MHz)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSpeed">@L["Unknown (nominal speed)"]</Check>
|
<Check @bind-Checked="@_unknownSpeed" @TValue="bool">@L["Unknown (nominal speed)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSpeed)
|
!_unknownSpeed)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="double?" Decimals="3" @bind-Value="@_model.Speed">
|
<NumericEdit @bind-Value="@_model.Speed" Decimals="3" Disabled="!_editing" @TValue="double?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid nominal speed."]</ValidationError>
|
<ValidationError>@L["Please enter a valid nominal speed."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Package != null)
|
||||||
@if (_editing || _model.Package != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Package"]</FieldLabel>
|
<FieldLabel>@L["Package"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPackage">@L["Unknown (package)"]</Check>
|
<Check @bind-Checked="@_unknownPackage" @TValue="bool">@L["Unknown (package)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownPackage)
|
!_unknownPackage)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidatePackage">
|
<Validation Validator="@ValidatePackage">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Package">
|
<TextEdit @bind-Text="@_model.Package" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid package."]</ValidationError>
|
<ValidationError>@L["Please enter a valid package."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Gprs.HasValue)
|
||||||
@if (_editing || _model.Gprs.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["General Purpose Registers"]</FieldLabel>
|
<FieldLabel>@L["General Purpose Registers"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownGprs">@L["Unknown (general purpose registers)"]</Check>
|
<Check @bind-Checked="@_unknownGprs" @TValue="bool">@L["Unknown (general purpose registers)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownGprs)
|
!_unknownGprs)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Gprs">
|
<NumericEdit @bind-Value="@_model.Gprs" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of general purpose registers."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of general purpose registers."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.GprSize.HasValue)
|
||||||
@if (_editing || _model.GprSize.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["General Purpose Register size"]</FieldLabel>
|
<FieldLabel>@L["General Purpose Register size"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownGprSize">@L["Unknown (general purpose register size)"]</Check>
|
<Check @bind-Checked="@_unknownGprSize" @TValue="bool">@L["Unknown (general purpose register size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownGprSize)
|
!_unknownGprSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.GprSize">
|
<NumericEdit @bind-Value="@_model.GprSize" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid general purpose register size."]</ValidationError>
|
<ValidationError>@L["Please enter a valid general purpose register size."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Fprs.HasValue)
|
||||||
@if (_editing || _model.Fprs.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Floating Point Registers"]</FieldLabel>
|
<FieldLabel>@L["Floating Point Registers"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFprs">@L["Unknown (floating point registers)"]</Check>
|
<Check @bind-Checked="@_unknownFprs" @TValue="bool">@L["Unknown (floating point registers)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownFprs)
|
!_unknownFprs)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Fprs">
|
<NumericEdit @bind-Value="@_model.Fprs" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of floating point registers."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of floating point registers."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<FieldHelp>@L["If set to zero, but with a size, indicates floating point instructions use the general purpose registers."]</FieldHelp>
|
<FieldHelp>@L["If set to zero, but with a size, indicates floating point instructions use the general purpose registers."]</FieldHelp>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.FprSize.HasValue)
|
||||||
@if (_editing || _model.FprSize.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Floating Point Register size"]</FieldLabel>
|
<FieldLabel>@L["Floating Point Register size"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownFprSize">@L["Unknown (floating point register size)"]</Check>
|
<Check @bind-Checked="@_unknownFprSize" @TValue="bool">@L["Unknown (floating point register size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownFprSize)
|
!_unknownFprSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.FprSize">
|
<NumericEdit @bind-Value="@_model.FprSize" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid floating point register size."]</ValidationError>
|
<ValidationError>@L["Please enter a valid floating point register size."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.SimdRegisters.HasValue)
|
||||||
@if (_editing || _model.SimdRegisters.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["SIMD Registers"]</FieldLabel>
|
<FieldLabel>@L["SIMD Registers"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSimdRegisters">@L["Unknown (simd registers)"]</Check>
|
<Check @bind-Checked="@_unknownSimdRegisters" @TValue="bool">@L["Unknown (simd registers)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSimdRegisters)
|
!_unknownSimdRegisters)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.SimdRegisters">
|
<NumericEdit @bind-Value="@_model.SimdRegisters" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of SIMD registers."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of SIMD registers."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<FieldHelp>@L["If set to zero, but with a size, indicates SIMD instructions use the floating point registers. If they are also set to zero with a size, it means SIMD instructions use the general purpose registers."]</FieldHelp>
|
<FieldHelp>@L["If set to zero, but with a size, indicates SIMD instructions use the floating point registers. If they are also set to zero with a size, it means SIMD instructions use the general purpose registers."]</FieldHelp>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.SimdSize.HasValue)
|
||||||
@if (_editing || _model.SimdSize.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["SIMD Register size"]</FieldLabel>
|
<FieldLabel>@L["SIMD Register size"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSimdSize">@L["Unknown (simd register size)"]</Check>
|
<Check @bind-Checked="@_unknownSimdSize" @TValue="bool">@L["Unknown (simd register size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSimdSize)
|
!_unknownSimdSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.SimdSize">
|
<NumericEdit @bind-Value="@_model.SimdSize" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid SIMD register size."]</ValidationError>
|
<ValidationError>@L["Please enter a valid SIMD register size."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Cores.HasValue)
|
||||||
@if (_editing || _model.Cores.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Cores"]</FieldLabel>
|
<FieldLabel>@L["Cores"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCores">@L["Unknown (cores)"]</Check>
|
<Check @bind-Checked="@_unknownCores" @TValue="bool">@L["Unknown (cores)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCores)
|
!_unknownCores)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Cores">
|
<NumericEdit @bind-Value="@_model.Cores" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of cores."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of cores."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.ThreadsPerCore.HasValue)
|
||||||
@if (_editing || _model.ThreadsPerCore.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Threads per core"]</FieldLabel>
|
<FieldLabel>@L["Threads per core"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownThreadsPerCore">@L["Unknown (threads per core)"]</Check>
|
<Check @bind-Checked="@_unknownThreadsPerCore" @TValue="bool">@L["Unknown (threads per core)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownThreadsPerCore)
|
!_unknownThreadsPerCore)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.ThreadsPerCore">
|
<NumericEdit @bind-Value="@_model.ThreadsPerCore" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of threads per core."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of threads per core."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Process != null)
|
||||||
@if (_editing || _model.Process != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Process"]</FieldLabel>
|
<FieldLabel>@L["Process"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProcess">@L["Unknown (process)"]</Check>
|
<Check @bind-Checked="@_unknownProcess" @TValue="bool">@L["Unknown (process)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownProcess)
|
!_unknownProcess)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateProcess">
|
<Validation Validator="@ValidateProcess">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Process">
|
<TextEdit @bind-Text="@_model.Process" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid process."]</ValidationError>
|
<ValidationError>@L["Please enter a valid process."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.ProcessNm.HasValue)
|
||||||
@if (_editing || _model.ProcessNm.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Process (nm)"]</FieldLabel>
|
<FieldLabel>@L["Process (nm)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProcessNm">@L["Unknown (process size)"]</Check>
|
<Check @bind-Checked="@_unknownProcessNm" @TValue="bool">@L["Unknown (process size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownProcessNm)
|
!_unknownProcessNm)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanOne">
|
<Validation Validator="@ValidateFloatBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="2" @bind-Value="@_model.ProcessNm">
|
<NumericEdit @bind-Value="@_model.ProcessNm" Decimals="2" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid process size in nanometers."]</ValidationError>
|
<ValidationError>@L["Please enter a valid process size in nanometers."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.DieSize.HasValue)
|
||||||
@if (_editing || _model.DieSize.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Die size (mm²)"]</FieldLabel>
|
<FieldLabel>@L["Die size (mm²)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDieSize">@L["Unknown (die size)"]</Check>
|
<Check @bind-Checked="@_unknownDieSize" @TValue="bool">@L["Unknown (die size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDieSize)
|
!_unknownDieSize)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanOne">
|
<Validation Validator="@ValidateFloatBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="2" @bind-Value="@_model.DieSize">
|
<NumericEdit @bind-Value="@_model.DieSize" Decimals="2" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid die size in square millimeters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid die size in square millimeters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Transistors.HasValue)
|
||||||
@if (_editing || _model.Transistors.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Transistors"]</FieldLabel>
|
<FieldLabel>@L["Transistors"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownTransistors">@L["Unknown (transistors)"]</Check>
|
<Check @bind-Checked="@_unknownTransistors" @TValue="bool">@L["Unknown (transistors)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownTransistors)
|
!_unknownTransistors)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLongBiggerThanZero">
|
<Validation Validator="@ValidateLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="long?" Decimals="0" @bind-Value="@_model.Transistors">
|
<NumericEdit @bind-Value="@_model.Transistors" Decimals="0" Disabled="!_editing" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of transistors."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of transistors."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.DataBus.HasValue)
|
||||||
@if (_editing || _model.DataBus.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Data bus size"]</FieldLabel>
|
<FieldLabel>@L["Data bus size"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownDataBus">@L["Unknown (data bus size)"]</Check>
|
<Check @bind-Checked="@_unknownDataBus" @TValue="bool">@L["Unknown (data bus size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownDataBus)
|
!_unknownDataBus)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.DataBus">
|
<NumericEdit @bind-Value="@_model.DataBus" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid data bus size in bits."]</ValidationError>
|
<ValidationError>@L["Please enter a valid data bus size in bits."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.AddrBus.HasValue)
|
||||||
@if (_editing || _model.AddrBus.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Address bus size"]</FieldLabel>
|
<FieldLabel>@L["Address bus size"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownAddressBus">@L["Unknown (address bus size)"]</Check>
|
<Check @bind-Checked="@_unknownAddressBus" @TValue="bool">@L["Unknown (address bus size)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownAddressBus)
|
!_unknownAddressBus)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
<Validation Validator="@ValidateIntegerBiggerThanOne">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.AddrBus">
|
<NumericEdit @bind-Value="@_model.AddrBus" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid address bus size in bits."]</ValidationError>
|
<ValidationError>@L["Please enter a valid address bus size in bits."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.L1Instruction.HasValue)
|
||||||
@if (_editing || _model.L1Instruction.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["L1 instruction cache (KiB)"]</FieldLabel>
|
<FieldLabel>@L["L1 instruction cache (KiB)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownL1Instruction">@L["Unknown (L1 instruction cache)"]</Check>
|
<Check @bind-Checked="@_unknownL1Instruction" @TValue="bool">@L["Unknown (L1 instruction cache)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownL1Instruction)
|
!_unknownL1Instruction)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanZero">
|
<Validation Validator="@ValidateFloatBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="3" @bind-Value="@_model.L1Instruction">
|
<NumericEdit @bind-Value="@_model.L1Instruction" Decimals="3" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid L1 instruction cache size in kibibytes."]</ValidationError>
|
<ValidationError>@L["Please enter a valid L1 instruction cache size in kibibytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.L1Data.HasValue)
|
||||||
@if (_editing || _model.L1Data.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["L1 data cache (KiB)"]</FieldLabel>
|
<FieldLabel>@L["L1 data cache (KiB)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownL1Data">@L["Unknown (L1 data cache)"]</Check>
|
<Check @bind-Checked="@_unknownL1Data" @TValue="bool">@L["Unknown (L1 data cache)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownL1Data)
|
!_unknownL1Data)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanZero">
|
<Validation Validator="@ValidateFloatBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="3" @bind-Value="@_model.L1Data">
|
<NumericEdit @bind-Value="@_model.L1Data" Decimals="3" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid L1 data cache size in kibibytes."]</ValidationError>
|
<ValidationError>@L["Please enter a valid L1 data cache size in kibibytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.L2.HasValue)
|
||||||
@if (_editing || _model.L2.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["L2 cache (KiB)"]</FieldLabel>
|
<FieldLabel>@L["L2 cache (KiB)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownL2">@L["Unknown (L2 cache)"]</Check>
|
<Check @bind-Checked="@_unknownL2" @TValue="bool">@L["Unknown (L2 cache)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownL2)
|
!_unknownL2)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanZero">
|
<Validation Validator="@ValidateFloatBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="3" @bind-Value="@_model.L2">
|
<NumericEdit @bind-Value="@_model.L2" Decimals="3" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid L2 cache size in kibibytes."]</ValidationError>
|
<ValidationError>@L["Please enter a valid L2 cache size in kibibytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.L3.HasValue)
|
||||||
@if (_editing || _model.L3.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["L3 cache (KiB)"]</FieldLabel>
|
<FieldLabel>@L["L3 cache (KiB)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownL3">@L["Unknown (L3 cache)"]</Check>
|
<Check @bind-Checked="@_unknownL3" @TValue="bool">@L["Unknown (L3 cache)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownL3)
|
!_unknownL3)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateFloatBiggerThanZero">
|
<Validation Validator="@ValidateFloatBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="float?" Decimals="3" @bind-Value="@_model.L3">
|
<NumericEdit @bind-Value="@_model.L3" Decimals="3" Disabled="!_editing" @TValue="float?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid L3 cache size in kibibytes."]</ValidationError>
|
<ValidationError>@L["Please enter a valid L3 cache size in kibibytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/processors" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/processors">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Instruction set extensions implemented by this processor"]</h3>
|
<h3>@L["Instruction set extensions implemented by this processor"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddExtensionClick" Disabled="_addingExtension">@L["Add new (instruction set extension)"]</Button>
|
<Button Clicked="OnAddExtensionClick" Color="Color.Success" Disabled="_addingExtension">@L["Add new (instruction set extension)"]</Button>
|
||||||
@if (_addingExtension)
|
@if(_addingExtension)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Instruction set extensions"]</FieldLabel>
|
<FieldLabel>@L["Instruction set extensions"]</FieldLabel>
|
||||||
<Select Disabled="_savingExtension" TValue="int?" @bind-SelectedValue="@_addingExtensionId">
|
<Select @bind-SelectedValue="@_addingExtensionId" Disabled="_savingExtension" @TValue="int?">
|
||||||
@foreach (var extension in _instructionSetExtensions)
|
@foreach(var extension in _instructionSetExtensions)
|
||||||
{
|
{
|
||||||
if (_processorExtensions.All(s => s.ExtensionId != extension.Id))
|
if(_processorExtensions.All(s => s.ExtensionId != extension.Id))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@extension.Id">@extension.Extension</SelectItem>
|
<SelectItem @TValue="int?" Value="@extension.Id">@extension.Extension</SelectItem>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddExtension" Disabled="@_savingExtension">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddExtension" Color="Color.Primary" Disabled="@_savingExtension">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddExtension" Disabled="@_savingExtension">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddExtension" Color="Color.Success" Disabled="@_savingExtension">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_processorExtensions?.Count > 0)
|
@if(_processorExtensions?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -621,14 +595,14 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _processorExtensions)
|
@foreach(var item in _processorExtensions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@item.Extension
|
@item.Extension
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowExtensionDeleteModal(item.Id);}" Disabled="@_addingExtension">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowExtensionDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingExtension">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -637,7 +611,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -648,9 +622,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -32,24 +32,22 @@
|
|||||||
@inherits OwningComponentBase<ResolutionsService>
|
@inherits OwningComponentBase<ResolutionsService>
|
||||||
@inject IStringLocalizer<ResolutionsService> L
|
@inject IStringLocalizer<ResolutionsService> L
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Resolution details"]</h3>
|
<h3>@L["Resolution details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Width (pixels or characters)"]</FieldLabel>
|
<FieldLabel>@L["Width (pixels or characters)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int" @bind-Value="@_model.Width" >
|
<NumericEdit @bind-Value="@_model.Width" Disabled="!_editing" @TValue="int">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid width in pixels or characters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid width in pixels or characters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
@@ -59,71 +57,71 @@
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Height (pixels or characters)"]</FieldLabel>
|
<FieldLabel>@L["Height (pixels or characters)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int" @bind-Value="@_model.Height" >
|
<NumericEdit @bind-Value="@_model.Height" Disabled="!_editing" @TValue="int">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid height in pixels or characters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid height in pixels or characters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Colors.HasValue)
|
@if(_editing || _model.Colors.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Colors"]</FieldLabel>
|
<FieldLabel>@L["Colors"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownColors">@L["Unknown (colors)"]</Check>
|
<Check @bind-Checked="@_unknownColors" @TValue="bool">@L["Unknown (colors)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownColors)
|
!_unknownColors)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLongBiggerThanZero">
|
<Validation Validator="@ValidateLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="long?" Decimals="0" @bind-Value="@_model.Colors" >
|
<NumericEdit @bind-Value="@_model.Colors" Decimals="0" Disabled="!_editing" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of colors."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of colors."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Palette.HasValue)
|
@if(_editing || _model.Palette.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Colors in palette"]</FieldLabel>
|
<FieldLabel>@L["Colors in palette"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPalette">@L["Unknown (colors in palette)"]</Check>
|
<Check @bind-Checked="@_unknownPalette" @TValue="bool">@L["Unknown (colors in palette)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownPalette)
|
!_unknownPalette)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLongBiggerThanZero">
|
<Validation Validator="@ValidateLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="long?" Decimals="0" @bind-Value="@_model.Palette" >
|
<NumericEdit @bind-Value="@_model.Palette" Decimals="0" Disabled="!_editing" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of colors in palette."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of colors in palette."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<Check Disabled="!_editing" TValue="bool" @bind-Checked="@_model.Chars">@L["Resolution is character based (text only)."]</Check>
|
<Check @bind-Checked="@_model.Chars" Disabled="!_editing" @TValue="bool">@L["Resolution is character based (text only)."]</Check>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<Check Disabled="!_editing" TValue="bool" @bind-Checked="@_model.Grayscale">@L["Resolution only has gray colors."]</Check>
|
<Check @bind-Checked="@_model.Grayscale" Disabled="!_editing" @TValue="bool">@L["Resolution only has gray colors."]</Check>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/resolutions" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/resolutions">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -34,162 +34,160 @@
|
|||||||
@inject ResolutionsService ResolutionsService
|
@inject ResolutionsService ResolutionsService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject ResolutionsByScreenService ResolutionsByScreenService
|
@inject ResolutionsByScreenService ResolutionsByScreenService
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Screen details"]</h3>
|
<h3>@L["Screen details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.Width.HasValue)
|
@if(_editing || _model.Width.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Width (mm)"]</FieldLabel>
|
<FieldLabel>@L["Width (mm)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownWidth">@L["Unknown (width)"]</Check>
|
<Check @bind-Checked="@_unknownWidth" @TValue="bool">@L["Unknown (width)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownWidth)
|
!_unknownWidth)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="double?" Decimals="2" @bind-Value="@_model.Width" >
|
<NumericEdit @bind-Value="@_model.Width" Decimals="2" Disabled="!_editing" @TValue="double?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid width in millimeters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid width in millimeters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Height.HasValue)
|
@if(_editing || _model.Height.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Height (mm)"]</FieldLabel>
|
<FieldLabel>@L["Height (mm)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownHeight">@L["Unknown (height)"]</Check>
|
<Check @bind-Checked="@_unknownHeight" @TValue="bool">@L["Unknown (height)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownHeight)
|
!_unknownHeight)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="double?" Decimals="2" @bind-Value="@_model.Height" >
|
<NumericEdit @bind-Value="@_model.Height" Decimals="2" Disabled="!_editing" @TValue="double?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid height in millimeters."]</ValidationError>
|
<ValidationError>@L["Please enter a valid height in millimeters."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Diagonal (inches)"]</FieldLabel>
|
<FieldLabel>@L["Diagonal (inches)"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="double" Decimals="2" @bind-Value="@_model.Diagonal" >
|
<NumericEdit @bind-Value="@_model.Diagonal" Decimals="2" Disabled="!_editing" @TValue="double">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a correct diagonal size in inches."]</ValidationError>
|
<ValidationError>@L["Please enter a correct diagonal size in inches."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.EffectiveColors.HasValue)
|
@if(_editing || _model.EffectiveColors.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Effective colors"]</FieldLabel>
|
<FieldLabel>@L["Effective colors"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownColors">@L["Unknown (effective colors)"]</Check>
|
<Check @bind-Checked="@_unknownColors" @TValue="bool">@L["Unknown (effective colors)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownColors)
|
!_unknownColors)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateLongBiggerThanZero">
|
<Validation Validator="@ValidateLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="long?" Decimals="0" @bind-Value="@_model.EffectiveColors" >
|
<NumericEdit @bind-Value="@_model.EffectiveColors" Decimals="0" Disabled="!_editing" @TValue="long?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a number of effective colors."]</ValidationError>
|
<ValidationError>@L["Please enter a number of effective colors."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Type != null)
|
@if(_editing || _model.Type != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Type"]</FieldLabel>
|
<FieldLabel>@L["Type"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownType">@L["Unknown (type)"]</Check>
|
<Check @bind-Checked="@_unknownType" @TValue="bool">@L["Unknown (type)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownType)
|
!_unknownType)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateType">
|
<Validation Validator="@ValidateType">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Type">
|
<TextEdit @bind-Text="@_model.Type" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid screen type."]</ValidationError>
|
<ValidationError>@L["Please enter a valid screen type."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Native resolution"]</FieldLabel>
|
<FieldLabel>@L["Native resolution"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="int" @bind-SelectedValue="@_model.NativeResolutionId">
|
<Select @bind-SelectedValue="@_model.NativeResolutionId" Disabled="!_editing" @TValue="int">
|
||||||
@foreach (var resolution in _resolutions)
|
@foreach(var resolution in _resolutions)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int" Value="@resolution.Id">@resolution.ToString()</SelectItem>
|
<SelectItem @TValue="int" Value="@resolution.Id">@resolution.ToString()</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/screens" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/screens">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Resolutions supported by this screen"]</h3>
|
<h3>@L["Resolutions supported by this screen"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddResolutionClick" Disabled="_addingResolution">@L["Add new (resolution by screen)"]</Button>
|
<Button Clicked="OnAddResolutionClick" Color="Color.Success" Disabled="_addingResolution">@L["Add new (resolution by screen)"]</Button>
|
||||||
@if (_addingResolution)
|
@if(_addingResolution)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Resolutions"]</FieldLabel>
|
<FieldLabel>@L["Resolutions"]</FieldLabel>
|
||||||
<Select Disabled="_savingResolution" TValue="int?" @bind-SelectedValue="@_addingResolutionId">
|
<Select @bind-SelectedValue="@_addingResolutionId" Disabled="_savingResolution" @TValue="int?">
|
||||||
@foreach (var resolution in _resolutions)
|
@foreach(var resolution in _resolutions)
|
||||||
{
|
{
|
||||||
@if (resolution.Id != _model.NativeResolutionId &&
|
@if(resolution.Id != _model.NativeResolutionId &&
|
||||||
_screenResolutions.All(r => r.ResolutionId != resolution.Id))
|
_screenResolutions.All(r => r.ResolutionId != resolution.Id))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@resolution.Id">@resolution</SelectItem>
|
<SelectItem @TValue="int?" Value="@resolution.Id">@resolution</SelectItem>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddResolution" Disabled="@_savingResolution">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddResolution" Color="Color.Primary" Disabled="@_savingResolution">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddResolution" Disabled="@_savingResolution">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddResolution" Color="Color.Success" Disabled="@_savingResolution">@L["Add"]</Button>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_screenResolutions?.Count > 0)
|
@if(_screenResolutions?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -217,7 +215,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _screenResolutions)
|
@foreach(var item in _screenResolutions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -239,7 +237,7 @@
|
|||||||
@item.Resolution.Grayscale
|
@item.Resolution.Grayscale
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowResolutionDeleteModal(item.Id);}" Disabled="@_addingResolution">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowResolutionDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingResolution">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -248,7 +246,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -259,9 +257,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
@page "/admin/software_families/details/{Id:long}"
|
@page "/admin/software_families/details/{Id:long}"
|
||||||
@page "/admin/software_families/edit/{Id:long}"
|
@page "/admin/software_families/edit/{Id:long}"
|
||||||
@page "/admin/software_families/create"
|
@page "/admin/software_families/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoftwareFamiliesService>
|
@inherits OwningComponentBase<SoftwareFamiliesService>
|
||||||
@inject IStringLocalizer<SoftwareFamiliesService> L
|
@inject IStringLocalizer<SoftwareFamiliesService> L
|
||||||
@@ -38,116 +37,113 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Software family details"]</h3>
|
<h3>@L["Software family details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Introduced != null)
|
@if(_editing || _model.Introduced != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownIntroduced)
|
@if(!_editing ||
|
||||||
|
!_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.Introduced" >
|
<DateEdit @bind-Date="@_model.Introduced" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.ParentId != null)
|
@if(_editing || _model.ParentId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Parent software family"]</FieldLabel>
|
<FieldLabel>@L["Parent software family"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownParent">@L["Unknown or none (parent software family)"]</Check>
|
<Check @bind-Checked="@_unknownParent" @TValue="bool">@L["Unknown or none (parent software family)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownParent)
|
!_unknownParent)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="ulong?" @bind-SelectedValue="@_model.ParentId">
|
<Select @bind-SelectedValue="@_model.ParentId" Disabled="!_editing" @TValue="ulong?">
|
||||||
@foreach (var family in _softwareFamilies)
|
@foreach(var family in _softwareFamilies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong?" Value="@family.Id">@family.Name</SelectItem>
|
<SelectItem @TValue="ulong?" Value="@family.Id">@family.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/software_families" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/software_families">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Companies involved in this software family"]</h3>
|
<h3>@L["Companies involved in this software family"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddCompanyClick" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
<Button Clicked="OnAddCompanyClick" Color="Color.Success" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
||||||
@if (_addingCompany)
|
@if(_addingCompany)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="_savingCompany" TValue="int?" @bind-SelectedValue="@_addingCompanyId">
|
<Select @bind-SelectedValue="@_addingCompanyId" Disabled="_savingCompany" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Role"]</FieldLabel>
|
<FieldLabel>@L["Role"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_addingCompanyRoleId">
|
<Select @bind-SelectedValue="@_addingCompanyRoleId" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var role in _roles)
|
@foreach(var role in _roles)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddCompany" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddCompany" Color="Color.Primary" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddCompany" Disabled="@_savingCompany">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddCompany" Color="Color.Success" Disabled="@_savingCompany">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_softwareFamilyCompanies?.Count > 0)
|
@if(_softwareFamilyCompanies?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -163,7 +159,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareFamilyCompanies)
|
@foreach(var item in _softwareFamilyCompanies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -173,7 +169,7 @@
|
|||||||
@item.Role
|
@item.Role
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Disabled="@_addingCompany">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingCompany">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -182,7 +178,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -193,9 +189,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
@page "/admin/software_variants/details/{Id:long}"
|
@page "/admin/software_variants/details/{Id:long}"
|
||||||
@page "/admin/software_variants/edit/{Id:long}"
|
@page "/admin/software_variants/edit/{Id:long}"
|
||||||
@page "/admin/software_variants/create"
|
@page "/admin/software_variants/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
|
@using Marechai.Database
|
||||||
@inherits OwningComponentBase<SoftwareVariantsService>
|
@inherits OwningComponentBase<SoftwareVariantsService>
|
||||||
@inject IStringLocalizer<SoftwareVariantsService> L
|
@inject IStringLocalizer<SoftwareVariantsService> L
|
||||||
@inject SoftwareVersionsService SoftwareVersionsService
|
@inject SoftwareVersionsService SoftwareVersionsService
|
||||||
@@ -40,317 +40,303 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Software variant details"]</h3>
|
<h3>@L["Software variant details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Software version"]</FieldLabel>
|
<FieldLabel>@L["Software version"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="ulong" @bind-SelectedValue="@_model.SoftwareVersionId">
|
<Select @bind-SelectedValue="@_model.SoftwareVersionId" Disabled="!_editing" @TValue="ulong">
|
||||||
@foreach (var version in _softwareVersions)
|
@foreach(var version in _softwareVersions)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong" Value="@version.Id">@version.Name ?? @version.Version</SelectItem>
|
<SelectItem @TValue="ulong" Value="@version.Id">@version.Name ?? @version.Version</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Name != null)
|
@if(_editing || _model.Name != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name, if different from software version name"]</FieldLabel>
|
<FieldLabel>@L["Name, if different from software version name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownName">@L["Unknown (name)"]</Check>
|
<Check @bind-Checked="@_unknownName" @TValue="bool">@L["Unknown (name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownName)
|
!_unknownName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Version != null)
|
||||||
@if (_editing || _model.Version != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Version, if different from software version's"]</FieldLabel>
|
<FieldLabel>@L["Version, if different from software version's"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownVersion">@L["Unknown (version)"]</Check>
|
<Check @bind-Checked="@_unknownVersion" @TValue="bool">@L["Unknown (version)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownVersion)
|
!_unknownVersion)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateVersion">
|
<Validation Validator="@ValidateVersion">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Version">
|
<TextEdit @bind-Text="@_model.Version" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid version."]</ValidationError>
|
<ValidationError>@L["Please enter a valid version."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.Introduced != null)
|
||||||
@if (_editing || _model.Introduced != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownIntroduced)
|
@if(!_editing ||
|
||||||
|
!_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.Introduced" >
|
<DateEdit @bind-Date="@_model.Introduced" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.ParentId != null)
|
||||||
@if (_editing || _model.ParentId != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Parent"]</FieldLabel>
|
<FieldLabel>@L["Parent"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownParent">@L["Unknown or none (parent variant)"]</Check>
|
<Check @bind-Checked="@_unknownParent" @TValue="bool">@L["Unknown or none (parent variant)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownParent)
|
!_unknownParent)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="ulong?" @bind-SelectedValue="@_model.ParentId">
|
<Select @bind-SelectedValue="@_model.ParentId" Disabled="!_editing" @TValue="ulong?">
|
||||||
@foreach (var variant in _softwareVariants)
|
@foreach(var variant in _softwareVariants)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong?" Value="@variant.Id">@variant.Name ?? @variant.Version</SelectItem>
|
<SelectItem @TValue="ulong?" Value="@variant.Id">@variant.Name ?? @variant.Version</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.MinimumMemory.HasValue)
|
||||||
@if (_editing || _model.MinimumMemory.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Minimum memory (bytes)"]</FieldLabel>
|
<FieldLabel>@L["Minimum memory (bytes)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownMinimumMemory">@L["Unknown (minimum memory)"]</Check>
|
<Check @bind-Checked="@_unknownMinimumMemory" @TValue="bool">@L["Unknown (minimum memory)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownMinimumMemory)
|
!_unknownMinimumMemory)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="ulong?" Decimals="0" @bind-Value="@_model.MinimumMemory">
|
<NumericEdit @bind-Value="@_model.MinimumMemory" Decimals="0" Disabled="!_editing" @TValue="ulong?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter the minimum memory size in bytes."]</ValidationError>
|
<ValidationError>@L["Please enter the minimum memory size in bytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.RecommendedMemory.HasValue)
|
||||||
@if (_editing || _model.RecommendedMemory.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Recommended memory (bytes)"]</FieldLabel>
|
<FieldLabel>@L["Recommended memory (bytes)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownRecommendedMemory">@L["Unknown (recommended memory)"]</Check>
|
<Check @bind-Checked="@_unknownRecommendedMemory" @TValue="bool">@L["Unknown (recommended memory)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownRecommendedMemory)
|
!_unknownRecommendedMemory)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="ulong?" Decimals="0" @bind-Value="@_model.RecommendedMemory">
|
<NumericEdit @bind-Value="@_model.RecommendedMemory" Decimals="0" Disabled="!_editing" @TValue="ulong?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter the recommended memory size in bytes."]</ValidationError>
|
<ValidationError>@L["Please enter the recommended memory size in bytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.RequiredStorage.HasValue)
|
||||||
@if (_editing || _model.RequiredStorage.HasValue)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Required storage (bytes)"]</FieldLabel>
|
<FieldLabel>@L["Required storage (bytes)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownRequiredStorage">@L["Unknown (required storage)"]</Check>
|
<Check @bind-Checked="@_unknownRequiredStorage" @TValue="bool">@L["Unknown (required storage)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownRequiredStorage)
|
!_unknownRequiredStorage)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
<Validation Validator="@ValidateUnsignedLongBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="ulong?" Decimals="0" @bind-Value="@_model.RequiredStorage">
|
<NumericEdit @bind-Value="@_model.RequiredStorage" Decimals="0" Disabled="!_editing" @TValue="ulong?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter the required storage size in bytes."]</ValidationError>
|
<ValidationError>@L["Please enter the required storage size in bytes."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.PartNumber != null)
|
||||||
@if (_editing || _model.PartNumber != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Part number"]</FieldLabel>
|
<FieldLabel>@L["Part number"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPartNumber">@L["Unknown (part number)"]</Check>
|
<Check @bind-Checked="@_unknownPartNumber" @TValue="bool">@L["Unknown (part number)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownPartNumber)
|
!_unknownPartNumber)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidatePartNumber">
|
<Validation Validator="@ValidatePartNumber">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.PartNumber">
|
<TextEdit @bind-Text="@_model.PartNumber" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid part number."]</ValidationError>
|
<ValidationError>@L["Please enter a valid part number."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.SerialNumber != null)
|
||||||
@if (_editing || _model.SerialNumber != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Serial number"]</FieldLabel>
|
<FieldLabel>@L["Serial number"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSerialNumber">@L["Unknown (serial number)"]</Check>
|
<Check @bind-Checked="@_unknownSerialNumber" @TValue="bool">@L["Unknown (serial number)"]</Check>
|
||||||
}
|
}
|
||||||
@if(_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
@L["Serial number is NOT the serial number used to install the software, but a serial number some software manufacturers use as SKU."]
|
@L["Serial number is NOT the serial number used to install the software, but a serial number some software manufacturers use as SKU."]
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSerialNumber)
|
!_unknownSerialNumber)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateSerialNumber">
|
<Validation Validator="@ValidateSerialNumber">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.SerialNumber">
|
<TextEdit @bind-Text="@_model.SerialNumber" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid serial number."]</ValidationError>
|
<ValidationError>@L["Please enter a valid serial number."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.ProductCode != null)
|
||||||
@if (_editing || _model.ProductCode != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Product code"]</FieldLabel>
|
<FieldLabel>@L["Product code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownProductCode">@L["Unknown (product code)"]</Check>
|
<Check @bind-Checked="@_unknownProductCode" @TValue="bool">@L["Unknown (product code)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownProductCode)
|
!_unknownProductCode)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateProductCode">
|
<Validation Validator="@ValidateProductCode">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.ProductCode">
|
<TextEdit @bind-Text="@_model.ProductCode" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid product code."]</ValidationError>
|
<ValidationError>@L["Please enter a valid product code."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
@if(_editing || _model.CatalogueNumber != null)
|
||||||
@if (_editing || _model.CatalogueNumber != null)
|
{
|
||||||
{
|
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Catalogue number"]</FieldLabel>
|
<FieldLabel>@L["Catalogue number"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCatalogueNumber">@L["Unknown (catalogue number)"]</Check>
|
<Check @bind-Checked="@_unknownCatalogueNumber" @TValue="bool">@L["Unknown (catalogue number)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCatalogueNumber)
|
!_unknownCatalogueNumber)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateCatalogueNumber">
|
<Validation Validator="@ValidateCatalogueNumber">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.CatalogueNumber">
|
<TextEdit @bind-Text="@_model.CatalogueNumber" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid catalogue number."]</ValidationError>
|
<ValidationError>@L["Please enter a valid catalogue number."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>}
|
||||||
}
|
<Field>
|
||||||
<Field>
|
|
||||||
<FieldLabel>@L["Distribution mode"]</FieldLabel>
|
<FieldLabel>@L["Distribution mode"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="uint" @bind-SelectedValue="@Distribution">
|
<Select @bind-SelectedValue="@Distribution" Disabled="!_editing" @TValue="uint">
|
||||||
@foreach (uint mode in Enum.GetValues(typeof(DistributionMode)))
|
@foreach(uint mode in Enum.GetValues(typeof(DistributionMode)))
|
||||||
{
|
{
|
||||||
<SelectItem TValue="uint" Value="@mode">@(((DistributionMode)mode).ToString())</SelectItem>
|
<SelectItem @TValue="uint" Value="@mode">@(((DistributionMode)mode).ToString())</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/software_variants" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/software_variants">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Companies involved in this software variant"]</h3>
|
<h3>@L["Companies involved in this software variant"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddCompanyClick" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
<Button Clicked="OnAddCompanyClick" Color="Color.Success" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
||||||
@if (_addingCompany)
|
@if(_addingCompany)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="_savingCompany" TValue="int?" @bind-SelectedValue="@_addingCompanyId">
|
<Select @bind-SelectedValue="@_addingCompanyId" Disabled="_savingCompany" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Role"]</FieldLabel>
|
<FieldLabel>@L["Role"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_addingCompanyRoleId">
|
<Select @bind-SelectedValue="@_addingCompanyRoleId" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var role in _roles)
|
@foreach(var role in _roles)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddCompany" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddCompany" Color="Color.Primary" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddCompany" Disabled="@_savingCompany">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddCompany" Color="Color.Success" Disabled="@_savingCompany">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_softwareVariantCompanies?.Count > 0)
|
@if(_softwareVariantCompanies?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -366,7 +352,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareVariantCompanies)
|
@foreach(var item in _softwareVariantCompanies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -376,7 +362,7 @@
|
|||||||
@item.Role
|
@item.Role
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Disabled="@_addingCompany">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingCompany">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -385,7 +371,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -396,9 +382,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
@page "/admin/software_versions/details/{Id:long}"
|
@page "/admin/software_versions/details/{Id:long}"
|
||||||
@page "/admin/software_versions/edit/{Id:long}"
|
@page "/admin/software_versions/edit/{Id:long}"
|
||||||
@page "/admin/software_versions/create"
|
@page "/admin/software_versions/create"
|
||||||
@using Marechai.Database
|
|
||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoftwareVersionsService>
|
@inherits OwningComponentBase<SoftwareVersionsService>
|
||||||
@inject IStringLocalizer<SoftwareVersionsService> L
|
@inject IStringLocalizer<SoftwareVersionsService> L
|
||||||
@@ -40,187 +39,184 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
@inject IJSRuntime JSRuntime
|
@inject IJSRuntime JSRuntime
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
|
|
||||||
|
|
||||||
<h3>@L["Software version details"]</h3>
|
<h3>@L["Software version details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Software family"]</FieldLabel>
|
<FieldLabel>@L["Software family"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="ulong" @bind-SelectedValue="@_model.FamilyId">
|
<Select @bind-SelectedValue="@_model.FamilyId" Disabled="!_editing" @TValue="ulong">
|
||||||
@foreach (var family in _softwareFamilies)
|
@foreach(var family in _softwareFamilies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong" Value="@family.Id">@family.Name</SelectItem>
|
<SelectItem @TValue="ulong" Value="@family.Id">@family.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Version"]</FieldLabel>
|
<FieldLabel>@L["Version"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateVersion">
|
<Validation Validator="@ValidateVersion">
|
||||||
<TextEdit ReadOnly="!_editing" @bind-Text="@_model.Version">
|
<TextEdit @bind-Text="@_model.Version" ReadOnly="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid version."]</ValidationError>
|
<ValidationError>@L["Please enter a valid version."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.Name != null)
|
@if(_editing || _model.Name != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name, if different from family name"]</FieldLabel>
|
<FieldLabel>@L["Name, if different from family name"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownName">@L["Unknown (name)"]</Check>
|
<Check @bind-Checked="@_unknownName" @TValue="bool">@L["Unknown (name)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownName)
|
!_unknownName)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Codename != null)
|
@if(_editing || _model.Codename != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Codename"]</FieldLabel>
|
<FieldLabel>@L["Codename"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCodename">@L["Unknown (codename)"]</Check>
|
<Check @bind-Checked="@_unknownCodename" @TValue="bool">@L["Unknown (codename)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCodename)
|
!_unknownCodename)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateCodename">
|
<Validation Validator="@ValidateCodename">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Codename">
|
<TextEdit @bind-Text="@_model.Codename" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid codename."]</ValidationError>
|
<ValidationError>@L["Please enter a valid codename."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Introduced != null)
|
@if(_editing || _model.Introduced != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing || !_unknownIntroduced)
|
@if(!_editing ||
|
||||||
|
!_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit TValue="DateTime?" ReadOnly="!_editing" @bind-Date="@_model.Introduced" >
|
<DateEdit @bind-Date="@_model.Introduced" ReadOnly="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter a valid introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.LicenseId != null)
|
@if(_editing || _model.LicenseId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["License"]</FieldLabel>
|
<FieldLabel>@L["License"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownLicense">@L["Unknown (license)"]</Check>
|
<Check @bind-Checked="@_unknownLicense" @TValue="bool">@L["Unknown (license)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownLicense)
|
!_unknownLicense)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.LicenseId">
|
<Select @bind-SelectedValue="@_model.LicenseId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var license in _licenses)
|
@foreach(var license in _licenses)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@license.Id">@license.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@license.Id">@license.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.PreviousId != null)
|
@if(_editing || _model.PreviousId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Previous"]</FieldLabel>
|
<FieldLabel>@L["Previous"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownPrevious">@L["Unknown or none (previous version)"]</Check>
|
<Check @bind-Checked="@_unknownPrevious" @TValue="bool">@L["Unknown or none (previous version)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownPrevious)
|
!_unknownPrevious)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="ulong?" @bind-SelectedValue="@_model.PreviousId">
|
<Select @bind-SelectedValue="@_model.PreviousId" Disabled="!_editing" @TValue="ulong?">
|
||||||
@foreach (var version in _softwareVersions)
|
@foreach(var version in _softwareVersions)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="ulong?" Value="@version.Id">@version.Name ?? @version.Version</SelectItem>
|
<SelectItem @TValue="ulong?" Value="@version.Id">@version.Name ?? @version.Version</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/software_versions" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/software_versions">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<hr />
|
<hr />
|
||||||
<h3>@L["Companies involved in this software version"]</h3>
|
<h3>@L["Companies involved in this software version"]</h3>
|
||||||
<Button Color="Color.Success" Clicked="OnAddCompanyClick" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
<Button Clicked="OnAddCompanyClick" Color="Color.Success" Disabled="_addingCompany">@L["Add new (company)"]</Button>
|
||||||
@if (_addingCompany)
|
@if(_addingCompany)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
<Select Disabled="_savingCompany" TValue="int?" @bind-SelectedValue="@_addingCompanyId">
|
<Select @bind-SelectedValue="@_addingCompanyId" Disabled="_savingCompany" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Role"]</FieldLabel>
|
<FieldLabel>@L["Role"]</FieldLabel>
|
||||||
<Select Disabled="!_editing" TValue="string" @bind-SelectedValue="@_addingCompanyRoleId">
|
<Select @bind-SelectedValue="@_addingCompanyRoleId" Disabled="!_editing" @TValue="string">
|
||||||
@foreach (var role in _roles)
|
@foreach(var role in _roles)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
<SelectItem @TValue="string" Value="@role.Id">@role.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
</Field>
|
</Field>
|
||||||
<Button Color="Color.Primary" Clicked="@CancelAddCompany" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
<Button Clicked="@CancelAddCompany" Color="Color.Primary" Disabled="@_savingCompany">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Success" Clicked="@ConfirmAddCompany" Disabled="@_savingCompany">@L["Add"]</Button>
|
<Button Clicked="@ConfirmAddCompany" Color="Color.Success" Disabled="@_savingCompany">@L["Add"]</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_softwareVersionCompanies?.Count > 0)
|
@if(_softwareVersionCompanies?.Count > 0)
|
||||||
{
|
{
|
||||||
<div>
|
<div>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -236,7 +232,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareVersionCompanies)
|
@foreach(var item in _softwareVersionCompanies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -246,7 +242,7 @@
|
|||||||
@item.Role
|
@item.Role
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Disabled="@_addingCompany">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowCompanyDeleteModal(item.Id);}" Color="Color.Danger" Disabled="@_addingCompany">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -255,7 +251,7 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<ModalBackdrop />
|
<ModalBackdrop />
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
@@ -266,9 +262,8 @@
|
|||||||
<Text>@_deleteText</Text>
|
<Text>@_deleteText</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -33,229 +33,227 @@
|
|||||||
@inject IStringLocalizer<SoundSynthsService> L
|
@inject IStringLocalizer<SoundSynthsService> L
|
||||||
@inject CompaniesService CompaniesService
|
@inject CompaniesService CompaniesService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Sound synthesizer details"]</h3>
|
<h3>@L["Sound synthesizer details"]</h3>
|
||||||
<hr />
|
<hr />
|
||||||
|
@if(!_loaded)
|
||||||
@if (!_loaded)
|
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@if (_editing || _model.CompanyId != null)
|
@if(_editing || _model.CompanyId != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Company"]</FieldLabel>
|
<FieldLabel>@L["Company"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownCompany">@L["Unknown (company)"]</Check>
|
<Check @bind-Checked="@_unknownCompany" @TValue="bool">@L["Unknown (company)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownCompany)
|
!_unknownCompany)
|
||||||
{
|
{
|
||||||
<Select Disabled="!_editing" TValue="int?" @bind-SelectedValue="@_model.CompanyId">
|
<Select @bind-SelectedValue="@_model.CompanyId" Disabled="!_editing" @TValue="int?">
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<SelectItem TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
<SelectItem @TValue="int?" Value="@company.Id">@company.Name</SelectItem>
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Name"]</FieldLabel>
|
<FieldLabel>@L["Name"]</FieldLabel>
|
||||||
<Validation Validator="@ValidateName">
|
<Validation Validator="@ValidateName">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.Name">
|
<TextEdit @bind-Text="@_model.Name" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
<ValidationError>@L["Please enter a valid name."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
</Field>
|
</Field>
|
||||||
@if (_editing || _model.ModelCode != null)
|
@if(_editing || _model.ModelCode != null)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Model code"]</FieldLabel>
|
<FieldLabel>@L["Model code"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownModelCode">@L["Unknown (model code)"]</Check>
|
<Check @bind-Checked="@_unknownModelCode" @TValue="bool">@L["Unknown (model code)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownModelCode)
|
!_unknownModelCode)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateModelCode">
|
<Validation Validator="@ValidateModelCode">
|
||||||
<TextEdit Disabled="!_editing" @bind-Text="@_model.ModelCode">
|
<TextEdit @bind-Text="@_model.ModelCode" Disabled="!_editing">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
<ValidationError>@L["Please enter a valid model code."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</TextEdit>
|
</TextEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Introduced.HasValue)
|
@if(_editing || _model.Introduced.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Introduced"]</FieldLabel>
|
<FieldLabel>@L["Introduced"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" Disabled="_prototype" @bind-Checked="@_unknownIntroduced">@L["Unknown (introduction date)"]</Check>
|
<Check @bind-Checked="@_unknownIntroduced" Disabled="_prototype" @TValue="bool">@L["Unknown (introduction date)"]</Check>
|
||||||
<Check TValue="bool" Disabled="_unknownIntroduced" @bind-Checked="@_prototype">@L["Prototype"]</Check>
|
<Check @bind-Checked="@_prototype" Disabled="_unknownIntroduced" @TValue="bool">@L["Prototype"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
(!_prototype && !_unknownIntroduced))
|
!_prototype && !_unknownIntroduced)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntroduced">
|
<Validation Validator="@ValidateIntroduced">
|
||||||
<DateEdit Disabled="!_editing" TValue="DateTime?" @bind-Date="@_model.Introduced">
|
<DateEdit @bind-Date="@_model.Introduced" Disabled="!_editing" @TValue="DateTime?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
<ValidationError>@L["Please enter an introduction date."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</DateEdit>
|
</DateEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Voices.HasValue)
|
@if(_editing || _model.Voices.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Digitized voices"]</FieldLabel>
|
<FieldLabel>@L["Digitized voices"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownVoices">@L["Unknown (voices)"]</Check>
|
<Check @bind-Checked="@_unknownVoices" @TValue="bool">@L["Unknown (voices)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownVoices)
|
!_unknownVoices)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Voices" >
|
<NumericEdit @bind-Value="@_model.Voices" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of voices."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of voices."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Frequency.HasValue)
|
@if(_editing || _model.Frequency.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Sample rate (Hz)"]</FieldLabel>
|
<FieldLabel>@L["Sample rate (Hz)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSampleRate">@L["Unknown (sample rate)"]</Check>
|
<Check @bind-Checked="@_unknownSampleRate" @TValue="bool">@L["Unknown (sample rate)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSampleRate)
|
!_unknownSampleRate)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
<Validation Validator="@ValidateDoubleBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="double?" Decimals="0" @bind-Value="@_model.Frequency" >
|
<NumericEdit @bind-Value="@_model.Frequency" Decimals="0" Disabled="!_editing" @TValue="double?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid sample rate."]</ValidationError>
|
<ValidationError>@L["Please enter a valid sample rate."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Depth.HasValue)
|
@if(_editing || _model.Depth.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Sample resolution (bits)"]</FieldLabel>
|
<FieldLabel>@L["Sample resolution (bits)"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSampleResolution">@L["Unknown (sample resolution)"]</Check>
|
<Check @bind-Checked="@_unknownSampleResolution" @TValue="bool">@L["Unknown (sample resolution)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSampleResolution)
|
!_unknownSampleResolution)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Depth" >
|
<NumericEdit @bind-Value="@_model.Depth" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of bits for sample resolution."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of bits for sample resolution."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.SquareWave.HasValue)
|
@if(_editing || _model.SquareWave.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Square wave channels"]</FieldLabel>
|
<FieldLabel>@L["Square wave channels"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownSquareWaveChannels">@L["Unknown (square wave channels)"]</Check>
|
<Check @bind-Checked="@_unknownSquareWaveChannels" @TValue="bool">@L["Unknown (square wave channels)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownSquareWaveChannels)
|
!_unknownSquareWaveChannels)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.SquareWave" >
|
<NumericEdit @bind-Value="@_model.SquareWave" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of square wave channels."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of square wave channels."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.WhiteNoise.HasValue)
|
@if(_editing || _model.WhiteNoise.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["White noise channels"]</FieldLabel>
|
<FieldLabel>@L["White noise channels"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownWhiteNoiseChannels">@L["Unknown (white noise channels)"]</Check>
|
<Check @bind-Checked="@_unknownWhiteNoiseChannels" @TValue="bool">@L["Unknown (white noise channels)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownWhiteNoiseChannels)
|
!_unknownWhiteNoiseChannels)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.WhiteNoise" >
|
<NumericEdit @bind-Value="@_model.WhiteNoise" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid number of white noise channels."]</ValidationError>
|
<ValidationError>@L["Please enter a valid number of white noise channels."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
@if (_editing || _model.Type.HasValue)
|
@if(_editing || _model.Type.HasValue)
|
||||||
{
|
{
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>@L["Type"]</FieldLabel>
|
<FieldLabel>@L["Type"]</FieldLabel>
|
||||||
@if (_editing)
|
@if(_editing)
|
||||||
{
|
{
|
||||||
<Check TValue="bool" @bind-Checked="@_unknownType">@L["Unknown (type)"]</Check>
|
<Check @bind-Checked="@_unknownType" @TValue="bool">@L["Unknown (type)"]</Check>
|
||||||
}
|
}
|
||||||
@if (!_editing ||
|
@if(!_editing ||
|
||||||
!_unknownType)
|
!_unknownType)
|
||||||
{
|
{
|
||||||
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
<Validation Validator="@ValidateIntegerBiggerThanZero">
|
||||||
<NumericEdit Disabled="!_editing" TValue="int?" Decimals="0" @bind-Value="@_model.Type" >
|
<NumericEdit @bind-Value="@_model.Type" Decimals="0" Disabled="!_editing" @TValue="int?">
|
||||||
<Feedback>
|
<Feedback>
|
||||||
<ValidationError>@L["Please enter a valid sound synthesizer type."]</ValidationError>
|
<ValidationError>@L["Please enter a valid sound synthesizer type."]</ValidationError>
|
||||||
</Feedback>
|
</Feedback>
|
||||||
</NumericEdit>
|
</NumericEdit>
|
||||||
</Validation>
|
</Validation>
|
||||||
}
|
}
|
||||||
</Field>
|
</Field>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if (!_editing)
|
@if(!_editing)
|
||||||
{
|
{
|
||||||
<Button Color="Color.Primary" Clicked="@OnEditClicked">@L["Edit"]</Button>
|
<Button Clicked="@OnEditClicked" Color="Color.Primary">@L["Edit"]</Button>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<Button Color="Color.Success" Clicked="@OnSaveClicked">@L["Save"]</Button>
|
<Button Clicked="@OnSaveClicked" Color="Color.Success">@L["Save"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@OnCancelClicked">@L["Cancel"]</Button>
|
<Button Clicked="@OnCancelClicked" Color="Color.Danger">@L["Cancel"]</Button>
|
||||||
}
|
}
|
||||||
<a href="/admin/sound_synths" class="btn btn-secondary">@L["Back to list"]</a>
|
<a class="btn btn-secondary" href="/admin/sound_synths">@L["Back to list"]</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<DocumentCompaniesService>
|
@inherits OwningComponentBase<DocumentCompaniesService>
|
||||||
@inject IStringLocalizer<DocumentCompaniesService> L
|
@inject IStringLocalizer<DocumentCompaniesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Document companies"]</h3>
|
<h3>@L["Document companies"]</h3>
|
||||||
@if (_companies is null)
|
@if(_companies is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _companies)
|
@foreach(var item in _companies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -69,26 +69,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/document_companies/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/document_companies/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/document_companies/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/document_companies/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete company"]</ModalTitle>
|
<ModalTitle>@L["Delete company"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the company {0}?"], _currentCompany?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the company {0}?"], _currentCompany?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<DocumentPeopleService>
|
@inherits OwningComponentBase<DocumentPeopleService>
|
||||||
@inject IStringLocalizer<DocumentPeopleService> L
|
@inject IStringLocalizer<DocumentPeopleService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Document companies"]</h3>
|
<h3>@L["Document companies"]</h3>
|
||||||
@if (_people is null)
|
@if(_people is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _people)
|
@foreach(var item in _people)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -69,26 +69,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/document_people/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/document_people/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/document_people/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/document_people/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete person"]</ModalTitle>
|
<ModalTitle>@L["Delete person"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _person?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _person?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<DocumentsService>
|
@inherits OwningComponentBase<DocumentsService>
|
||||||
@inject IStringLocalizer<DocumentsService> L
|
@inject IStringLocalizer<DocumentsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Documents"]</h3>
|
<h3>@L["Documents"]</h3>
|
||||||
@if (_documents is null)
|
@if(_documents is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _documents)
|
@foreach(var item in _documents)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -79,26 +79,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/documents/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/documents/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/documents/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/documents/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete document"]</ModalTitle>
|
<ModalTitle>@L["Delete document"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the document {0}?"], _currentDocument?.Title)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the document {0}?"], _currentDocument?.Title)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<DumpsService>
|
@inherits OwningComponentBase<DumpsService>
|
||||||
@inject IStringLocalizer<DumpsService> L
|
@inject IStringLocalizer<DumpsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Dumps"]</h3>
|
<h3>@L["Dumps"]</h3>
|
||||||
@if (_dumps is null)
|
@if(_dumps is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _dumps)
|
@foreach(var item in _dumps)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/dumps/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/dumps/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/dumps/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/dumps/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete dump"]</ModalTitle>
|
<ModalTitle>@L["Delete dump"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the dump made by {0} on {1} for media titled {2}?"], _currentDump?.Dumper, _currentDump?.DumpDate.ToString() ?? L["Unknown (dump date)"], _currentDump?.MediaTitle)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the dump made by {0} on {1} for media titled {2}?"], _currentDump?.Dumper, _currentDump?.DumpDate.ToString() ?? L["Unknown (dump date)"], _currentDump?.MediaTitle)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<GpusService>
|
@inherits OwningComponentBase<GpusService>
|
||||||
@inject IStringLocalizer<GpusService> L
|
@inject IStringLocalizer<GpusService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Graphics Processing Units"]</h3>
|
<h3>@L["Graphics Processing Units"]</h3>
|
||||||
@if (_gpus is null)
|
@if(_gpus is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _gpus)
|
@foreach(var item in _gpus)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -79,26 +79,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/gpus/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/gpus/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/gpus/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/gpus/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete GPU"]</ModalTitle>
|
<ModalTitle>@L["Delete GPU"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0} {1}?"], _gpu?.Company, _gpu?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0} {1}?"], _gpu?.Company, _gpu?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<InstructionSetExtensionsService>
|
@inherits OwningComponentBase<InstructionSetExtensionsService>
|
||||||
@inject IStringLocalizer<InstructionSetExtensionsService> L
|
@inject IStringLocalizer<InstructionSetExtensionsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Instruction set extensions"]</h3>
|
<h3>@L["Instruction set extensions"]</h3>
|
||||||
@if (_extensions is null)
|
@if(_extensions is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _extensions)
|
@foreach(var item in _extensions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -61,26 +61,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/instruction_set_extensions/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/instruction_set_extensions/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/instruction_set_extensions/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/instruction_set_extensions/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete extension"]</ModalTitle>
|
<ModalTitle>@L["Delete extension"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _extension?.Extension)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _extension?.Extension)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<InstructionSetsService>
|
@inherits OwningComponentBase<InstructionSetsService>
|
||||||
@inject IStringLocalizer<InstructionSetsService> L
|
@inject IStringLocalizer<InstructionSetsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Instruction sets"]</h3>
|
<h3>@L["Instruction sets"]</h3>
|
||||||
@if (_instructionSets is null)
|
@if(_instructionSets is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _instructionSets)
|
@foreach(var item in _instructionSets)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -61,26 +61,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/instruction_sets/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/instruction_sets/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/instruction_sets/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/instruction_sets/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete instruction set"]</ModalTitle>
|
<ModalTitle>@L["Delete instruction set"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _instructionSet?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _instructionSet?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<LicensesService>
|
@inherits OwningComponentBase<LicensesService>
|
||||||
@inject IStringLocalizer<LicensesService> L
|
@inject IStringLocalizer<LicensesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Licenses"]</h3>
|
<h3>@L["Licenses"]</h3>
|
||||||
@if (_licenses is null)
|
@if(_licenses is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _licenses)
|
@foreach(var item in _licenses)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
@item.OsiApproved
|
@item.OsiApproved
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Link != null)
|
@if(item.Link != null)
|
||||||
{
|
{
|
||||||
<a href="@item.Link" target="_blank">
|
<a href="@item.Link" target="_blank">
|
||||||
@L["Link"]
|
@L["Link"]
|
||||||
@@ -90,26 +90,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/licenses/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/licenses/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/licenses/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/licenses/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete license"]</ModalTitle>
|
<ModalTitle>@L["Delete license"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _license?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _license?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MachineFamiliesService>
|
@inherits OwningComponentBase<MachineFamiliesService>
|
||||||
@inject IStringLocalizer<MachineFamiliesService> L
|
@inject IStringLocalizer<MachineFamiliesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Machine families"]</h3>
|
<h3>@L["Machine families"]</h3>
|
||||||
@if (_machineFamilies is null)
|
@if(_machineFamilies is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machineFamilies)
|
@foreach(var item in _machineFamilies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -67,26 +67,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/machine_families/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/machine_families/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/machine_families/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/machine_families/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete machine family"]</ModalTitle>
|
<ModalTitle>@L["Delete machine family"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0} {1}?"], _machineFamily?.Company, _machineFamily?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0} {1}?"], _machineFamily?.Company, _machineFamily?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MachinesService>
|
@inherits OwningComponentBase<MachinesService>
|
||||||
@inject IStringLocalizer<MachinesService> L
|
@inject IStringLocalizer<MachinesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Machines"]</h3>
|
<h3>@L["Machines"]</h3>
|
||||||
@if (_machines is null)
|
@if(_machines is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _machines)
|
@foreach(var item in _machines)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -91,26 +91,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/machines/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/machines/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/machines/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/machines/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete machine"]</ModalTitle>
|
<ModalTitle>@L["Delete machine"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0} {1}?"], _machine?.Company, _machine?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0} {1}?"], _machine?.Company, _machine?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MagazineIssuesService>
|
@inherits OwningComponentBase<MagazineIssuesService>
|
||||||
@inject IStringLocalizer<MagazineIssuesService> L
|
@inject IStringLocalizer<MagazineIssuesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Magazine issues"]</h3>
|
<h3>@L["Magazine issues"]</h3>
|
||||||
@if (_magazineIssues is null)
|
@if(_magazineIssues is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _magazineIssues)
|
@foreach(var item in _magazineIssues)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -73,26 +73,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/magazine_issues/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/magazine_issues/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/magazine_issues/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/magazine_issues/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete magazine issue"]</ModalTitle>
|
<ModalTitle>@L["Delete magazine issue"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the magazine issue published on {0} for magazine {1} with caption {2}?"], _currentMagazineIssue?.Published,_currentMagazineIssue?.MagazineTitle,_currentMagazineIssue?.Caption)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the magazine issue published on {0} for magazine {1} with caption {2}?"], _currentMagazineIssue?.Published, _currentMagazineIssue?.MagazineTitle, _currentMagazineIssue?.Caption)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<MagazinesService>
|
@inherits OwningComponentBase<MagazinesService>
|
||||||
@inject IStringLocalizer<MagazinesService> L
|
@inject IStringLocalizer<MagazinesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Magazines"]</h3>
|
<h3>@L["Magazines"]</h3>
|
||||||
@if (_magazines is null)
|
@if(_magazines is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _magazines)
|
@foreach(var item in _magazines)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/magazines/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/magazines/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/magazines/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/magazines/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete magazine"]</ModalTitle>
|
<ModalTitle>@L["Delete magazine"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the magazine {0}?"], _currentMagazine?.Title)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the magazine {0}?"], _currentMagazine?.Title)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<NewsService>
|
@inherits OwningComponentBase<NewsService>
|
||||||
@inject IStringLocalizer<NewsService> L
|
@inject IStringLocalizer<NewsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["News"]</h3>
|
<h3>@L["News"]</h3>
|
||||||
@if (_news is null)
|
@if(_news is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _news)
|
@foreach(var item in _news)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -68,26 +68,25 @@
|
|||||||
@item.AffectedId
|
@item.AffectedId
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete news"]</ModalTitle>
|
<ModalTitle>@L["Delete news"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the news type {0} from {1} that affect artifact ID {2}?"], _currentNews?.Type, _currentNews?.Timestamp, _currentNews?.AffectedId)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the news type {0} from {1} that affect artifact ID {2}?"], _currentNews?.Type, _currentNews?.Timestamp, _currentNews?.AffectedId)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<PeopleService>
|
@inherits OwningComponentBase<PeopleService>
|
||||||
@inject IStringLocalizer<PeopleService> L
|
@inject IStringLocalizer<PeopleService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["People"]</h3>
|
<h3>@L["People"]</h3>
|
||||||
@if (_people is null)
|
@if(_people is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _people)
|
@foreach(var item in _people)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -89,13 +89,13 @@
|
|||||||
@item.Webpage
|
@item.Webpage
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Twitter != null)
|
@if(item.Twitter != null)
|
||||||
{
|
{
|
||||||
<a href="https://twitter.com/@item.Twitter">@item.Twitter</a>
|
<a href="https://twitter.com/@item.Twitter">@item.Twitter</a>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if (item.Facebook != null)
|
@if(item.Facebook != null)
|
||||||
{
|
{
|
||||||
<a href="https://www.facebook.com/@item.Facebook">@item.Facebook</a>
|
<a href="https://www.facebook.com/@item.Facebook">@item.Facebook</a>
|
||||||
}
|
}
|
||||||
@@ -103,26 +103,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/people/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/people/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/edit/details/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/edit/details/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete person"]</ModalTitle>
|
<ModalTitle>@L["Delete person"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _person?.FullName)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _person?.FullName)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<ProcessorsService>
|
@inherits OwningComponentBase<ProcessorsService>
|
||||||
@inject IStringLocalizer<ProcessorsService> L
|
@inject IStringLocalizer<ProcessorsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Processors"]</h3>
|
<h3>@L["Processors"]</h3>
|
||||||
@if (_processors is null)
|
@if(_processors is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _processors)
|
@foreach(var item in _processors)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/processors/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/processors/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/processors/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/processors/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete processor"]</ModalTitle>
|
<ModalTitle>@L["Delete processor"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0}?"], _processor?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0}?"], _processor?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<ResolutionsService>
|
@inherits OwningComponentBase<ResolutionsService>
|
||||||
@inject IStringLocalizer<ResolutionsService> L
|
@inject IStringLocalizer<ResolutionsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Resolutions"]</h3>
|
<h3>@L["Resolutions"]</h3>
|
||||||
@if (_resolutions is null)
|
@if(_resolutions is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _resolutions)
|
@foreach(var item in _resolutions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -91,26 +91,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/resolutions/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/resolutions/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/resolutions/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/resolutions/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete resolution"]</ModalTitle>
|
<ModalTitle>@L["Delete resolution"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(L["Are you sure you want to delete resolution {0}?"], _resolution)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete resolution {0}?"], _resolution)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<ScreensService>
|
@inherits OwningComponentBase<ScreensService>
|
||||||
@inject IStringLocalizer<ScreensService> L
|
@inject IStringLocalizer<ScreensService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Screens"]</h3>
|
<h3>@L["Screens"]</h3>
|
||||||
@if (_screens is null)
|
@if(_screens is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _screens)
|
@foreach(var item in _screens)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -79,26 +79,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/screens/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/screens/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/screens/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/screens/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete screen"]</ModalTitle>
|
<ModalTitle>@L["Delete screen"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete screen of {0}\" size with a resolution of {1} and type {2}?"], _screen?.Diagonal, _screen?.NativeResolution, _screen?.Type)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete screen of {0}\" size with a resolution of {1} and type {2}?"], _screen?.Diagonal, _screen?.NativeResolution, _screen?.Type)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoftwareFamiliesService>
|
@inherits OwningComponentBase<SoftwareFamiliesService>
|
||||||
@inject IStringLocalizer<SoftwareFamiliesService> L
|
@inject IStringLocalizer<SoftwareFamiliesService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Software families"]</h3>
|
<h3>@L["Software families"]</h3>
|
||||||
@if (_softwareFamilies is null)
|
@if(_softwareFamilies is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareFamilies)
|
@foreach(var item in _softwareFamilies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -73,26 +73,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/software_families/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/software_families/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/software_families/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/software_families/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete software family"]</ModalTitle>
|
<ModalTitle>@L["Delete software family"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the software family {0}?"], _currentSoftwareFamily?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the software family {0}?"], _currentSoftwareFamily?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoftwareVariantsService>
|
@inherits OwningComponentBase<SoftwareVariantsService>
|
||||||
@inject IStringLocalizer<SoftwareVariantsService> L
|
@inject IStringLocalizer<SoftwareVariantsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Software variants"]</h3>
|
<h3>@L["Software variants"]</h3>
|
||||||
@if (_softwareVariants is null)
|
@if(_softwareVariants is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareVariants)
|
@foreach(var item in _softwareVariants)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/software_variants/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/software_variants/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/software_variants/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/software_variants/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete software variant"]</ModalTitle>
|
<ModalTitle>@L["Delete software variant"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the software variant {0}?"], _currentSoftwareVariant?.Name ?? _currentSoftwareVariant?.Version)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the software variant {0}?"], _currentSoftwareVariant?.Name ?? _currentSoftwareVariant?.Version)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoftwareVersionsService>
|
@inherits OwningComponentBase<SoftwareVersionsService>
|
||||||
@inject IStringLocalizer<SoftwareVersionsService> L
|
@inject IStringLocalizer<SoftwareVersionsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Software versions"]</h3>
|
<h3>@L["Software versions"]</h3>
|
||||||
@if (_softwareVersions is null)
|
@if(_softwareVersions is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _softwareVersions)
|
@foreach(var item in _softwareVersions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/software_versions/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/software_versions/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/software_versions/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/software_versions/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete software version"]</ModalTitle>
|
<ModalTitle>@L["Delete software version"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete the software version {0}?"], _currentSoftwareVersion?.Name ?? _currentSoftwareVersion?.Version)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete the software version {0}?"], _currentSoftwareVersion?.Name ?? _currentSoftwareVersion?.Version)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
@using Marechai.Database.Models
|
@using Marechai.Database.Models
|
||||||
@inherits OwningComponentBase<SoundSynthsService>
|
@inherits OwningComponentBase<SoundSynthsService>
|
||||||
@inject IStringLocalizer<SoundSynthsService> L
|
@inject IStringLocalizer<SoundSynthsService> L
|
||||||
@inject Microsoft.AspNetCore.Identity.UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
@attribute [Authorize(Roles = "UberAdmin, Admin")]
|
||||||
<h3>@L["Sound synthesizers"]</h3>
|
<h3>@L["Sound synthesizers"]</h3>
|
||||||
@if (_soundSynths is null)
|
@if(_soundSynths is null)
|
||||||
{
|
{
|
||||||
<p>@L["Loading..."]</p>
|
<p>@L["Loading..."]</p>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var item in _soundSynths)
|
@foreach(var item in _soundSynths)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -85,26 +85,25 @@
|
|||||||
<td>
|
<td>
|
||||||
<a class="btn btn-primary" href="/admin/sound_synths/details/@item.Id">@L["Details"]</a>
|
<a class="btn btn-primary" href="/admin/sound_synths/details/@item.Id">@L["Details"]</a>
|
||||||
<a class="btn btn-secondary" href="/admin/sound_synths/edit/@item.Id">@L["Edit"]</a>
|
<a class="btn btn-secondary" href="/admin/sound_synths/edit/@item.Id">@L["Edit"]</a>
|
||||||
<Button Color="Color.Danger" Clicked="() => {ShowModal(item.Id);}">@L["Delete"]</Button>
|
<Button Clicked="() => {ShowModal(item.Id);}" Color="Color.Danger">@L["Delete"]</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<Modal Closing="@ModalClosing" IsCentered="true" ref="_frmDelete">
|
||||||
<Modal @ref="_frmDelete" IsCentered="true" Closing="@ModalClosing">
|
<ModalBackdrop />
|
||||||
<ModalBackdrop/>
|
|
||||||
<ModalContent Centered="true">
|
<ModalContent Centered="true">
|
||||||
<ModalHeader>
|
<ModalHeader>
|
||||||
<ModalTitle>@L["Delete sound synthesizer"]</ModalTitle>
|
<ModalTitle>@L["Delete sound synthesizer"]</ModalTitle>
|
||||||
<CloseButton Clicked="@HideModal"/>
|
<CloseButton Clicked="@HideModal" />
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Text>@string.Format(@L["Are you sure you want to delete {0} {1}?"], _soundSynth?.CompanyName, _soundSynth?.Name)</Text>
|
<Text>@string.Format(L["Are you sure you want to delete {0} {1}?"], _soundSynth?.CompanyName, _soundSynth?.Name)</Text>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button Color="Color.Primary" Clicked="@HideModal" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
<Button Clicked="@HideModal" Color="Color.Primary" Disabled="@_deleteInProgress">@L["Cancel"]</Button>
|
||||||
<Button Color="Color.Danger" Clicked="@ConfirmDelete" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
<Button Clicked="@ConfirmDelete" Color="Color.Danger" Disabled="@_deleteInProgress">@L["Delete"]</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -32,60 +32,61 @@
|
|||||||
@inject IStringLocalizer<CompaniesService> L
|
@inject IStringLocalizer<CompaniesService> L
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
|
|
||||||
@if (_companies is null)
|
@if(_companies is null)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (CountryId.HasValue)
|
@if(CountryId.HasValue)
|
||||||
{
|
{
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<b>@string.Format(L["Companies founded in {0}."], L[_countryName])</b>
|
<b>@string.Format(L["Companies founded in {0}."], L[_countryName])</b>
|
||||||
@if (File.Exists(Path.Combine(Host.WebRootPath, "assets/flags/countries", $"{CountryId:D3}.svg")))
|
@if(File.Exists(Path.Combine(Host.WebRootPath, "assets/flags/countries", $"{CountryId:D3}.svg")))
|
||||||
{
|
{
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/flags/countries/@($"{CountryId:D3}").svg">
|
<source srcset="/assets/flags/countries/@($"{CountryId:D3}").svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp,
|
<source srcset="/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp,
|
||||||
/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp 2x,
|
/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp 2x,
|
||||||
/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp 3x">
|
/assets/flags/countries/webp/1x/@($"{CountryId:D3}").webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/flags/countries/png/1x/@($"{CountryId:D3}").png,
|
<img alt="" height="32" src="/assets/flags/countries/png/1x/@($"{CountryId:D3}").png" srcset="/assets/flags/countries/png/1x/@($"{CountryId:D3}").png,
|
||||||
/assets/flags/countries/png/1x/@($"{CountryId:D3}").png 2x,
|
/assets/flags/countries/png/1x/@($"{CountryId:D3}").png 2x,
|
||||||
/assets/flags/countries/png/1x/@($"{CountryId:D3}").webp 3x" src="/assets/flags/countries/png/1x/@($"{CountryId:D3}").png" alt="" height="32" />
|
/assets/flags/countries/png/1x/@($"{CountryId:D3}").webp 3x" />
|
||||||
</picture>
|
</picture>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_character.HasValue)
|
@if(_character.HasValue)
|
||||||
{
|
{
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<b>@string.Format(L["Companies which name starts with {0}."], _character)</b>
|
<b>@string.Format(L["Companies which name starts with {0}."], _character)</b>
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_companies.Any())
|
@if(_companies.Any())
|
||||||
{
|
{
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<span class="align-content-center">@string.Format(L["{0} companies found in the database."], _companies.Count())</span>
|
<span class="align-content-center">@string.Format(L["{0} companies found in the database."], _companies.Count())</span>
|
||||||
<hr/>
|
<hr />
|
||||||
<table>
|
<table>
|
||||||
@foreach (var company in _companies)
|
@foreach(var company in _companies)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<a href="/company/@company.Id">
|
<a href="/company/@company.Id">
|
||||||
@if (company.LastLogo != null && File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", company.LastLogo + ".svg")))
|
@if(company.LastLogo != null &&
|
||||||
|
File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", company.LastLogo + ".svg")))
|
||||||
{
|
{
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/logos/@(company.LastLogo).svg">
|
<source srcset="/assets/logos/@(company.LastLogo).svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/logos/thumbs/webp/1x/@(company.LastLogo).webp,
|
<source srcset="/assets/logos/thumbs/webp/1x/@(company.LastLogo).webp,
|
||||||
/assets/logos/thumbs/webp/2x/@(company.LastLogo).webp 2x,
|
/assets/logos/thumbs/webp/2x/@(company.LastLogo).webp 2x,
|
||||||
/assets/logos/thumbs/webp/3x/@(company.LastLogo).webp 3x">
|
/assets/logos/thumbs/webp/3x/@(company.LastLogo).webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/logos/thumbs/png/1x/@(company.LastLogo).png,
|
<img alt="" height="auto" src="/assets/logos/thumbs/png/1x/@(company.LastLogo).png" srcset="/assets/logos/thumbs/png/1x/@(company.LastLogo).png,
|
||||||
/assets/logos/thumbs/png/2x/@(company.LastLogo).png 2x,
|
/assets/logos/thumbs/png/2x/@(company.LastLogo).png 2x,
|
||||||
/assets/logos/thumbs/png/3x/@(company.LastLogo).png 3x" src="/assets/logos/thumbs/png/1x/@(company.LastLogo).png" alt="" height="auto" width="auto" style="max-height: 32px; max-width: 128px" />
|
/assets/logos/thumbs/png/3x/@(company.LastLogo).png 3x" style="max-height: 32px; max-width: 128px" width="auto" />
|
||||||
</picture>
|
</picture>
|
||||||
}
|
}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -26,62 +26,60 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@page "/company/{Id:int}"
|
@page "/company/{Id:int}"
|
||||||
@using Marechai.Database.Models
|
|
||||||
@using Marechai.Database
|
|
||||||
|
|
||||||
|
@using Marechai.Database
|
||||||
@inherits OwningComponentBase<CompaniesService>
|
@inherits OwningComponentBase<CompaniesService>
|
||||||
@inject IStringLocalizer<CompaniesService> L
|
@inject IStringLocalizer<CompaniesService> L
|
||||||
@inject CompanyLogosService CompanyLogosService
|
@inject CompanyLogosService CompanyLogosService
|
||||||
@inject IWebHostEnvironment Host
|
@inject IWebHostEnvironment Host
|
||||||
|
|
||||||
@if (!_loaded)
|
@if(!_loaded)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_company is null)
|
@if(_company is null)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Company not found."]</p>
|
<p align="center">@L["Company not found."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<p align=center>
|
<p align="center">
|
||||||
@if (_company.LastLogo != null &&
|
@if(_company.LastLogo != null &&
|
||||||
File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", _company.LastLogo + ".svg")))
|
File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", _company.LastLogo + ".svg")))
|
||||||
{
|
{
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/logos/@(_company.LastLogo).svg">
|
<source srcset="/assets/logos/@(_company.LastLogo).svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/logos/webp/1x/@(_company.LastLogo).webp,
|
<source srcset="/assets/logos/webp/1x/@(_company.LastLogo).webp,
|
||||||
/assets/logos/webp/2x/@(_company.LastLogo).webp 2x,
|
/assets/logos/webp/2x/@(_company.LastLogo).webp 2x,
|
||||||
/assets/logos/webp/3x/@(_company.LastLogo).webp 3x">
|
/assets/logos/webp/3x/@(_company.LastLogo).webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/logos/png/1x/@(_company.LastLogo).png,
|
<img alt="" height="auto" src="/assets/logos/png/1x/@(_company.LastLogo).png" srcset="/assets/logos/png/1x/@(_company.LastLogo).png,
|
||||||
/assets/logos/png/2x/@(_company.LastLogo).png 2x,
|
/assets/logos/png/2x/@(_company.LastLogo).png 2x,
|
||||||
/assets/logos/png/3x/@(_company.LastLogo).png 3x" src="/assets/logos/png/1x/@(_company.LastLogo).png" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
/assets/logos/png/3x/@(_company.LastLogo).png 3x" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</picture>
|
</picture>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@if (_logos != null &&
|
@if(_logos != null &&
|
||||||
_logos.Count > 1)
|
_logos.Count > 1)
|
||||||
{
|
{
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<Carousel @bind-SelectedSlide="@_selectedSlide" ShowIndicators="true" ShowControls="true">
|
<Carousel @bind-SelectedSlide="@_selectedSlide" ShowControls="true" ShowIndicators="true">
|
||||||
@foreach(var logo in _logos.Where(logo => File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", logo.Guid + ".svg"))))
|
@foreach(var logo in _logos.Where(logo => File.Exists(Path.Combine(Host.WebRootPath, "assets/logos", logo.Guid + ".svg"))))
|
||||||
{
|
{
|
||||||
<CarouselSlide Name="@logo.Guid.ToString()">
|
<CarouselSlide Name="@logo.Guid.ToString()">
|
||||||
<div style="width: 256px; height: 256px; margin: auto;">
|
<div style="width: 256px; height: 256px; margin: auto;">
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/logos/@(logo.Guid).svg">
|
<source srcset="/assets/logos/@(logo.Guid).svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/logos/webp/1x/@(logo.Guid).webp,
|
<source srcset="/assets/logos/webp/1x/@(logo.Guid).webp,
|
||||||
/assets/logos/webp/1x/@(logo.Guid).webp 2x,
|
/assets/logos/webp/1x/@(logo.Guid).webp 2x,
|
||||||
/assets/logos/webp/1x/@(logo.Guid).webp 3x">
|
/assets/logos/webp/1x/@(logo.Guid).webp 3x" type="image/webp">
|
||||||
<img class="d-block w-100" srcset="/assets/logos/png/1x/@(logo.Guid).png,
|
<img alt="" class="d-block w-100" height="auto" src="/assets/logos/png/1x/@(logo.Guid).png" srcset="/assets/logos/png/1x/@(logo.Guid).png,
|
||||||
/assets/logos/png/1x/@(logo.Guid).png 2x,
|
/assets/logos/png/1x/@(logo.Guid).png 2x,
|
||||||
/assets/logos/png/1x/@(logo.Guid).webp 3x" src="/assets/logos/png/1x/@(logo.Guid).png" alt="" height="auto" width="auto" style="max-height: 256px; max-width: 256px" />
|
/assets/logos/png/1x/@(logo.Guid).webp 3x" style="max-height: 256px; max-width: 256px" width="auto" />
|
||||||
</picture>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
@if(logo.Year.HasValue)
|
@if(logo.Year.HasValue)
|
||||||
@@ -89,19 +87,19 @@
|
|||||||
<div style="text-align: center;">@(string.Format(L["in use since {0}"], logo.Year))</div>
|
<div style="text-align: center;">@(string.Format(L["in use since {0}"], logo.Year))</div>
|
||||||
}
|
}
|
||||||
</CarouselSlide>
|
</CarouselSlide>
|
||||||
}
|
}
|
||||||
</Carousel>
|
</Carousel>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2" class="text-center">
|
<th class="text-center" colspan="2">
|
||||||
<b>@_company.Name</b>
|
<b>@_company.Name</b>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@if (_company.Founded.HasValue)
|
@if(_company.Founded.HasValue)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Founded"]</th>
|
<th class="text-right">@L["Founded"]</th>
|
||||||
@if(_company.FoundedMonthIsUnknown)
|
@if(_company.FoundedMonthIsUnknown)
|
||||||
@@ -117,30 +115,30 @@
|
|||||||
<td>@_company.Founded.Value.ToLongDateString().</td>
|
<td>@_company.Founded.Value.ToLongDateString().</td>
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@if(!string.IsNullOrEmpty(_company.LegalName))
|
@if(!string.IsNullOrEmpty(_company.LegalName))
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Legal name"]</th>
|
<th class="text-right">@L["Legal name"]</th>
|
||||||
<td>@_company.LegalName</td>
|
<td>@_company.LegalName</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Country"]</th>
|
<th class="text-right">@L["Country"]</th>
|
||||||
<td>
|
<td>
|
||||||
@if (_company.Country != null)
|
@if(_company.Country != null)
|
||||||
{
|
{
|
||||||
<a href="/companies/country/@_company.CountryId">
|
<a href="/companies/country/@_company.CountryId">
|
||||||
@if (File.Exists(Path.Combine(Host.WebRootPath, "assets/flags/countries", $"{_company.CountryId:D3}.svg")))
|
@if(File.Exists(Path.Combine(Host.WebRootPath, "assets/flags/countries", $"{_company.CountryId:D3}.svg")))
|
||||||
{
|
{
|
||||||
<picture>
|
<picture>
|
||||||
<source type="image/svg+xml" srcset="/assets/flags/countries/@($"{_company.CountryId:D3}").svg">
|
<source srcset="/assets/flags/countries/@($"{_company.CountryId:D3}").svg" type="image/svg+xml">
|
||||||
<source type="image/webp" srcset="/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp,
|
<source srcset="/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp,
|
||||||
/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp 2x,
|
/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp 2x,
|
||||||
/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp 3x">
|
/assets/flags/countries/webp/1x/@($"{_company.CountryId:D3}").webp 3x" type="image/webp">
|
||||||
<img srcset="/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png,
|
<img alt="" height="32" src="/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png" srcset="/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png,
|
||||||
/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png 2x,
|
/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png 2x,
|
||||||
/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").webp 3x" src="/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").png" alt="" height="32" />
|
/assets/flags/countries/png/1x/@($"{_company.CountryId:D3}").webp 3x" />
|
||||||
</picture>
|
</picture>
|
||||||
}
|
}
|
||||||
@L[_company.Country]
|
@L[_company.Country]
|
||||||
@@ -151,10 +149,10 @@
|
|||||||
@L["Unknown (country)"]
|
@L["Unknown (country)"]
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Status"]</th>
|
<th class="text-right">@L["Status"]</th>
|
||||||
@switch (_company.Status)
|
@switch(_company.Status)
|
||||||
{
|
{
|
||||||
case CompanyStatus.Unknown:
|
case CompanyStatus.Unknown:
|
||||||
<td>@L["Current company status is unknown."]</td>
|
<td>@L["Current company status is unknown."]</td>
|
||||||
@@ -163,13 +161,14 @@
|
|||||||
<td>@L["Company is active."]</td>
|
<td>@L["Company is active."]</td>
|
||||||
break;
|
break;
|
||||||
case CompanyStatus.Sold:
|
case CompanyStatus.Sold:
|
||||||
if (_company.Sold != null)
|
if(_company.Sold != null)
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">
|
<a href="/company/@_soldTo.Id">
|
||||||
@string.Format(L["Company sold to {0} on {1}."], _soldTo.Name, _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</a>
|
@string.Format(L["Company sold to {0} on {1}."], _soldTo.Name, _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -179,11 +178,12 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">
|
<a href="/company/@_soldTo.Id">
|
||||||
@string.Format(L["Company sold to {0} on an unknown date."], _soldTo.Name)</a>
|
@string.Format(L["Company sold to {0} on an unknown date."], _soldTo.Name)
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -193,9 +193,9 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CompanyStatus.Merged:
|
case CompanyStatus.Merged:
|
||||||
if (_company.Sold != null)
|
if(_company.Sold != null)
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">@string.Format(L["Company merged on {0} to form {1}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString(), _soldTo.Name)</a>
|
<a href="/company/@_soldTo.Id">@string.Format(L["Company merged on {0} to form {1}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString(), _soldTo.Name)</a>
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">@string.Format(L["Company merged on an unknown date to form {0}."], _soldTo.Name)</a>
|
<a href="/company/@_soldTo.Id">@string.Format(L["Company merged on an unknown date to form {0}."], _soldTo.Name)</a>
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CompanyStatus.Bankrupt:
|
case CompanyStatus.Bankrupt:
|
||||||
if (_company.Sold != null)
|
if(_company.Sold != null)
|
||||||
{
|
{
|
||||||
<td>@string.Format(L["Company declared bankruptcy on {0}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</td>
|
<td>@string.Format(L["Company declared bankruptcy on {0}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</td>
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CompanyStatus.Defunct:
|
case CompanyStatus.Defunct:
|
||||||
if (_company.Sold != null)
|
if(_company.Sold != null)
|
||||||
{
|
{
|
||||||
<td>@string.Format(L["Company ceased operations on {0}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</td>
|
<td>@string.Format(L["Company ceased operations on {0}."], _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</td>
|
||||||
}
|
}
|
||||||
@@ -241,9 +241,9 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CompanyStatus.Renamed:
|
case CompanyStatus.Renamed:
|
||||||
if (_company.Sold != null)
|
if(_company.Sold != null)
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">@string.Format(L["Company renamed to {0} on {1}."], _soldTo.Name, _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</a>
|
<a href="/company/@_soldTo.Id">@string.Format(L["Company renamed to {0} on {1}."], _soldTo.Name, _company.SoldMonthIsUnknown ? $"{_company.Sold.Value.Year}" : _company.SoldDayIsUnknown ? $"{_company.Sold.Value:Y}" : _company.Sold.Value.ToLongDateString())</a>
|
||||||
@@ -256,11 +256,12 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_soldTo != null)
|
if(_soldTo != null)
|
||||||
{
|
{
|
||||||
<td>
|
<td>
|
||||||
<a href="/company/@_soldTo.Id">
|
<a href="/company/@_soldTo.Id">
|
||||||
@string.Format(L["Company renamed to {0} on an unknown date."], _soldTo.Name)</a>
|
@string.Format(L["Company renamed to {0} on an unknown date."], _soldTo.Name)
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -272,43 +273,46 @@
|
|||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Address"]</th>
|
<th class="text-right">@L["Address"]</th>
|
||||||
<td>
|
<td>
|
||||||
@_company.Address<br>
|
@_company.Address
|
||||||
@if (_company.City != _company.Province)
|
<br>
|
||||||
|
@if(_company.City != _company.Province)
|
||||||
{
|
{
|
||||||
@_company.City<br>
|
@_company.City
|
||||||
|
<br>
|
||||||
}
|
}
|
||||||
@_company.PostalCode @_company.Province</td>
|
@_company.PostalCode @_company.Province
|
||||||
</tr>
|
</td>
|
||||||
@if (!string.IsNullOrEmpty(_company.Website) ||
|
</tr>
|
||||||
|
@if(!string.IsNullOrEmpty(_company.Website) ||
|
||||||
!string.IsNullOrEmpty(_company.Twitter) ||
|
!string.IsNullOrEmpty(_company.Twitter) ||
|
||||||
!string.IsNullOrEmpty(_company.Facebook))
|
!string.IsNullOrEmpty(_company.Facebook))
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-right">@L["Links"]</th>
|
<th class="text-right">@L["Links"]</th>
|
||||||
<td>
|
<td>
|
||||||
@if (!string.IsNullOrEmpty(_company.Website))
|
@if(!string.IsNullOrEmpty(_company.Website))
|
||||||
{
|
{
|
||||||
<a href="@_company.Website">@L["Website"]</a>
|
<a href="@_company.Website">@L["Website"]</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
@if (!string.IsNullOrEmpty(_company.Twitter))
|
@if(!string.IsNullOrEmpty(_company.Twitter))
|
||||||
{
|
{
|
||||||
<a href="https://www.twitter.com/@_company.Twitter">Twitter</a>
|
<a href="https://www.twitter.com/@_company.Twitter">Twitter</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
@if (!string.IsNullOrEmpty(_company.Facebook))
|
@if(!string.IsNullOrEmpty(_company.Facebook))
|
||||||
{
|
{
|
||||||
<a href="https://www.facebook.com/@_company.Facebook">Facebook</a>
|
<a href="https://www.facebook.com/@_company.Facebook">Facebook</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@{
|
@{
|
||||||
@@ -316,21 +320,22 @@
|
|||||||
}
|
}
|
||||||
<div class="row" id="itemsAccordion">
|
<div class="row" id="itemsAccordion">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@if (_computers.Count > 0)
|
@if(_computers.Count > 0)
|
||||||
{
|
{
|
||||||
<div class="card-header" id="headingComputers">
|
<div class="card-header" id="headingComputers">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button aria-controls="collapseComputers" aria-expanded="false" class="btn btn-info" data-target="#collapseComputers" data-toggle="collapse" @onclick="@CollapseComputers">
|
<button aria-controls="collapseComputers" aria-expanded="false" class="btn btn-info" data-target="#collapseComputers" data-toggle="collapse" @onclick="@CollapseComputers">
|
||||||
@((MarkupString)string.Format(@L["<ok>{0}</ok> computers known."], _computers.Count).Replace("<ok>", "<span class=\"badge badge-success\">").Replace("</ok>","</span>"))
|
@((MarkupString)string.Format(L["<ok>{0}</ok> computers known."], _computers.Count).Replace("<ok>", "<span class=\"badge badge-success\">").Replace("</ok>", "</span>"))
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div aria-labelledby="headingComputers" class="@(ComputersCollapsed ? "collapse" : "")" data-parent="#itemsAccordion" id="collapseComputers">
|
<div aria-labelledby="headingComputers" class="@(ComputersCollapsed ? "collapse" : "")" data-parent="#itemsAccordion" id="collapseComputers">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@foreach (var computer in _computers)
|
@foreach(var computer in _computers)
|
||||||
{
|
{
|
||||||
<a href="/machine/@computer.Id">
|
<a href="/machine/@computer.Id">
|
||||||
@computer.Name</a>
|
@computer.Name
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -341,26 +346,27 @@
|
|||||||
<div class="card-header" id="headingComputers">
|
<div class="card-header" id="headingComputers">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button class="btn btn-info">
|
<button class="btn btn-info">
|
||||||
@((MarkupString)L["<red>No</red> computers known."].ToString().Replace("<red>", "<span class=\"badge badge-danger\">").Replace("</red>","</span>"))
|
@((MarkupString)L["<red>No</red> computers known."].ToString().Replace("<red>", "<span class=\"badge badge-danger\">").Replace("</red>", "</span>"))
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@if (_consoles.Count > 0)
|
@if(_consoles.Count > 0)
|
||||||
{
|
{
|
||||||
<div class="card-header" id="headingConsoles">
|
<div class="card-header" id="headingConsoles">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button aria-controls="collapseConsoles" aria-expanded="false" class="btn btn-info" data-target="#collapseConsoles" data-toggle="collapse" @onclick="@CollapseConsoles">
|
<button aria-controls="collapseConsoles" aria-expanded="false" class="btn btn-info" data-target="#collapseConsoles" data-toggle="collapse" @onclick="@CollapseConsoles">
|
||||||
@((MarkupString)string.Format(@L["<ok>{0}</ok> videogame consoles known."], _consoles.Count).Replace("<ok>", "<span class=\"badge badge-success\">").Replace("</ok>","</span>"))
|
@((MarkupString)string.Format(L["<ok>{0}</ok> videogame consoles known."], _consoles.Count).Replace("<ok>", "<span class=\"badge badge-success\">").Replace("</ok>", "</span>"))
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div aria-labelledby="headingConsoles" class="@(ConsolesCollapsed ? "collapse" : "")" data-parent="#itemsAccordion" id="collapseConsoles">
|
<div aria-labelledby="headingConsoles" class="@(ConsolesCollapsed ? "collapse" : "")" data-parent="#itemsAccordion" id="collapseConsoles">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@foreach (var console in _consoles)
|
@foreach(var console in _consoles)
|
||||||
{
|
{
|
||||||
<a href="/machine/@console.Id">
|
<a href="/machine/@console.Id">
|
||||||
@console.Name</a>
|
@console.Name
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -371,22 +377,21 @@
|
|||||||
<div class="card-header" id="headingComputers">
|
<div class="card-header" id="headingComputers">
|
||||||
<h5 class="mb-0">
|
<h5 class="mb-0">
|
||||||
<button class="btn btn-info">
|
<button class="btn btn-info">
|
||||||
@((MarkupString)L["<red>No</red> videogame consoles known."].ToString().Replace("<red>", "<span class=\"badge badge-danger\">").Replace("</red>","</span>"))
|
@((MarkupString)L["<red>No</red> videogame consoles known."].ToString().Replace("<red>", "<span class=\"badge badge-danger\">").Replace("</red>", "</span>"))
|
||||||
</button>
|
</button>
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (_description != null)
|
@if(_description != null)
|
||||||
{
|
{
|
||||||
<hr/>
|
<hr />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@((MarkupString)_description)
|
@((MarkupString)_description)
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.carousel-indicators {
|
.carousel-indicators {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,13 +29,12 @@
|
|||||||
@inherits OwningComponentBase<ComputersService>
|
@inherits OwningComponentBase<ComputersService>
|
||||||
@inject IStringLocalizer<ComputersService> L
|
@inject IStringLocalizer<ComputersService> L
|
||||||
|
|
||||||
@if (!_loaded)
|
@if(!_loaded)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@L["Here you can consult our database."]
|
@L["Here you can consult our database."]
|
||||||
<br />
|
<br />
|
||||||
@@ -225,7 +224,7 @@
|
|||||||
@L["Search by year"]
|
@L["Search by year"]
|
||||||
<br>
|
<br>
|
||||||
@{ var counter = 0; }
|
@{ var counter = 0; }
|
||||||
@for (int i = _minYear; i <= _maxYear; i++)
|
@for(var i = _minYear; i <= _maxYear; i++)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
@@ -233,7 +232,7 @@
|
|||||||
<a href="/computers/year/@i">
|
<a href="/computers/year/@i">
|
||||||
@i
|
@i
|
||||||
</a>
|
</a>
|
||||||
if (counter % 8 == 0)
|
if(counter % 8 == 0)
|
||||||
{
|
{
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -31,46 +31,46 @@
|
|||||||
@inherits OwningComponentBase<ComputersService>
|
@inherits OwningComponentBase<ComputersService>
|
||||||
@inject IStringLocalizer<ComputersService> L
|
@inject IStringLocalizer<ComputersService> L
|
||||||
|
|
||||||
@if (_computers is null)
|
@if(_computers is null)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>@L["Search results:"]</p>
|
<p>@L["Search results:"]</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@if (_character.HasValue)
|
@if(_character.HasValue)
|
||||||
{
|
{
|
||||||
<b>@string.Format(L["Computers starting with {0}"], _character)</b>
|
<b>@string.Format(L["Computers starting with {0}"], _character)</b>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
else if (Year.HasValue)
|
else if(Year.HasValue)
|
||||||
{
|
{
|
||||||
<b>@string.Format(L["Computers introduced in {0}"], Year)</b>
|
<b>@string.Format(L["Computers introduced in {0}"], Year)</b>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_computers?.Count > 0)
|
@if(_computers?.Count > 0)
|
||||||
{
|
{
|
||||||
<p>
|
<p>
|
||||||
@string.Format(L["{0} computers found in the database."], _computers.Count)
|
@string.Format(L["{0} computers found in the database."], _computers.Count)
|
||||||
<br />
|
<br />
|
||||||
@foreach (var computer in _computers)
|
@foreach(var computer in _computers)
|
||||||
{
|
{
|
||||||
<a href="/machine/@computer.Id">
|
<a href="/machine/@computer.Id">
|
||||||
@computer.Company @computer.Name</a>
|
@computer.Company @computer.Name
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (_character.HasValue)
|
@if(_character.HasValue)
|
||||||
{
|
{
|
||||||
<p>@L["There are no computers found in the database that start with this letter."]</p>
|
<p>@L["There are no computers found in the database that start with this letter."]</p>
|
||||||
}
|
}
|
||||||
else if (Year.HasValue)
|
else if(Year.HasValue)
|
||||||
{
|
{
|
||||||
<p>@L["There are no computers found introduced this year."]</p>
|
<p>@L["There are no computers found introduced this year."]</p>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -29,13 +29,12 @@
|
|||||||
@inherits OwningComponentBase<ConsolesService>
|
@inherits OwningComponentBase<ConsolesService>
|
||||||
@inject IStringLocalizer<ConsolesService> L
|
@inject IStringLocalizer<ConsolesService> L
|
||||||
|
|
||||||
@if (!_loaded)
|
@if(!_loaded)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@L["Here you can consult our database."]
|
@L["Here you can consult our database."]
|
||||||
<br />
|
<br />
|
||||||
@@ -225,7 +224,7 @@
|
|||||||
@L["Search by year"]
|
@L["Search by year"]
|
||||||
<br>
|
<br>
|
||||||
@{ var counter = 0; }
|
@{ var counter = 0; }
|
||||||
@for (int i = _minYear; i <= _maxYear; i++)
|
@for(var i = _minYear; i <= _maxYear; i++)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
counter++;
|
counter++;
|
||||||
@@ -233,7 +232,7 @@
|
|||||||
<a href="/consoles/year/@i">
|
<a href="/consoles/year/@i">
|
||||||
@i
|
@i
|
||||||
</a>
|
</a>
|
||||||
if (counter % 8 == 0)
|
if(counter % 8 == 0)
|
||||||
{
|
{
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -31,46 +31,46 @@
|
|||||||
@inherits OwningComponentBase<ConsolesService>
|
@inherits OwningComponentBase<ConsolesService>
|
||||||
@inject IStringLocalizer<ConsolesService> L
|
@inject IStringLocalizer<ConsolesService> L
|
||||||
|
|
||||||
@if (_consoles is null)
|
@if(_consoles is null)
|
||||||
{
|
{
|
||||||
<p align="center">@L["Loading..."]</p>
|
<p align="center">@L["Loading..."]</p>
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>@L["Search results:"]</p>
|
<p>@L["Search results:"]</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@if (_character.HasValue)
|
@if(_character.HasValue)
|
||||||
{
|
{
|
||||||
<b>@string.Format(L["Videogame consoles starting with {0}"], _character)</b>
|
<b>@string.Format(L["Videogame consoles starting with {0}"], _character)</b>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
else if (Year.HasValue)
|
else if(Year.HasValue)
|
||||||
{
|
{
|
||||||
<b>@string.Format(L["Videogame consoles introduced in {0}"], Year)</b>
|
<b>@string.Format(L["Videogame consoles introduced in {0}"], Year)</b>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_consoles?.Count > 0)
|
@if(_consoles?.Count > 0)
|
||||||
{
|
{
|
||||||
<p>
|
<p>
|
||||||
@string.Format(L["{0} videogame consoles found in the database."], _consoles.Count)
|
@string.Format(L["{0} videogame consoles found in the database."], _consoles.Count)
|
||||||
<br />
|
<br />
|
||||||
@foreach (var console in _consoles)
|
@foreach(var console in _consoles)
|
||||||
{
|
{
|
||||||
<a href="/machine/@console.Id">
|
<a href="/machine/@console.Id">
|
||||||
@console.Company @console.Name</a>
|
@console.Company @console.Name
|
||||||
|
</a>
|
||||||
<br />
|
<br />
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (_character.HasValue)
|
@if(_character.HasValue)
|
||||||
{
|
{
|
||||||
<p>@L["There are no videogame consoles found in the database that start with this letter."]</p>
|
<p>@L["There are no videogame consoles found in the database that start with this letter."]</p>
|
||||||
}
|
}
|
||||||
else if (Year.HasValue)
|
else if(Year.HasValue)
|
||||||
{
|
{
|
||||||
<p>@L["There are no videogame consoles found introduced this year."]</p>
|
<p>@L["There are no videogame consoles found introduced this year."]</p>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@{
|
@{
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
// MARECHAI: Master repository of computing history artifacts information
|
// MARECHAI: Master repository of computing history artifacts information
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user