Merge branch 'dev' into 81-students-create-database
# Conflicts: # src/main/resources/db/changelog-master.xml
This commit is contained in:
commit
5ffb2d547e
@ -14,6 +14,7 @@ public class MvcConfiguration extends WebMvcConfigurerAdapter {
|
||||
registry.addViewController("/papers/{articlename:\\w+}");
|
||||
registry.addViewController("/grants/{articlename:\\w+}");
|
||||
registry.addViewController("/conferences/{articlename:\\w+}");
|
||||
registry.addViewController("/students/{articlename:\\w+}");
|
||||
registry.addRedirectViewController("/", "/index");
|
||||
registry.addRedirectViewController("/default", "/index");
|
||||
}
|
||||
|
57
src/main/resources/db/changelog-20190331_000010-schema.xml
Normal file
57
src/main/resources/db/changelog-20190331_000010-schema.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||
<changeSet author="vova" id="20190331_000010-1">
|
||||
<createTable tableName="conference">
|
||||
<column name="id" type="integer">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="title" type="varchar(300)"/>
|
||||
<column name="description" type="varchar(500)"/>
|
||||
<column name="url" type="varchar(255)"/>
|
||||
<column name="ping" type="integer"/>
|
||||
<column name="begin_date" type="timestamp"/>
|
||||
<column name="end_date" type="timestamp"/>
|
||||
</createTable>
|
||||
<addPrimaryKey columnNames="id" constraintName="pk_conference" tableName="conference"/>
|
||||
</changeSet>
|
||||
|
||||
|
||||
<changeSet author="vova" id="20190331_000010-2">
|
||||
<createTable tableName="paper_conference">
|
||||
<column name="conference_id" type="integer"/>
|
||||
<column name="paper_id" type="integer"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="paper_conference" baseColumnNames="conference_id"
|
||||
constraintName=" fk_paper_conference_conference" referencedTableName="conference"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint baseTableName="paper_conference" baseColumnNames="paper_id"
|
||||
constraintName="fk_paper_conference_paper" referencedTableName="paper"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="vova" id="20190331_000010-3">
|
||||
<createTable tableName="users_conference">
|
||||
<column name="conference_id" type="integer"/>
|
||||
<column name="users_id" type="integer"/>
|
||||
<column name="participation" type="boolean"/>
|
||||
<column name="deposit" type="varchar(255)"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="users_conference" baseColumnNames="conference_id"
|
||||
constraintName=" fk_users_conference_conference" referencedTableName="conference"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint baseTableName="users_conference" baseColumnNames="users_id"
|
||||
constraintName="fk_users_conference_users" referencedTableName="users"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="vova" id="20190331_000010-4">
|
||||
<addColumn tableName="deadline">
|
||||
<column name="conference_id" type="integer"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint baseTableName="deadline" baseColumnNames="conference_id"
|
||||
constraintName=" fk_deadlines_conference" referencedTableName="conference"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
@ -22,5 +22,6 @@
|
||||
<include file="db/changelog-20190318_000001-schema.xml"/>
|
||||
<include file="db/changelog-20190327_000000-schema.xml"/>
|
||||
<include file="db/changelog-20190331_000000-schema.xml"/>
|
||||
<include file="db/changelog-20190331_000010-schema.xml"/>
|
||||
<include file="db/common/changelog-20190312_130000-schema.xml"/>
|
||||
</databaseChangeLog>
|
24
src/main/resources/public/css/tasks.css
Normal file
24
src/main/resources/public/css/tasks.css
Normal file
@ -0,0 +1,24 @@
|
||||
.bootstrap-tagsinput{
|
||||
|
||||
width: 100%;
|
||||
padding: .375rem .75rem;
|
||||
}
|
||||
|
||||
.bootstrap-tagsinput .label{
|
||||
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 75%;
|
||||
font-weight: 700;
|
||||
line-height: 2.5;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
}
|
||||
|
||||
.bootstrap-tagsinput .label-info{
|
||||
|
||||
background-color: orange;
|
||||
}
|
43
src/main/resources/public/js/tasks.js
Normal file
43
src/main/resources/public/js/tasks.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function () {
|
||||
$(".task-row").mouseenter(function (event) {
|
||||
var taskRow = $(event.target).closest(".task-row");
|
||||
$(taskRow).css("background-color", "#f8f9fa");
|
||||
$(taskRow).find(".remove-task").removeClass("d-none");
|
||||
|
||||
});
|
||||
$(".task-row").mouseleave(function (event) {
|
||||
var taskRow = $(event.target).closest(".task-row");
|
||||
$(taskRow).css("background-color", "white");
|
||||
$(taskRow).closest(".task-row").find(".remove-task").addClass("d-none");
|
||||
});
|
||||
|
||||
$('a[data-confirm]').click(function(ev) {
|
||||
var href = $(this).attr('href');
|
||||
if (!$('#dataConfirmModal').length) {
|
||||
$('#modalDelete').append('<div class="modal fade" id="dataConfirmModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"\n' +
|
||||
' >\n' +
|
||||
' <div class="modal-dialog modal-sm">\n' +
|
||||
' <div class="modal-content">\n' +
|
||||
' <div class="modal-header">\n' +
|
||||
' <h8 class="modal-title" id="myModalLabel">Удалить статью?</h8>\n' +
|
||||
' <button type="button" class="close" data-dismiss="modal" aria-label="Закрыть"><span\n' +
|
||||
' aria-hidden="true">×</span></button>\n' +
|
||||
' </div>\n' +
|
||||
|
||||
' <div class="modal-footer">\n' +
|
||||
' <a class="btn btn-primary" id="dataConfirmOK">Да</a>'+
|
||||
' <button class="btn primary" data-dismiss="modal" aria-hidden="true">Нет</button>'+
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>');
|
||||
}
|
||||
$('#dataConfirmModal').find('#myModalLabel').text($(this).attr('data-confirm'));
|
||||
$('#dataConfirmOK').attr('href', href);
|
||||
$('#dataConfirmModal').modal({show:true});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
/*]]>*/
|
@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6 portfolio-item">
|
||||
<a class="portfolio-link" data-toggle="modal" href="/students">
|
||||
<a class="portfolio-link" href="./students/tasks">
|
||||
<div class="portfolio-hover">
|
||||
<div class="portfolio-hover-content">
|
||||
<i class="fa fa-arrow-right fa-3x"></i>
|
||||
|
26
src/main/resources/templates/students/dashboard.html
Normal file
26
src/main/resources/templates/students/dashboard.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" layout:fragment="content">
|
||||
<section id="services">
|
||||
<div class="container">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Работа со студентами</h2>
|
||||
<div th:replace="students/fragments/taskNavigationFragment"/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row justify-content-center" id="dashboard">
|
||||
<div th:replace="students/fragments/taskDashboardFragment"/>
|
||||
<!--<th:block th:each="task : ${tasks}">-->
|
||||
<!--<div th:replace="students/fragments/taskDashboardFragment :: taskDashboard(task=${task})"/>-->
|
||||
<!--</th:block>-->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<div th:fragment="taskDashboard (task)" 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 th:replace="students/fragments/taskStatusFragment :: taskStatus(taskStatus=${task.status})"/>-->
|
||||
<span th:replace="students/fragments/taskStatusFragment"/>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<!--<h7 class="service-heading" th:text="${task.title}"> title</h7>-->
|
||||
<!--<p class="text-muted" th:text="${task.typeString}">authors</p>-->
|
||||
<h7 class="service-heading" th:text="Title"> title</h7>
|
||||
<p class="text-muted" th:text="Type">type</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row text-left task-row" style="background-color: white;">
|
||||
<div class="col">
|
||||
<span th:replace="students/fragments/taskStatusFragment"/>
|
||||
<a th:href="@{'task?id='+ 1}">
|
||||
<span class="h6" >Первая хадач</span>
|
||||
<span class="text-muted">Курсовая работа</span>
|
||||
</a>
|
||||
<input class="id-class" type="hidden" th:value="1" />
|
||||
<a class="remove-task pull-right d-none" th:href="@{'/students/delete/'+1}"
|
||||
data-confirm="Удалить задачу?">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
</head>
|
||||
<body>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
||||
<a href="./tasks" 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="./task" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle"
|
||||
aria-hidden="true"></i>
|
||||
Добавить задачу</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<span th:fragment="taskStatus (taskStatus)" class="fa-stack fa-1x">
|
||||
<!--<th:block th:switch="${taskStatus.name()}">-->
|
||||
<th:block th:switch="'ON_PREPARATION'">
|
||||
<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-check fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
118
src/main/resources/templates/students/task.html
Normal file
118
src/main/resources/templates/students/task.html
Normal file
@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default" xmlns:th="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css"/>
|
||||
<link rel="stylesheet" href="../css/tasks.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container" layout:fragment="content">
|
||||
|
||||
<section id="paper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Редактирование задачи</h2>
|
||||
<div th:replace="students/fragments/taskNavigationFragment"/>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="task-form" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<input type="hidden" name="id"/>
|
||||
<div class="form-group">
|
||||
<label for="title">Название:</label>
|
||||
<input class="form-control" id="title" type="text" placeholder="Название задачи"/>
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="status">Статус:</label>
|
||||
<select class="form-control" id="status">
|
||||
<option>Status</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment">Описание задачи:</label>
|
||||
<textarea class="form-control" rows="3" id="comment"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="tags">Теги:</label>
|
||||
<input class="form-control" data-role="tagsinput" placeholder="Теги задачи" id="tags"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Дедлайны задачи:</label>
|
||||
<div class="row">
|
||||
<input type="hidden" />
|
||||
<div class="col-6">
|
||||
<input type="date" class="form-control" name="deadline"/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input class="form-control" type="text" placeholder="Описание"/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<a class="btn btn-danger float-right"><span
|
||||
aria-hidden="true"><i class="fa fa-times"/></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" id="addDeadline" name="addDeadline" class="btn btn-primary" value="Добавить
|
||||
дедлайн"/>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="form-group">
|
||||
<button id="sendMessageButton" name="save" class="btn btn-success text-uppercase"
|
||||
type="submit">
|
||||
Сохранить
|
||||
</button>
|
||||
<button id="cancelButton" class="btn btn-default text-uppercase" href="/students/tasks">
|
||||
Отмена
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 offset-md-1 col-sm-12 offset-sm-0">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6 class="my-0">Дата создания:</h6>
|
||||
</div>
|
||||
<div class="col">
|
||||
<small class="text-muted">
|
||||
<!--th:text="${taskDto.createDate == null ? '' : #dates.format(taskDto.createDate, 'dd.MM.yyyy HH:mm')}">-->
|
||||
text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h6 class="my-0">Дата изменения:</h6>
|
||||
</div>
|
||||
<div class="col">
|
||||
<small class="text-muted">
|
||||
<!--th:text="${paperDto.updateDate == null ? '' : #dates.format(paperDto.updateDate, 'dd.MM.yyyy HH:mm')}">-->
|
||||
text
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
66
src/main/resources/templates/students/tasks.html
Normal file
66
src/main/resources/templates/students/tasks.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default" xmlns:th="">
|
||||
<head>
|
||||
<link rel="stylesheet" href="../css/tasks.css"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" layout:fragment="content">
|
||||
<form id="tasks-form" method="post" th:action="@{'/tasks/tasks'}">
|
||||
<input th:type="hidden" name="taskDeleteId" id="taskDeleteId"/>
|
||||
<section id="tasks">
|
||||
<div class="container">
|
||||
<div class="row" id="task-list">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Работа со студентами</h2>
|
||||
<div th:replace="students/fragments/taskNavigationFragment"/>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-sm-12">
|
||||
<th:block>
|
||||
<div th:replace="students/fragments/taskLineFragment"/>
|
||||
</th:block>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-12">
|
||||
<div class="filter">
|
||||
<h5>Фильтр:</h5>
|
||||
<select class="form-control" id="status"
|
||||
onchange="this.form.submit();">
|
||||
<option value="">Все статусы</option>
|
||||
<!--<option th:each="author: ${allAuthors}" th:value="${author.id}"-->
|
||||
<!--th:text="${author.lastName}">lastName-->
|
||||
<!--</option>-->
|
||||
</select>
|
||||
<select class="form-control" id="tags"
|
||||
onchange="this.form.submit();">
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<option value="">Все типы</option>
|
||||
<!--<option th:each="year: ${allYears}" th:value="${year}"-->
|
||||
<!--th:text="${year}">year-->
|
||||
<!--</option>-->
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="modalDelete"/>
|
||||
</form>
|
||||
<script src="/js/tasks.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user