#103 merge with dev

This commit is contained in:
T-Midnight 2019-06-05 09:36:29 +04:00
parent c77702704f
commit 1ff38fc80e
22 changed files with 46 additions and 40 deletions

View File

@ -25,9 +25,9 @@ import ru.ulstu.user.service.UserService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Collections;
import java.util.stream.Collectors;
import static org.springframework.util.ObjectUtils.isEmpty;

View File

@ -1,6 +1,5 @@
package ru.ulstu.grant.service;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

View File

@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.grant.model.Grant;
import ru.ulstu.grant.model.GrantDto;
import ru.ulstu.project.model.Project;
import ru.ulstu.project.model.ProjectDto;

View File

@ -12,16 +12,16 @@ import ru.ulstu.grant.model.Grant;
import ru.ulstu.timeline.model.Event;
import ru.ulstu.user.model.User;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.OneToMany;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -6,13 +6,8 @@ import org.hibernate.validator.constraints.NotBlank;
import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.core.model.EventSource;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.deadline.service.DeadlineService;
import ru.ulstu.students.repository.SchedulerRepository;
import ru.ulstu.students.repository.TaskRepository;
import ru.ulstu.tags.model.Tag;
import ru.ulstu.tags.service.TagService;
import ru.ulstu.timeline.model.Event;
import ru.ulstu.timeline.service.EventService;
import ru.ulstu.user.model.User;
import ru.ulstu.user.service.UserService;

View File

@ -18,15 +18,15 @@ import ru.ulstu.tags.service.TagService;
import ru.ulstu.timeline.service.EventService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Collectors;
import static org.springframework.util.ObjectUtils.isEmpty;

View File

@ -18,7 +18,6 @@ import ru.ulstu.timeline.repository.EventRepository;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.service.UserService;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

View File

@ -3,7 +3,6 @@ package ru.ulstu.user.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.annotation.Secured;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -33,7 +32,6 @@ import ru.ulstu.user.service.UserSessionService;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import java.util.Map;
import static ru.ulstu.user.controller.UserController.URL;

View File

@ -9,8 +9,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import ru.ulstu.configuration.Constants;
import ru.ulstu.odin.controller.OdinController;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.model.User;
import ru.ulstu.user.model.UserDto;
import ru.ulstu.user.model.UserListDto;
import ru.ulstu.user.service.UserService;
import ru.ulstu.user.service.UserSessionService;

View File

@ -8,8 +8,10 @@
<div class="col">
<span th:replace="grants/fragments/grantStatusFragment :: grantStatus(grantStatus=${grant.status})"/>
<a th:href="@{'grant?id='+${grant.id}}">
<span class="h6" th:if="${#strings.length(grant.title) > 50}" th:text="${#strings.substring(grant.title, 0, 50)} + '...'" th:title="${grant.title}"/>
<span class="h6" th:if="${#strings.length(grant.title) le 50}" th:text="${grant.title}" th:title="${grant.title}"/>
<span class="h6" th:if="${#strings.length(grant.title) > 50}"
th:text="${#strings.substring(grant.title, 0, 50)} + '...'" th:title="${grant.title}"/>
<span class="h6" th:if="${#strings.length(grant.title) le 50}" th:text="${grant.title}"
th:title="${grant.title}"/>
<span class="text-muted" th:text="${grant.authorsString}"/>
</a>
<input class="id-class" type="hidden" th:value="${grant.id}"/>

View File

@ -8,8 +8,10 @@
<div class="col">
<span th:replace="papers/fragments/paperStatusFragment :: paperStatus(paperStatus=${paper.status})"/>
<a th:href="@{'paper?id='+${paper.id}}">
<span class="h6" th:if="${#strings.length(paper.title)} > 50" th:text="${#strings.substring(paper.title, 0, 50) + '...'}" th:title="${paper.title}"/>
<span class="h6" th:if="${#strings.length(paper.title) le 50}" th:text="${paper.title}" th:title="${paper.title}"/>
<span class="h6" th:if="${#strings.length(paper.title)} > 50"
th:text="${#strings.substring(paper.title, 0, 50) + '...'}" th:title="${paper.title}"/>
<span class="h6" th:if="${#strings.length(paper.title) le 50}" th:text="${paper.title}"
th:title="${paper.title}"/>
<span class="text-muted" th:text="${paper.authorsString}"/>
</a>
<input class="id-class" type="hidden" th:value="${paper.id}"/>

View File

@ -530,6 +530,7 @@
}
}
</script>
<script th:inline="javascript">
/*<![CDATA[*/

View File

@ -98,9 +98,11 @@
</div>
<div class="col-12" style="margin-bottom: 15px;"></div>
<div class="col-10 div-deadline-executor">
<select class="selectpicker form-control" multiple="true" data-live-search="true"
<select class="selectpicker form-control" multiple="true"
data-live-search="true"
title="-- Выберите исполнителя --" id="executors"
th:field="*{deadlines[__${rowStat.index}__].executors}" data-size="5">
th:field="*{deadlines[__${rowStat.index}__].executors}"
data-size="5">
<option th:each="executors : ${allExecutors}" th:value="${executors.id}"
th:text="${executors.lastName}"> Участник
</option>

View File

@ -1,7 +1,7 @@
<!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">
layout:decorator="default">
<head>
<script src="/js/users.js"></script>
<link rel="stylesheet" href="../css/base.css"/>
@ -35,7 +35,8 @@
<input type="text" name="email" id="resetKey" class="form-control"
placeholder="Код подтверждения" style="display:none"/>
</div>
<div id="dvloader" class="loader" style="display:none"><img src="../img/main/ajax-loader.gif" /></div>
<div id="dvloader" class="loader" style="display:none"><img src="../img/main/ajax-loader.gif"/>
</div>
<button id="btnSend" type="button" onclick="requestResetPassword()"
class="btn btn-success btn-block">
Отправить код подтверждения

View File

@ -29,6 +29,7 @@
showFeedbackMessage(error, MessageTypesEnum.WARNING)
});
/*]]>*/
</script>
</div>
</body>

View File

@ -7,9 +7,13 @@
<div th:fragment="userDashboard (user)" class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3 dashboard-card">
<div class="row">
<div class="col col-10">
<b><p th:text="${user.user.lastName} + ' ' + ${user.user.firstName} + ' ' + ${user.user.patronymic}"></p></b>
<i><p th:if="${user.conference != null}" th:text="'Сейчас на конференции ' + ${user.conference.title}"></p></i>
<i><p th:if="${user.lesson != null}" th:text="'Сейчас на паре ' + ${user.lesson.nameOfLesson} + ' в аудитории ' + ${user.lesson.room}"></p></i>
<b><p th:text="${user.user.lastName} + ' ' + ${user.user.firstName} + ' ' + ${user.user.patronymic}"></p>
</b>
<i><p th:if="${user.conference != null}" th:text="'Сейчас на конференции ' + ${user.conference.title}"></p>
</i>
<i><p th:if="${user.lesson != null}"
th:text="'Сейчас на паре ' + ${user.lesson.nameOfLesson} + ' в аудитории ' + ${user.lesson.room}"></p>
</i>
<p th:if="${user.isOnline()}">Онлайн</p>
</div>
</div>

View File

@ -20,7 +20,10 @@ import ru.ulstu.user.model.User;
import ru.ulstu.user.service.UserService;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;