#80 add no records message

This commit is contained in:
Anton Romanov 2019-03-28 14:36:58 +04:00
parent e74fcb316c
commit c70c35f4f3
5 changed files with 21 additions and 0 deletions

View File

@ -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>

View File

@ -17,6 +17,7 @@
<div th:replace="grants/fragments/grantDashboardFragment :: grantDashboard(grant=${grant})"/>
</th:block>
</div>
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${grants}, noRecordsMessage=' одного гранта', url='grant')"/>
</div>
</section>
</div>

View File

@ -24,6 +24,7 @@
</div>
<div class="col-md-3 col-sm-12">
</div>
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${grants}, noRecordsMessage=' одного гранта', url='grant')"/>
</div>
</div>
</section>

View File

@ -18,6 +18,7 @@
<div th:replace="papers/fragments/paperDashboardFragment :: paperDashboard(paper=${paper})"/>
</th:block>
</div>
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${papers}, noRecordsMessage=' одной статьи', url='paper')"/>
</div>
</section>
</div>

View File

@ -43,6 +43,7 @@
</div>
</div>
</div>
<div th:replace="fragments/noRecordsFragment :: noRecords(entities=${filteredPapers.papers}, noRecordsMessage=' одной статьи', url='paper')"/>
</div>
</section>