Add thymeleaf template
This commit is contained in:
parent
410d0d9634
commit
2f68339ba2
@ -1,177 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container" layout:fragment="content">
|
||||
<!-- Services -->
|
||||
<section id="services">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Dashboard</h2>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./grants" class="btn btn-light toolbar-button"><i class="fa fa-list-alt"></i>
|
||||
Список</a>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./dashboard" class="btn btn-light toolbar-button"><i class="fa fa-newspaper-o"
|
||||
aria-hidden="true"></i> Панель управления</a>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./grant" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
Добавить грант</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Гранты</h2>
|
||||
<div th:replace="grants/fragments/grantNavigationFragment"/>
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading"><a href="./grant">Название гранта</a></h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading">Название гранта</h7>
|
||||
<p class="text-muted">Краткое описание</p>
|
||||
<p class="text-muted">Статус: статус</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center" id="dashboard">
|
||||
<th:block th:each="grant : ${grants}">
|
||||
<div th:replace="grants/fragments/grantDashboardFragment :: grantDashboard(grant=${grant})"/>
|
||||
</th:block>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
|
||||
</head>
|
||||
@ -14,49 +14,68 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Редактирование гранта</h2>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./grants" class="btn btn-light toolbar-button"><i class="fa fa-list-alt"></i>
|
||||
Список</a>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./dashboard" class="btn btn-light toolbar-button"><i class="fa fa-newspaper-o"
|
||||
aria-hidden="true"></i> Панель управления</a>
|
||||
</div>
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./grant" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
Добавить грант</a>
|
||||
</div>
|
||||
</div>
|
||||
<div th:replace="grants/fragments/grantNavigationFragment"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="contactForm" name="sentMessage" novalidate="">
|
||||
<form id="grant-form" method="post" th:action="@{'/grants/grant?id='+ *{id == null ? '' : id} + ''}"
|
||||
th:object="${grantDto}">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<input type="hidden" name="id" th:field="*{id}"/>
|
||||
<div class="form-group">
|
||||
<label for="name">Название:</label>
|
||||
<input class="form-control" id="name" type="text" placeholder="Название гранта"
|
||||
required="" data-validation-required-message="Введите название гранта"/>
|
||||
<label for="title">Название:</label>
|
||||
<input class="form-control" id="title" type="text"
|
||||
placeholder="Название гранта"
|
||||
th:field="*{title}"/>
|
||||
<p th:if="${#fields.hasErrors('title')}" th:errors="*{title}"
|
||||
class="alert alert-danger">Incorrect title</p>
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="status">Статус:</label>
|
||||
<select class="form-control" id="status">
|
||||
|
||||
<select class="form-control" th:field="*{status}" id="status">
|
||||
<option th:each="status : ${allStatuses}" th:value="${status}"
|
||||
th:text="${status.name}">Status
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="comment">Комментарий:</label>
|
||||
<textarea class="form-control" rows="3" id="comment"></textarea>
|
||||
<textarea class="form-control" rows="3" id="comment"
|
||||
th:field="*{comment}"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Дедлайн:</label>
|
||||
<input type="date" class="form-control" name="deadline"/>
|
||||
<label>Дедлайны показателей:</label>
|
||||
<div class="row" th:each="deadline, rowStat : *{deadlines}">
|
||||
<input type="hidden" th:field="*{deadlines[__${rowStat.index}__].id}"/>
|
||||
<div class="col-6">
|
||||
<input type="date" class="form-control" name="deadline"
|
||||
th:field="*{deadlines[__${rowStat.index}__].date}"/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input class="form-control" type="text" placeholder="Описание"
|
||||
th:field="*{deadlines[__${rowStat.index}__].description}"/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<a class="btn btn-danger float-right"
|
||||
th:onclick="|$('#deadlines${rowStat.index}\\.description').val('');
|
||||
$('#deadlines${rowStat.index}\\.date').val('');
|
||||
$('#addDeadline').click();|"><span
|
||||
aria-hidden="true"><i class="fa fa-times"/></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p th:if="${#fields.hasErrors('deadlines')}" th:errors="*{deadlines}"
|
||||
class="alert alert-danger">Incorrect title</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" id="addDeadline" name="addDeadline" class="btn btn-primary" value="Добавить
|
||||
дедлайн"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="loader">Загрузить заявку:</label>
|
||||
<div id="loader">
|
||||
@ -70,100 +89,20 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>К этому гранту привязан проект:</label>
|
||||
<p><a href="./#" class="btn btn-primary" ><i class="fa fa-plus-circle" aria-hidden="true">
|
||||
</i> Добавить проект</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Научные показатели:</label>
|
||||
<p><a href="./#" class="btn btn-primary" ><i class="fa fa-plus-circle" aria-hidden="true">
|
||||
</i> Добавить показатель</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Публикационные показатели:</label>
|
||||
<p><a href="./#" class="btn btn-primary" ><i class="fa fa-plus-circle" aria-hidden="true">
|
||||
</i> Добавить показатель</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Последнее изменение:</label>
|
||||
<input type="date" class="form-control" name="date-update"/>
|
||||
</div>
|
||||
<p><a href="#myModal1" class="btn btn-primary" data-toggle="modal">Редактировать
|
||||
участников гранта</a></p>
|
||||
<div id="myModal1" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-hidden="true">×
|
||||
</button>
|
||||
<h4 class="modal-title">Авторы статьи</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Фамилия</th>
|
||||
<th>Имя</th>
|
||||
<th>Отчество</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Иванов</td>
|
||||
<td>Иван</td>
|
||||
<td>Иванович</td>
|
||||
<td>
|
||||
<span class="table-remove"><button type="button"
|
||||
class="btn btn-danger btn-rounded btn-sm my-0">Remove</button></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>text</td>
|
||||
<td>text</td>
|
||||
<td>text</td>
|
||||
<td>
|
||||
<span class="table-remove"><button type="button"
|
||||
class="btn btn-danger btn-rounded btn-sm my-0">Remove</button></span>
|
||||
</td>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle"
|
||||
type="button" data-toggle="dropdown">Выберите автора
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<input class="form-control" id="myInput" type="text"
|
||||
placeholder="Search.."/>
|
||||
<li><a href="#">Иванов</a></li>
|
||||
<li><a href="#">Смирнов</a></li>
|
||||
<li><a href="#">Кузнецов</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary">Сохранить изменения
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
Отмена
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" id="createProject" name="createProject" class="btn btn-primary"
|
||||
value="Добавить проект"/>
|
||||
<input type = "hidden" th:field="*{project.id}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<button id="sendMessageButton" class="btn btn-success text-uppercase"
|
||||
<button id="sendMessageButton" name="save" class="btn btn-success text-uppercase"
|
||||
type="submit">
|
||||
Сохранить
|
||||
</button>
|
||||
<button id="cancelButton" class="btn btn-default text-uppercase" type="button">
|
||||
<button id="cancelButton" class="btn btn-default text-uppercase" href="/grants/grants">
|
||||
Отмена
|
||||
</button>
|
||||
</div>
|
||||
@ -188,10 +127,7 @@
|
||||
console.debug(response);
|
||||
}
|
||||
});
|
||||
|
||||
getFromRest(urlPaperStatuses, function (response) {
|
||||
fillSelect($("#status"), response);
|
||||
});
|
||||
$('.selectpicker').selectpicker();
|
||||
});
|
||||
/*]]>*/
|
||||
</script>
|
||||
|
36
src/main/resources/templates/grants/grants.html
Normal file
36
src/main/resources/templates/grants/grants.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default" xmlns:th="">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" layout:fragment="content">
|
||||
<form id="grants-form" method="post" th:action="@{'/grants/grants'}">
|
||||
<input th:type="hidden" name="grantDeleteId" id="grantDeleteId"/>
|
||||
<section id="grants">
|
||||
<div class="container">
|
||||
<div class="row" id="grant-list">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Гранты</h2>
|
||||
<div th:replace="grants/fragments/grantNavigationFragment"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-12">
|
||||
<th:block th:each="grant : ${grants}">
|
||||
<div th:replace="grants/fragments/grantLineFragment :: grantLine(grant=${grant})"/>
|
||||
</th:block>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="modalDelete"/>
|
||||
</form>
|
||||
<script src="/js/grants.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user