diff --git a/data.mv.db b/data.mv.db index d29e43c..984f240 100644 Binary files a/data.mv.db and b/data.mv.db differ diff --git a/src/main/java/com/example/demo/news/api/NewsAdminController.java b/src/main/java/com/example/demo/news/api/NewsAdminController.java index f4f65cf..4b12f4b 100644 --- a/src/main/java/com/example/demo/news/api/NewsAdminController.java +++ b/src/main/java/com/example/demo/news/api/NewsAdminController.java @@ -25,6 +25,7 @@ import jakarta.validation.Valid; @RequestMapping(NewsAdminController.URL) public class NewsAdminController { public static final String URL = Constants.ADMIN_PREFIX + "/news"; + private static final String NEWS_URL = NewsController.URL; private static final String NEWS_EDIT_VIEW = "new-edit"; private static final String NEWS_ATTRIBUTE = "news"; private static final String DEPARTMENT_ATTRIBUTE = "departments"; @@ -68,14 +69,14 @@ public class NewsAdminController { return NEWS_EDIT_VIEW; } newsService.create(toEntity(newItem)); - return Constants.REDIRECT_VIEW + URL; + return Constants.REDIRECT_VIEW + NEWS_URL; } @PostMapping("/delete/{id}") public String delete( @PathVariable(name = "id") Long id) { newsService.delete(id); - return Constants.REDIRECT_VIEW + URL; + return Constants.REDIRECT_VIEW + NEWS_URL; } @GetMapping("/edit/{id}") @@ -103,6 +104,6 @@ public class NewsAdminController { throw new IllegalArgumentException(); } newsService.update(id, toEntity(newItem)); - return Constants.REDIRECT_VIEW + URL; + return Constants.REDIRECT_VIEW + NEWS_URL; } } diff --git a/src/main/resources/templates/departments.html b/src/main/resources/templates/departments.html index 0104eb8..d533d73 100644 --- a/src/main/resources/templates/departments.html +++ b/src/main/resources/templates/departments.html @@ -9,15 +9,16 @@
+ + Кафедры + +
+ Добавить кафедру +

Данные отсутствуют

- - Кафедры - -
- Добавить кафедру -
+ diff --git a/src/main/resources/templates/directions.html b/src/main/resources/templates/directions.html index 187f766..4795eea 100644 --- a/src/main/resources/templates/directions.html +++ b/src/main/resources/templates/directions.html @@ -23,13 +23,12 @@ +
+ Добавить направление +

Данные отсутствуют

-
diff --git a/src/main/resources/templates/new-edit.html b/src/main/resources/templates/new-edit.html index 0d1abd4..9718d83 100644 --- a/src/main/resources/templates/new-edit.html +++ b/src/main/resources/templates/new-edit.html @@ -7,7 +7,8 @@
-
+
diff --git a/src/main/resources/templates/users.html b/src/main/resources/templates/users.html index b3da292..4f4e9fe 100644 --- a/src/main/resources/templates/users.html +++ b/src/main/resources/templates/users.html @@ -9,15 +9,15 @@
+ + Пользователи + +

Данные отсутствуют

- - Пользователи - -