fix paper status template

This commit is contained in:
Anton Romanov 2018-12-20 23:30:25 +04:00
parent 823f7a7743
commit 6e14860c34
6 changed files with 61 additions and 60 deletions

View File

@ -20,15 +20,27 @@ a:hover {
}
.text-primary {
color: #29c0ff !important;
color: #228bba !important;
}
.text-warning {
color: red !important;
color: #940000 !important;
}
.text-review {
color: #94028d !important;
}
.text-success {
color: #00fe8e !important;
color: #007741 !important;
}
.text-accepted {
color: #fec503 !important;
}
.text-not-accepted {
color: #A38831 !important;
}
.text-failed {

View File

@ -15,7 +15,7 @@
</div>
<div class="row justify-content-center" id="dashboard">
<th:block th:each="paper : ${papers}">
<div th:replace="papers/fragments/paperDashboardFragment :: titleLine(paper=${paper})"/>
<div th:replace="papers/fragments/paperDashboardFragment :: paperDashboard(paper=${paper})"/>
</th:block>
</div>
</div>

View File

@ -4,32 +4,10 @@
<meta charset="UTF-8"/>
</head>
<body>
<div th:fragment="titleLine (paper)" class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3 dashboard-card">
<div th:fragment="paperDashboard (paper)" class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3 dashboard-card">
<div class="row">
<div class="col-2">
<span class="fa-stack fa-1x">
<th:block th:switch="${paper.status.name()}">
<div th:case="'ATTENTION'">
<i class="fa fa-circle fa-stack-2x text-warning"></i>
</div>
<div th:case="'DRAFT'">
<i class="fa fa-circle fa-stack-2x text-draft"></i>
</div>
<div th:case="'ON_PREPARATION'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'ON_REVIEW'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'COMPLETED'">
<i class="fa fa-circle fa-stack-2x text-success"></i>
</div>
<div th:case="'FAILED'">
<i class="fa fa-circle fa-stack-2x text-failed"></i>
</div>
</th:block>
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
</span>
<span th:replace="papers/fragments/paperStatusFragment :: paperStatus(paperStatus=${paper.status})"/>
</div>
<div class="col col-10 text-right">
<h7 class="service-heading" th:text="${paper.title}"> title</h7>

View File

@ -4,31 +4,9 @@
<meta charset="UTF-8"/>
</head>
<body>
<div th:fragment="titleLine (paper)" class="row text-left paper-row" style="background-color: white;">
<div th:fragment="paperLine (paper)" class="row text-left paper-row" style="background-color: white;">
<div class="col">
<span class="fa-stack fa-1x">
<th:block th:switch="${paper.status.name()}">
<div th:case="'ATTENTION'">
<i class="fa fa-circle fa-stack-2x text-warning"></i>
</div>
<div th:case="'DRAFT'">
<i class="fa fa-circle fa-stack-2x text-draft"></i>
</div>
<div th:case="'ON_PREPARATION'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'ON_REVIEW'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'COMPLETED'">
<i class="fa fa-circle fa-stack-2x text-success"></i>
</div>
<div th:case="'FAILED'">
<i class="fa fa-circle fa-stack-2x text-failed"></i>
</div>
</th:block>
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
</span>
<span th:replace="papers/fragments/paperStatusFragment :: paperStatus(paperStatus=${paper.status})"/>
<a th:href="@{'paper?id='+${paper.id}}">
<span class="h6" th:text="${paper.title}"/>
<span class="text-muted" th:text="${paper.authorsString}"/>

View File

@ -0,0 +1,37 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="headerfiles">
<meta charset="UTF-8"/>
</head>
<body>
<span th:fragment="paperStatus (paperStatus)" class="fa-stack fa-1x">
<th:block th:switch="${paperStatus.name()}">
<div th:case="'ATTENTION'">
<i class="fa fa-circle fa-stack-2x text-warning"></i>
</div>
<div th:case="'DRAFT'">
<i class="fa fa-circle fa-stack-2x text-draft"></i>
</div>
<div th:case="'ON_PREPARATION'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div th:case="'ON_REVIEW'">
<i class="fa fa-circle fa-stack-2x text-review"></i>
</div>
<div th:case="'COMPLETED'">
<i class="fa fa-circle fa-stack-2x text-success"></i>
</div>
<div th:case="'FAILED'">
<i class="fa fa-circle fa-stack-2x text-failed"></i>
</div>
<div th:case="'ACCEPTED'">
<i class="fa fa-circle fa-stack-2x text-accepted"></i>
</div>
<div th:case="'NOT_ACCEPTED'">
<i class="fa fa-circle fa-stack-2x text-not-accepted"></i>
</div>
</th:block>
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
</span>
</body>
</html>

View File

@ -20,7 +20,7 @@
<div class="row">
<div class="col-md-9 col-sm-12">
<th:block th:each="paper : ${filteredPapers.papers}">
<div th:replace="papers/fragments/paperLineFragment :: titleLine(paper=${paper})"/>
<div th:replace="papers/fragments/paperLineFragment :: paperLine(paper=${paper})"/>
</th:block>
</div>
<div class="col-md-3 col-sm-12">
@ -28,12 +28,13 @@
<h5>Фильтр:</h5>
<select class="form-control" th:field="${filteredPapers.filterAuthorId}" id="author"
onchange="this.form.submit();">
<option value="">Все авторы </option>
<option value="">Все авторы</option>
<option th:each="author: ${allAuthors}" th:value="${author.id}"
th:text="${author.lastName}">lastName
</option>
</select>
<select class="form-control" id="year" th:field="${filteredPapers.year}" onchange="this.form.submit();">
<select class="form-control" id="year" th:field="${filteredPapers.year}"
onchange="this.form.submit();">
<option value="">Все годы</option>
<option th:each="year: ${allYears}" th:value="${year}"
th:text="${year}">year
@ -48,11 +49,6 @@
<div id="modalDelete"/>
</form>
<script src="/js/papers.js"></script>
<script type="text/javascript">
</script>
</div>
</body>