Merge branch '80-no-records-message' into 'dev'
Resolve "Добавить сообщения на пустые страницы" Closes #80 See merge request romanov73/ng-tracker!37
This commit is contained in:
commit
7269f45662
@ -13,6 +13,7 @@ import ru.ulstu.deadline.model.Deadline;
|
|||||||
import ru.ulstu.grant.model.Grant;
|
import ru.ulstu.grant.model.Grant;
|
||||||
import ru.ulstu.grant.model.GrantDto;
|
import ru.ulstu.grant.model.GrantDto;
|
||||||
import ru.ulstu.grant.service.GrantService;
|
import ru.ulstu.grant.service.GrantService;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -28,6 +29,7 @@ import static ru.ulstu.grant.controller.Navigation.hasErrors;
|
|||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
@RequestMapping(value = "/grants")
|
@RequestMapping(value = "/grants")
|
||||||
|
@ApiIgnore
|
||||||
public class GrantController {
|
public class GrantController {
|
||||||
private final GrantService grantService;
|
private final GrantService grantService;
|
||||||
|
|
||||||
|
@ -6,9 +6,11 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import ru.ulstu.core.controller.AdviceController;
|
import ru.ulstu.core.controller.AdviceController;
|
||||||
import ru.ulstu.user.service.UserService;
|
import ru.ulstu.user.service.UserService;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
@RequestMapping(value = "/index")
|
@RequestMapping(value = "/index")
|
||||||
|
@ApiIgnore
|
||||||
public class IndexController extends AdviceController {
|
public class IndexController extends AdviceController {
|
||||||
public IndexController(UserService userService) {
|
public IndexController(UserService userService) {
|
||||||
super(userService);
|
super(userService);
|
||||||
|
@ -15,6 +15,7 @@ import ru.ulstu.paper.model.PaperDto;
|
|||||||
import ru.ulstu.paper.model.PaperFilterDto;
|
import ru.ulstu.paper.model.PaperFilterDto;
|
||||||
import ru.ulstu.paper.service.PaperService;
|
import ru.ulstu.paper.service.PaperService;
|
||||||
import ru.ulstu.user.model.User;
|
import ru.ulstu.user.model.User;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -28,6 +29,7 @@ import static org.springframework.util.StringUtils.isEmpty;
|
|||||||
|
|
||||||
@Controller()
|
@Controller()
|
||||||
@RequestMapping(value = "/papers")
|
@RequestMapping(value = "/papers")
|
||||||
|
@ApiIgnore
|
||||||
public class PaperController {
|
public class PaperController {
|
||||||
private final PaperService paperService;
|
private final PaperService paperService;
|
||||||
|
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head th:fragment="headerfiles">
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div th:fragment="noRecords(entities, noRecordsMessage, url)" class="col-12 text-center"
|
||||||
|
style="background-color: white;">
|
||||||
|
<div th:if="*{#lists.isEmpty(entities)}">
|
||||||
|
<div th:text="'Еще не создано ни'+${noRecordsMessage}"/>
|
||||||
|
<a th:href="@{${url}+'?id=0'}">
|
||||||
|
Перейдите по ссылке, чтобы добавить
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -17,6 +17,7 @@
|
|||||||
<div th:replace="grants/fragments/grantDashboardFragment :: grantDashboard(grant=${grant})"/>
|
<div th:replace="grants/fragments/grantDashboardFragment :: grantDashboard(grant=${grant})"/>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
|
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${grants}, noRecordsMessage=' одного гранта', url='grant')"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-sm-12">
|
<div class="col-md-3 col-sm-12">
|
||||||
</div>
|
</div>
|
||||||
|
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${grants}, noRecordsMessage=' одного гранта', url='grant')"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<div th:replace="papers/fragments/paperDashboardFragment :: paperDashboard(paper=${paper})"/>
|
<div th:replace="papers/fragments/paperDashboardFragment :: paperDashboard(paper=${paper})"/>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
|
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${papers}, noRecordsMessage=' одной статьи', url='paper')"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${filteredPapers.papers}, noRecordsMessage=' одной статьи', url='paper')"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user