diff --git a/nekontakte/src/main/java/com/example/nekontakte/users/api/AdminUserController.java b/nekontakte/src/main/java/com/example/nekontakte/users/api/AdminUserController.java index aaeaf10..4906d61 100644 --- a/nekontakte/src/main/java/com/example/nekontakte/users/api/AdminUserController.java +++ b/nekontakte/src/main/java/com/example/nekontakte/users/api/AdminUserController.java @@ -55,6 +55,7 @@ public class AdminUserController { @GetMapping("/create") public String getCreateView(Model model) { model.addAttribute(USER_ATTRIBUTE, new UserEditDTO()); + model.addAttribute("title", "Новый пользователь"); return USER_EDIT_VIEW; } @@ -67,6 +68,8 @@ public class AdminUserController { throw new IllegalArgumentException(); } + model.addAttribute("title", "Редактировать пользователя"); + UserEntity userEntity = userService.get(id); UserEditDTO userEditDTO = new UserEditDTO(); userEditDTO.setId(userEntity.getId()); @@ -91,6 +94,8 @@ public class AdminUserController { Model model, RedirectAttributes redirectAttributes) { + model.addAttribute("title", "Редактировать пользователя"); + UserEntity userEntity; if (userEditDTO.getId() == null) { diff --git a/nekontakte/src/main/resources/templates/admin/user.html b/nekontakte/src/main/resources/templates/admin/user.html index 1e10ddb..b24b309 100644 --- a/nekontakte/src/main/resources/templates/admin/user.html +++ b/nekontakte/src/main/resources/templates/admin/user.html @@ -1,63 +1,132 @@ - + +
+