L
+@attribute [Authorize(Roles = "UberAdmin, Admin")]
+@L["License details"]
+
+
+@if (!_loaded)
+{
+ @L["Loading..."]
+
+ return;
+}
+
+
+
+ @L["Name"]
+
+
+
+ @L["SPDX identifier"]
+
+
+
+ @L["FSF approved"]
+
+
+
+ @L["OSI approved"]
+
+
+
+ @L["License text link"]
+
+
+ @if (_editable || _model.Text != null)
+ {
+
+ @L["License text"]
+
+
+ }
+
+
\ No newline at end of file
diff --git a/Marechai/Pages/Admin/Details/License.razor.cs b/Marechai/Pages/Admin/Details/License.razor.cs
new file mode 100644
index 00000000..13a21854
--- /dev/null
+++ b/Marechai/Pages/Admin/Details/License.razor.cs
@@ -0,0 +1,29 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+
+namespace Marechai.Pages.Admin.Details
+{
+ public partial class License
+ {
+ bool _editable;
+ bool _loaded;
+ Database.Models.License _model;
+ [Parameter]
+ public int Id { get; set; }
+
+ protected override async Task OnAfterRenderAsync(bool firstRender)
+ {
+ if(_loaded)
+ return;
+
+ _loaded = true;
+
+ if(Id <= 0)
+ return;
+
+ _model = await Service.GetAsync(Id);
+
+ StateHasChanged();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Marechai/Pages/Admin/Licenses.razor b/Marechai/Pages/Admin/Licenses.razor
index ca3eadf6..f16f69b5 100644
--- a/Marechai/Pages/Admin/Licenses.razor
+++ b/Marechai/Pages/Admin/Licenses.razor
@@ -92,9 +92,7 @@
}
-
- @L["Details"]
-
+ @L["Details"]
@L["Edit"]
diff --git a/Marechai/Resources/Services/LicensesService.es.resx b/Marechai/Resources/Services/LicensesService.es.resx
index 1a273acb..f03d4b0a 100644
--- a/Marechai/Resources/Services/LicensesService.es.resx
+++ b/Marechai/Resources/Services/LicensesService.es.resx
@@ -174,4 +174,32 @@
Cancelar
Cancel
+
+ Detalles de licencia
+ License details
+
+
+ Volver a la lista
+ Back to list
+
+
+ Identificator SPDX
+ SPDX identifier
+
+
+ Aprobada por la FSF
+ FSF approved
+
+
+ Aprobada por la OSI
+ OSI approved
+
+
+ Enlace al texto de la licencia
+ License text link
+
+
+ Texto de la licencia
+ License text
+
\ No newline at end of file
diff --git a/Marechai/Services/LicensesService.cs b/Marechai/Services/LicensesService.cs
index 1999974c..d52a82b9 100644
--- a/Marechai/Services/LicensesService.cs
+++ b/Marechai/Services/LicensesService.cs
@@ -19,6 +19,8 @@ namespace Marechai.Services
OsiApproved = l.OsiApproved, SPDX = l.SPDX
}).ToListAsync();
+ public async Task GetAsync(int id) => await _context.Licenses.FindAsync(id);
+
public async Task DeleteAsync(int id)
{
License item = await _context.Licenses.FindAsync(id);
|