From d9127736d974be66957e8e360117847ae0095870 Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sat, 11 Oct 2025 12:57:51 +0200 Subject: [PATCH 1/9] Added basic Groups view and controller --- src/Controllers/HomeController.cs | 9 +- src/Views/Home/Groups.cshtml | 169 ++++++++++++++++++++++++++++++ src/Views/Shared/_Layout.cshtml | 3 + 3 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 src/Views/Home/Groups.cshtml diff --git a/src/Controllers/HomeController.cs b/src/Controllers/HomeController.cs index dd5be8f..d513b5a 100644 --- a/src/Controllers/HomeController.cs +++ b/src/Controllers/HomeController.cs @@ -88,7 +88,14 @@ public class HomeController : Controller Workplace = user.Description?.Workplace ?? "" }); } - return View(new UsersIndexViewModel() { UserTableViewModels = UserTableViewModels }); } + return View(new UsersIndexViewModel() { UserTableViewModels = UserTableViewModels }); + } + + [HttpGet("Groups")] + public async Task GroupsAsync() + { + return View(); // TODO: Add viewmodel + } [HttpPost("Login")] public async Task Login(string username, string password) diff --git a/src/Views/Home/Groups.cshtml b/src/Views/Home/Groups.cshtml new file mode 100644 index 0000000..e9ef79b --- /dev/null +++ b/src/Views/Home/Groups.cshtml @@ -0,0 +1,169 @@ +@using Microsoft.AspNetCore.Mvc.Localization +@using Berufsschule_HAM.Models +@using System.Buffers.Text +@* @model UsersIndexViewModel *@ +@inject IViewLocalizer T +@{ + ViewData["Title"] = T["Groups"]; +} + + +
+

@T["Groups"]

+ + +
+ +
+ + +
+ + + + + + + + + + + + + @* @{ + foreach (UserTableViewModel userTableViewModel in Model.UserTableViewModels) + { + + + + + + + + + + } + } *@ + +
Group@T["Can"]:
@T["inventorize"]
@T["Can"]:
@T["Manage users"]
@T["Can"]:
@T["Manage locations"]
@T["Can"]:
@T["Manage assets"]
@T["Can"]:
@T["manage groups"]
+ Photo + @userTableViewModel.Uid@userTableViewModel.Title@userTableViewModel.Name@userTableViewModel.Surname@userTableViewModel.Workplace +
+ + +
+
+
+
+@* + + + + + *@ diff --git a/src/Views/Shared/_Layout.cshtml b/src/Views/Shared/_Layout.cshtml index 6ca4965..11901ea 100644 --- a/src/Views/Shared/_Layout.cshtml +++ b/src/Views/Shared/_Layout.cshtml @@ -46,6 +46,9 @@ + }