From c70c35f4f305a2be940907b4b7a0f0babae49fde Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 28 Mar 2019 14:36:58 +0400 Subject: [PATCH 1/2] #80 add no records message --- .../templates/fragments/noRecordsFragment.html | 17 +++++++++++++++++ .../resources/templates/grants/dashboard.html | 1 + src/main/resources/templates/grants/grants.html | 1 + .../resources/templates/papers/dashboard.html | 1 + src/main/resources/templates/papers/papers.html | 1 + 5 files changed, 21 insertions(+) create mode 100644 src/main/resources/templates/fragments/noRecordsFragment.html diff --git a/src/main/resources/templates/fragments/noRecordsFragment.html b/src/main/resources/templates/fragments/noRecordsFragment.html new file mode 100644 index 0000000..38970f0 --- /dev/null +++ b/src/main/resources/templates/fragments/noRecordsFragment.html @@ -0,0 +1,17 @@ + + + + + + +
+
+
+ + Перейдите по ссылке, чтобы добавить + +
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/grants/dashboard.html b/src/main/resources/templates/grants/dashboard.html index b469875..821ccd4 100644 --- a/src/main/resources/templates/grants/dashboard.html +++ b/src/main/resources/templates/grants/dashboard.html @@ -17,6 +17,7 @@
+
diff --git a/src/main/resources/templates/grants/grants.html b/src/main/resources/templates/grants/grants.html index 83083a0..d98f6d8 100644 --- a/src/main/resources/templates/grants/grants.html +++ b/src/main/resources/templates/grants/grants.html @@ -24,6 +24,7 @@
+
diff --git a/src/main/resources/templates/papers/dashboard.html b/src/main/resources/templates/papers/dashboard.html index b7849f7..5265e0b 100644 --- a/src/main/resources/templates/papers/dashboard.html +++ b/src/main/resources/templates/papers/dashboard.html @@ -18,6 +18,7 @@
+
diff --git a/src/main/resources/templates/papers/papers.html b/src/main/resources/templates/papers/papers.html index a797d26..7a033fe 100644 --- a/src/main/resources/templates/papers/papers.html +++ b/src/main/resources/templates/papers/papers.html @@ -43,6 +43,7 @@ +
From 7b0b7a041af65ebb089665cebb3b65eec4faedeb Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 28 Mar 2019 14:45:39 +0400 Subject: [PATCH 2/2] #80 hide mvc controllers from api --- src/main/java/ru/ulstu/grant/controller/GrantController.java | 2 ++ src/main/java/ru/ulstu/index/controller/IndexController.java | 2 ++ src/main/java/ru/ulstu/paper/controller/PaperController.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/main/java/ru/ulstu/grant/controller/GrantController.java b/src/main/java/ru/ulstu/grant/controller/GrantController.java index c786ffa..65b11dc 100644 --- a/src/main/java/ru/ulstu/grant/controller/GrantController.java +++ b/src/main/java/ru/ulstu/grant/controller/GrantController.java @@ -13,6 +13,7 @@ import ru.ulstu.deadline.model.Deadline; import ru.ulstu.grant.model.Grant; import ru.ulstu.grant.model.GrantDto; import ru.ulstu.grant.service.GrantService; +import springfox.documentation.annotations.ApiIgnore; import javax.validation.Valid; import java.io.IOException; @@ -28,6 +29,7 @@ import static ru.ulstu.grant.controller.Navigation.hasErrors; @Controller() @RequestMapping(value = "/grants") +@ApiIgnore public class GrantController { private final GrantService grantService; diff --git a/src/main/java/ru/ulstu/index/controller/IndexController.java b/src/main/java/ru/ulstu/index/controller/IndexController.java index d964997..f6ab100 100644 --- a/src/main/java/ru/ulstu/index/controller/IndexController.java +++ b/src/main/java/ru/ulstu/index/controller/IndexController.java @@ -6,9 +6,11 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import ru.ulstu.core.controller.AdviceController; import ru.ulstu.user.service.UserService; +import springfox.documentation.annotations.ApiIgnore; @Controller() @RequestMapping(value = "/index") +@ApiIgnore public class IndexController extends AdviceController { public IndexController(UserService userService) { super(userService); diff --git a/src/main/java/ru/ulstu/paper/controller/PaperController.java b/src/main/java/ru/ulstu/paper/controller/PaperController.java index 31df0e3..9169bd9 100644 --- a/src/main/java/ru/ulstu/paper/controller/PaperController.java +++ b/src/main/java/ru/ulstu/paper/controller/PaperController.java @@ -15,6 +15,7 @@ import ru.ulstu.paper.model.PaperDto; import ru.ulstu.paper.model.PaperFilterDto; import ru.ulstu.paper.service.PaperService; import ru.ulstu.user.model.User; +import springfox.documentation.annotations.ApiIgnore; import javax.validation.Valid; import java.io.IOException; @@ -28,6 +29,7 @@ import static org.springframework.util.StringUtils.isEmpty; @Controller() @RequestMapping(value = "/papers") +@ApiIgnore public class PaperController { private final PaperService paperService;