Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
df6bc223aa
@ -16,11 +16,14 @@ buildscript {
|
||||
group 'ru.ulstu'
|
||||
version '0.1.0-SNAPSHOT'
|
||||
|
||||
apply plugin: 'application'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
mainClassName = 'ru.ulstu.NgTrackerApplication'
|
||||
|
||||
build.dependsOn checkstyleMain
|
||||
bootRun.dependsOn checkstyleMain
|
||||
|
||||
|
@ -12,6 +12,7 @@ public class MvcConfiguration extends WebMvcConfigurerAdapter {
|
||||
registry.addViewController("/{articlename:\\w+}");
|
||||
//registry.addViewController("/admin/{articlename:\\w+}");
|
||||
registry.addViewController("/papers/{articlename:\\w+}");
|
||||
registry.addViewController("/grants/{articlename:\\w+}");
|
||||
registry.addRedirectViewController("/", "/index");
|
||||
registry.addRedirectViewController("/default", "/index");
|
||||
}
|
||||
|
@ -11,8 +11,15 @@ import ru.ulstu.core.error.EntityIdIsNullException;
|
||||
import ru.ulstu.core.model.ErrorConstants;
|
||||
import ru.ulstu.core.model.response.Response;
|
||||
import ru.ulstu.core.model.response.ResponseExtended;
|
||||
import ru.ulstu.user.error.*;
|
||||
import ru.ulstu.user.error.*;
|
||||
import ru.ulstu.user.error.UserActivationError;
|
||||
import ru.ulstu.user.error.UserEmailExistsException;
|
||||
import ru.ulstu.user.error.UserIdExistsException;
|
||||
import ru.ulstu.user.error.UserIsUndeadException;
|
||||
import ru.ulstu.user.error.UserLoginExistsException;
|
||||
import ru.ulstu.user.error.UserNotActivatedException;
|
||||
import ru.ulstu.user.error.UserNotFoundException;
|
||||
import ru.ulstu.user.error.UserPasswordsNotValidOrNotMatchException;
|
||||
import ru.ulstu.user.error.UserResetKeyError;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -5,12 +5,25 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.ulstu.core.error.OdinException;
|
||||
import ru.ulstu.odin.model.*;
|
||||
import ru.ulstu.odin.model.*;
|
||||
import ru.ulstu.odin.model.OdinBooleanField;
|
||||
import ru.ulstu.odin.model.OdinCollectionField;
|
||||
import ru.ulstu.odin.model.OdinDateField;
|
||||
import ru.ulstu.odin.model.OdinDto;
|
||||
import ru.ulstu.odin.model.OdinField;
|
||||
import ru.ulstu.odin.model.OdinMetadata;
|
||||
import ru.ulstu.odin.model.OdinNumericField;
|
||||
import ru.ulstu.odin.model.OdinObjectField;
|
||||
import ru.ulstu.odin.model.OdinStringField;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
@ -23,7 +23,12 @@ import java.util.Set;
|
||||
@Entity
|
||||
public class Paper extends BaseEntity implements UserContainer {
|
||||
public enum PaperStatus {
|
||||
ATTENTION("Обратить внимание"), ON_PREPARATION("На подготовке"), DRAFT("Черновик"), COMPLETED("Завершена");
|
||||
ATTENTION("Обратить внимание"),
|
||||
ON_PREPARATION("На подготовке"),
|
||||
ON_REVIEW("На проверке"),
|
||||
DRAFT("Черновик"),
|
||||
COMPLETED("Завершена"),
|
||||
FAILED("Провалены сроки");
|
||||
|
||||
private String name;
|
||||
|
||||
|
@ -8,6 +8,7 @@ import ru.ulstu.user.model.UserDto;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static ru.ulstu.core.util.StreamApiUtils.convert;
|
||||
|
||||
@ -121,4 +122,11 @@ public class PaperDto {
|
||||
public Set<UserDto> getAuthors() {
|
||||
return authors;
|
||||
}
|
||||
|
||||
public String getAuthorsString() {
|
||||
return authors
|
||||
.stream()
|
||||
.map(author -> author.getLastName() + author.getFirstName())
|
||||
.collect(Collectors.joining(", "));
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ public class PaperNotificationService {
|
||||
private boolean needToSendDeadlineNotification(Paper paper, Date compareDate, boolean isDeadlineBeforeWeek) {
|
||||
return (paper.getDeadlineDate() != null)
|
||||
&& (compareDate.after(paper.getDeadlineDate()) && isDeadlineBeforeWeek
|
||||
|| compareDate.before(paper.getDeadlineDate()) && !isDeadlineBeforeWeek);
|
||||
|| compareDate.before(paper.getDeadlineDate()) && !isDeadlineBeforeWeek)
|
||||
&& paper.getDeadlineDate().after(new Date());
|
||||
}
|
||||
|
||||
private void sendMessageDeadline(Paper paper) {
|
||||
@ -54,4 +55,11 @@ public class PaperNotificationService {
|
||||
mailService.sendEmailFromTemplate(variables, author, "paperStatusChangeNotification", "Изменился статус статьи");
|
||||
});
|
||||
}
|
||||
|
||||
public void sendFailedNotification(Paper paper, Paper.PaperStatus oldStatus) {
|
||||
Map<String, Object> variables = ImmutableMap.of("paper", paper, "oldStatus", oldStatus);
|
||||
paper.getAuthors().forEach(author -> {
|
||||
mailService.sendEmailFromTemplate(variables, author, "paperFailedNotification", "Статья провалена");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -6,16 +6,16 @@ import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DeadlineScheduler {
|
||||
public class PaperScheduler {
|
||||
private final static boolean IS_DEADLINE_NOTIFICATION_BEFORE_WEEK = true;
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(DeadlineScheduler.class);
|
||||
private final Logger log = LoggerFactory.getLogger(PaperScheduler.class);
|
||||
|
||||
private final PaperNotificationService paperNotificationService;
|
||||
private final PaperService paperService;
|
||||
|
||||
public DeadlineScheduler(PaperNotificationService paperNotificationService,
|
||||
PaperService paperService) {
|
||||
public PaperScheduler(PaperNotificationService paperNotificationService,
|
||||
PaperService paperService) {
|
||||
this.paperNotificationService = paperNotificationService;
|
||||
this.paperService = paperService;
|
||||
}
|
||||
@ -23,15 +23,22 @@ public class DeadlineScheduler {
|
||||
|
||||
@Scheduled(cron = "0 0 8 * 1 ?")
|
||||
public void checkDeadlineBeforeWeek() {
|
||||
log.debug("DeadlineScheduler.checkDeadlineBeforeWeek started");
|
||||
log.debug("PaperScheduler.checkDeadlineBeforeWeek started");
|
||||
paperNotificationService.sendDeadlineNotifications(paperService.findAll(), !IS_DEADLINE_NOTIFICATION_BEFORE_WEEK);
|
||||
log.debug("DeadlineScheduler.checkDeadlineBeforeWeek finished");
|
||||
log.debug("PaperScheduler.checkDeadlineBeforeWeek finished");
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0 8 * * ?")
|
||||
public void checkDeadlineAfterWeek() {
|
||||
log.debug("DeadlineScheduler.checkDeadlineAfterWeek started");
|
||||
log.debug("PaperScheduler.checkDeadlineAfterWeek started");
|
||||
paperNotificationService.sendDeadlineNotifications(paperService.findAll(), IS_DEADLINE_NOTIFICATION_BEFORE_WEEK);
|
||||
log.debug("DeadlineScheduler.checkDeadlineAfterWeek finished");
|
||||
log.debug("PaperScheduler.checkDeadlineAfterWeek finished");
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0 6 * * ?")
|
||||
public void closeFailedPapers() {
|
||||
log.debug("PaperScheduler.closeFailedPapers started");
|
||||
paperService.closeFailedPapers();
|
||||
log.debug("PaperScheduler.closeFailedPapers finished");
|
||||
}
|
||||
}
|
@ -18,6 +18,9 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static ru.ulstu.core.util.StreamApiUtils.convert;
|
||||
import static ru.ulstu.paper.model.Paper.PaperStatus.ATTENTION;
|
||||
import static ru.ulstu.paper.model.Paper.PaperStatus.DRAFT;
|
||||
import static ru.ulstu.paper.model.Paper.PaperStatus.ON_PREPARATION;
|
||||
|
||||
@Service
|
||||
public class PaperService {
|
||||
@ -65,7 +68,7 @@ public class PaperService {
|
||||
paper.setComment(paperDto.getComment());
|
||||
paper.setCreateDate(paper.getCreateDate() == null ? new Date() : paper.getCreateDate());
|
||||
paper.setLocked(paperDto.getLocked());
|
||||
paper.setStatus(paperDto.getStatus() == null ? Paper.PaperStatus.DRAFT : paperDto.getStatus());
|
||||
paper.setStatus(paperDto.getStatus() == null ? DRAFT : paperDto.getStatus());
|
||||
paper.setTitle(paperDto.getTitle());
|
||||
paper.setUpdateDate(new Date());
|
||||
paper.setDeadlineDate(paperDto.getDeadlineDate());
|
||||
@ -115,7 +118,7 @@ public class PaperService {
|
||||
paper.setDeadlineDate(deadlineDate);
|
||||
paper.setCreateDate(new Date());
|
||||
paper.setUpdateDate(new Date());
|
||||
paper.setStatus(Paper.PaperStatus.DRAFT);
|
||||
paper.setStatus(DRAFT);
|
||||
paper = paperRepository.save(paper);
|
||||
|
||||
paperNotificationService.sendCreateNotification(paper);
|
||||
@ -126,4 +129,21 @@ public class PaperService {
|
||||
public List<PaperDto> filter(PaperFilterDto filterDto) {
|
||||
return convert(paperRepository.filter(userService.findById(filterDto.getAuthorId()), filterDto.getYear()), PaperDto::new);
|
||||
}
|
||||
|
||||
public void closeFailedPapers() {
|
||||
List<Paper> papers = paperRepository.findAll()
|
||||
.stream()
|
||||
.filter(paper -> paper.getDeadlineDate() != null
|
||||
&& (paper.getStatus() == ON_PREPARATION
|
||||
|| paper.getStatus() == DRAFT
|
||||
|| paper.getStatus() == ATTENTION)
|
||||
&& paper.getDeadlineDate().before(new Date()))
|
||||
.collect(Collectors.toList());
|
||||
papers.forEach(paper -> {
|
||||
Paper.PaperStatus oldStatus = paper.getStatus();
|
||||
paper.setStatus(Paper.PaperStatus.FAILED);
|
||||
paperRepository.save(paper);
|
||||
paperNotificationService.sendFailedNotification(paper, oldStatus);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,11 @@ public class EventController {
|
||||
return new Response<>(eventService.findAllDto());
|
||||
}
|
||||
|
||||
@GetMapping("/future")
|
||||
public Response<List<EventDto>> getFutureEvents() {
|
||||
return new Response<>(eventService.findAllFutureDto());
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public Response createEvent(@RequestBody @Valid EventDto timelineDto) {
|
||||
return new Response(eventService.create(timelineDto));
|
||||
|
@ -4,6 +4,7 @@ import org.hibernate.validator.constraints.NotBlank;
|
||||
import ru.ulstu.core.model.BaseEntity;
|
||||
import ru.ulstu.user.model.User;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
@ -66,6 +67,10 @@ public class Event extends BaseEntity {
|
||||
@JoinColumn(name = "child_id")
|
||||
private Event child;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "child_id")
|
||||
private List<Event> parents;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
@ -137,4 +142,12 @@ public class Event extends BaseEntity {
|
||||
public void setChild(Event child) {
|
||||
this.child = child;
|
||||
}
|
||||
|
||||
public List<Event> getParents() {
|
||||
return parents;
|
||||
}
|
||||
|
||||
public void setParents(List<Event> parents) {
|
||||
this.parents = parents;
|
||||
}
|
||||
}
|
||||
|
@ -65,9 +65,13 @@ public class EventDto {
|
||||
return title;
|
||||
}
|
||||
|
||||
public PeriodEvent getPeriod() { return period; }
|
||||
public PeriodEvent getPeriod() {
|
||||
return period;
|
||||
}
|
||||
|
||||
public Event.EventStatus getStatus() { return status; }
|
||||
public Event.EventStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
|
@ -3,22 +3,24 @@ package ru.ulstu.timeline.model;
|
||||
import java.time.Period;
|
||||
|
||||
public enum PeriodEvent {
|
||||
EVERY_YEAR(Period.ofYears(1), "Каждый год"),
|
||||
EVERY_MONTH(Period.ofMonths(1), "Каждый месяц"),
|
||||
EVERY_WEEK(Period.ofWeeks(1), "Каждую неделю"),
|
||||
EVERY_DAY(Period.ofDays(1), "Каждый день");
|
||||
EVERY_YEAR(Period.ofYears(1), "Каждый год"),
|
||||
EVERY_MONTH(Period.ofMonths(1), "Каждый месяц"),
|
||||
EVERY_WEEK(Period.ofWeeks(1), "Каждую неделю"),
|
||||
EVERY_DAY(Period.ofDays(1), "Каждый день");
|
||||
|
||||
private Period period;
|
||||
private String message;
|
||||
private Period period;
|
||||
private String message;
|
||||
|
||||
PeriodEvent(Period period, String message) {
|
||||
this.period = period;
|
||||
this.message = message;
|
||||
}
|
||||
this.period = period;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Period getPeriod() { return period; }
|
||||
public Period getPeriod() {
|
||||
return period;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ public interface EventRepository extends JpaRepository<Event, Integer> {
|
||||
@Query("SELECT e FROM Event e WHERE e.executeDate = CURRENT_DATE")
|
||||
List<Event> findByCurrentDate();
|
||||
|
||||
@Query("SELECT e FROM Event e WHERE e.executeDate > CURRENT_DATE")
|
||||
@Query("SELECT e FROM Event e WHERE e.executeDate > CURRENT_DATE ORDER BY e.executeDate")
|
||||
List<Event> findAllFuture();
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ public class EventScheduler {
|
||||
@Scheduled(cron = "0 0 * * * ?")
|
||||
public void checkPeriodEvents() {
|
||||
log.debug("EventScheduler.checkPeriodEvents started");
|
||||
for (Event event : eventService.findAllFuture()) {
|
||||
//TODO: filter
|
||||
for (Event event : eventService.findAll()) {
|
||||
if (halfOfThePeriodHasPassed(event)) {
|
||||
eventService.createBasedOn(event, DateUtils.addDays(event.getExecuteDate(), getShiftInDays(event.getPeriod())));
|
||||
}
|
||||
@ -67,6 +68,6 @@ public class EventScheduler {
|
||||
private boolean halfOfThePeriodHasPassed(Event event) {
|
||||
return event.getPeriod() != null && event.getChild() == null
|
||||
&& new Date().after(
|
||||
DateUtils.addDays(event.getExecuteDate(), (int) -Math.round((double) getShiftInDays(event.getPeriod()) / 2)));
|
||||
DateUtils.addDays(event.getExecuteDate(), (int) Math.round((double) getShiftInDays(event.getPeriod()) / 2)));
|
||||
}
|
||||
}
|
||||
|
@ -57,8 +57,9 @@ public class EventService {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void delete(Integer timelineId) {
|
||||
Event event = eventRepository.findOne(timelineId);
|
||||
public void delete(Integer eventId) {
|
||||
Event event = eventRepository.findOne(eventId);
|
||||
event.setParents(null);
|
||||
eventRepository.delete(event);
|
||||
}
|
||||
|
||||
@ -90,4 +91,8 @@ public class EventService {
|
||||
public List<Event> findAllFuture() {
|
||||
return eventRepository.findAllFuture();
|
||||
}
|
||||
|
||||
public List<EventDto> findAllFutureDto() {
|
||||
return convert(findAllFuture(), EventDto::new);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,15 @@ package ru.ulstu.user.controller;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.access.annotation.Secured;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import ru.ulstu.configuration.Constants;
|
||||
import ru.ulstu.core.model.response.PageableItems;
|
||||
import ru.ulstu.core.model.response.Response;
|
||||
@ -11,10 +19,14 @@ import ru.ulstu.odin.controller.OdinController;
|
||||
import ru.ulstu.odin.model.OdinMetadata;
|
||||
import ru.ulstu.odin.model.OdinVoid;
|
||||
import ru.ulstu.odin.service.OdinService;
|
||||
import ru.ulstu.user.model.*;
|
||||
import ru.ulstu.user.model.UserDto;
|
||||
import ru.ulstu.user.model.UserListDto;
|
||||
import ru.ulstu.user.model.UserResetPasswordDto;
|
||||
import ru.ulstu.user.model.UserRoleConstants;
|
||||
import ru.ulstu.user.model.UserRoleDto;
|
||||
import ru.ulstu.user.model.UserSessionListDto;
|
||||
import ru.ulstu.user.service.UserService;
|
||||
import ru.ulstu.user.service.UserSessionService;
|
||||
import ru.ulstu.user.model.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
@ -5,7 +5,14 @@ import org.hibernate.validator.constraints.Email;
|
||||
import ru.ulstu.configuration.Constants;
|
||||
import ru.ulstu.core.model.BaseEntity;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
@ -1,11 +1,18 @@
|
||||
package ru.ulstu.user.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.ulstu.user.model.*;
|
||||
import ru.ulstu.user.model.*;
|
||||
import ru.ulstu.user.model.User;
|
||||
import ru.ulstu.user.model.UserDto;
|
||||
import ru.ulstu.user.model.UserListDto;
|
||||
import ru.ulstu.user.model.UserRole;
|
||||
import ru.ulstu.user.model.UserRoleDto;
|
||||
import ru.ulstu.user.repository.UserRoleRepository;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
@ -16,13 +16,33 @@ import ru.ulstu.core.error.EntityIdIsNullException;
|
||||
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
||||
import ru.ulstu.core.model.BaseEntity;
|
||||
import ru.ulstu.core.model.response.PageableItems;
|
||||
import ru.ulstu.user.error.*;
|
||||
import ru.ulstu.user.model.*;
|
||||
import ru.ulstu.user.error.UserActivationError;
|
||||
import ru.ulstu.user.error.UserEmailExistsException;
|
||||
import ru.ulstu.user.error.UserIdExistsException;
|
||||
import ru.ulstu.user.error.UserIsUndeadException;
|
||||
import ru.ulstu.user.error.UserLoginExistsException;
|
||||
import ru.ulstu.user.error.UserNotActivatedException;
|
||||
import ru.ulstu.user.error.UserNotFoundException;
|
||||
import ru.ulstu.user.error.UserPasswordsNotValidOrNotMatchException;
|
||||
import ru.ulstu.user.error.UserResetKeyError;
|
||||
import ru.ulstu.user.model.User;
|
||||
import ru.ulstu.user.model.UserDto;
|
||||
import ru.ulstu.user.model.UserListDto;
|
||||
import ru.ulstu.user.model.UserResetPasswordDto;
|
||||
import ru.ulstu.user.model.UserRole;
|
||||
import ru.ulstu.user.model.UserRoleConstants;
|
||||
import ru.ulstu.user.model.UserRoleDto;
|
||||
import ru.ulstu.user.repository.UserRepository;
|
||||
import ru.ulstu.user.repository.UserRoleRepository;
|
||||
import ru.ulstu.user.util.UserUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
@ -6,8 +6,8 @@ import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import ru.ulstu.core.model.response.PageableItems;
|
||||
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
||||
import ru.ulstu.core.model.response.PageableItems;
|
||||
import ru.ulstu.user.error.UserNotFoundException;
|
||||
import ru.ulstu.user.model.User;
|
||||
import ru.ulstu.user.model.UserSession;
|
||||
|
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>Уведомление о провале статьи</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="shortcut icon" th:href="@{|${baseUrl}/favicon.ico|}"/>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Уважаемый(ая) <span th:text="${user.firstName + ' ' + user.lastName}">Ivan Ivanov</span>
|
||||
</p>
|
||||
<p>
|
||||
Статья "<span th:text="${paper.title}">Title</span>" провалена.
|
||||
Предыдущий статус - "<span th:text="${oldStatus.name}">oldStatus</span>".
|
||||
</p>
|
||||
<p>
|
||||
Regards,
|
||||
<br/>
|
||||
<em>NG-tracker.</em>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
@ -20,17 +20,21 @@ a:hover {
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: #fed136 !important;
|
||||
color: #29c0ff !important;
|
||||
}
|
||||
|
||||
.text-warning {
|
||||
color: #fe4819 !important;
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.text-success {
|
||||
color: #00fe8e !important;
|
||||
}
|
||||
|
||||
.text-failed {
|
||||
color: #A38831 !important;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
|
@ -6,17 +6,16 @@ function showPapers(papersElement, paperRowClass) {
|
||||
getFromRest(urlPapers, function (paperList) {
|
||||
paperList.forEach(function (paper, index) {
|
||||
$(papersElement).parent().append("<div class='row text-left paper-row'>" +
|
||||
" <div class='col-md-11'>" +
|
||||
" <div class='col'>" +
|
||||
" <span class='fa-stack fa-1x'>\n" +
|
||||
" <i class='fa fa-circle fa-stack-2x " + getPaperStatusClass(paper.status) + "'></i>" +
|
||||
" <i class='fa fa-file-text-o fa-stack-1x fa-inverse'></i>" +
|
||||
" </span>" +
|
||||
" <a href='paper?id=" + paper.id + "" +
|
||||
"'><span>" + paper.title + "</span></a></div>" +
|
||||
"<div class='col-md-1'>" +
|
||||
"<span class='remove-paper d-none' onclick=\"deletePaper(" + paper.id + ",'" + papersElement + "', '" + paperRowClass + "')\">" +
|
||||
"'><span>" + (index + 1) + ". " + paper.title + "</span></a>" +
|
||||
"<span class='remove-paper d-none pull-right' onclick=\"deletePaper(" + paper.id + ",'" + papersElement + "', '" + paperRowClass + "')\">" +
|
||||
"<i class=\"fa fa-trash\" aria-hidden=\"true\"></i></span>" +
|
||||
" </div></div>");
|
||||
"</div></div>");
|
||||
});
|
||||
|
||||
$(paperRowClass).mouseenter(function (event) {
|
||||
@ -78,11 +77,36 @@ function getPaperStatusClass(status) {
|
||||
return "text-draft"
|
||||
case 'ON_PREPARATION':
|
||||
return "text-primary";
|
||||
case 'ON_REVIEW':
|
||||
return "text-primary";
|
||||
case 'COMPLETED':
|
||||
return "text-success";
|
||||
case 'ATTENTION':
|
||||
return "text-warning";
|
||||
case 'FAILED':
|
||||
return "text-failed";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function showPaperDashboard(dashboardElement) {
|
||||
getFromRest(urlPapers, function (paperList) {
|
||||
paperList.forEach(function (paper, index) {
|
||||
$(dashboardElement).append("<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 " + getPaperStatusClass(paper.status) + "\"></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\">" + paper.title + "</h7>" +
|
||||
"<p class=\"text-muted\">" + paper.authorsString + "</p>" +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</div>");
|
||||
});
|
||||
});
|
||||
}
|
27
src/main/resources/public/js/timeline.js
Normal file
27
src/main/resources/public/js/timeline.js
Normal file
@ -0,0 +1,27 @@
|
||||
var urlTimeline = "/api/1.0/events/future";
|
||||
|
||||
function showTimeline(timelineElement) {
|
||||
$(timelineElement).empty();
|
||||
getFromRest(urlTimeline, function (eventList) {
|
||||
eventList.forEach(function (event, index) {
|
||||
var date = new Date(event.executeDate);
|
||||
var formated_date = date.toLocaleDateString();
|
||||
|
||||
$(timelineElement).append("<li class='" + eventInverted(index) + "'>" +
|
||||
"<div class=\"timeline-image\"><h4><br/>" + formated_date + "</h4></div>" +
|
||||
"<div class=\"timeline-panel\">" +
|
||||
"<div class=\"timeline-heading\">" +
|
||||
"<h4>" + event.title + "</h4>" +
|
||||
"</div>" +
|
||||
"<div class=\"timeline-body\">" +
|
||||
"<p class=\"text-muted\">" + event.description + "</p>" +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"</li>");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function eventInverted(index) {
|
||||
return index % 2 == 1 ? "timeline-inverted" : "";
|
||||
}
|
@ -91,6 +91,34 @@
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="/js/agency.js"></script>
|
||||
<script src="/js/core.js"></script>
|
||||
<!-- Yandex.Metrika counter -->
|
||||
<script type="text/javascript" >
|
||||
(function (d, w, c) {
|
||||
(w[c] = w[c] || []).push(function() {
|
||||
try {
|
||||
w.yaCounter49387279 = new Ya.Metrika2({
|
||||
id:49387279,
|
||||
clickmap:true,
|
||||
trackLinks:true,
|
||||
accurateTrackBounce:true,
|
||||
webvisor:true
|
||||
});
|
||||
} catch(e) { }
|
||||
});
|
||||
|
||||
var n = d.getElementsByTagName("script")[0],
|
||||
s = d.createElement("script"),
|
||||
f = function () { n.parentNode.insertBefore(s, n); };
|
||||
s.type = "text/javascript";
|
||||
s.async = true;
|
||||
s.src = "https://mc.yandex.ru/metrika/tag.js";
|
||||
|
||||
if (w.opera == "[object Opera]") {
|
||||
d.addEventListener("DOMContentLoaded", f, false);
|
||||
} else { f(); }
|
||||
})(document, window, "yandex_metrika_callbacks2");
|
||||
</script>
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/49387279" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<!-- /Yandex.Metrika counter -->
|
||||
</body>
|
||||
</html>
|
||||
|
177
src/main/resources/templates/grants/dashboard.html
Normal file
177
src/main/resources/templates/grants/dashboard.html
Normal file
@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
201
src/main/resources/templates/grants/grant.html
Normal file
201
src/main/resources/templates/grants/grant.html
Normal file
@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
<head>
|
||||
|
||||
</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 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>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<form id="contactForm" name="sentMessage" novalidate="">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="form-group">
|
||||
<label for="name">Название:</label>
|
||||
<input class="form-control" id="name" type="text" placeholder="Название гранта"
|
||||
required="" data-validation-required-message="Введите название гранта"/>
|
||||
<p class="help-block text-danger"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="status">Статус:</label>
|
||||
<select class="form-control" id="status">
|
||||
|
||||
</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>Дедлайн:</label>
|
||||
<input type="date" class="form-control" name="deadline"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="loader">Загрузить заявку:</label>
|
||||
<div id="loader">
|
||||
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<button id="sendMessageButton" class="btn btn-success text-uppercase"
|
||||
type="submit">
|
||||
Сохранить
|
||||
</button>
|
||||
<button id="cancelButton" class="btn btn-default text-uppercase" type="button">
|
||||
Отмена
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script type="text/javascript" src="/js/file-loader.js"></script>
|
||||
<script src="/js/papers.js"></script>
|
||||
<script>
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function () {
|
||||
new FileLoader({
|
||||
div: "loader",
|
||||
url: urlFileUpload,
|
||||
maxSize: 1.5,
|
||||
extensions: ["doc", "docx", "xls", "jpg", "pdf", "txt", "png"],
|
||||
callback: function (response) {
|
||||
showFeedbackMessage("Файл успешно загружен");
|
||||
console.debug(response);
|
||||
}
|
||||
});
|
||||
|
||||
getFromRest(urlPaperStatuses, function (response) {
|
||||
fillSelect($("#status"), response);
|
||||
});
|
||||
});
|
||||
/*]]>*/
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6 portfolio-item">
|
||||
<a class="portfolio-link" data-toggle="modal" href="/grants">
|
||||
<a class="portfolio-link" href="./grants/dashboard">
|
||||
<div class="portfolio-hover">
|
||||
<div class="portfolio-hover-content">
|
||||
<i class="fa fa-arrow-right fa-3x"></i>
|
||||
|
@ -10,142 +10,35 @@
|
||||
<!-- 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="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="./papers" 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="./paper" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
Добавить статью</a>
|
||||
</div>
|
||||
</div>
|
||||
</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">Название статьи</h7>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center" id="dashboard">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script src="/js/papers.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
showPaperDashboard("#dashboard");
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="default">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container" layout:fragment="content">
|
||||
<section id="papers">
|
||||
<div class="container">
|
||||
<div class="row" id="paper-list">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h2 class="section-heading text-uppercase">Пустая страница</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -14,10 +14,15 @@
|
||||
<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="./papers" 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="./paper" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
Добавить статью</a>
|
||||
|
@ -17,94 +17,21 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ul class="timeline">
|
||||
<li>
|
||||
<div class="timeline-image">
|
||||
<h4>
|
||||
<br/>
|
||||
02.07.2018
|
||||
</h4>
|
||||
</div>
|
||||
<div class="timeline-panel">
|
||||
<div class="timeline-heading">
|
||||
<h4>Уход в отпуск</h4>
|
||||
</div>
|
||||
<div class="timeline-body">
|
||||
<p class="text-muted">Наконец-то!</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-inverted">
|
||||
<div class="timeline-image">
|
||||
<img class="rounded-circle img-fluid" src="img/about/2.jpg" alt=""/>
|
||||
</div>
|
||||
<div class="timeline-panel">
|
||||
<div class="timeline-heading">
|
||||
<h4>March 2011</h4>
|
||||
<h4 class="subheading">An Agency is Born</h4>
|
||||
</div>
|
||||
<div class="timeline-body">
|
||||
<p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt
|
||||
ut
|
||||
voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae
|
||||
sit
|
||||
vero unde, sed, incidunt et ea quo dolore laudantium consectetur!</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="timeline-image">
|
||||
<img class="rounded-circle img-fluid" src="img/about/3.jpg" alt=""/>
|
||||
</div>
|
||||
<div class="timeline-panel">
|
||||
<div class="timeline-heading">
|
||||
<h4>December 2012</h4>
|
||||
<h4 class="subheading">Transition to Full Service</h4>
|
||||
</div>
|
||||
<div class="timeline-body">
|
||||
<p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt
|
||||
ut
|
||||
voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae
|
||||
sit
|
||||
vero unde, sed, incidunt et ea quo dolore laudantium consectetur!</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-inverted">
|
||||
<div class="timeline-image">
|
||||
<img class="rounded-circle img-fluid" src="img/about/4.jpg" alt=""/>
|
||||
</div>
|
||||
<div class="timeline-panel">
|
||||
<div class="timeline-heading">
|
||||
<h4>July 2014</h4>
|
||||
<h4 class="subheading">Phase Two Expansion</h4>
|
||||
</div>
|
||||
<div class="timeline-body">
|
||||
<p class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt
|
||||
ut
|
||||
voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae
|
||||
sit
|
||||
vero unde, sed, incidunt et ea quo dolore laudantium consectetur!</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="timeline-inverted">
|
||||
<div class="timeline-image">
|
||||
<h4>Be Part
|
||||
<br/>Of Our
|
||||
<br/>Story!</h4>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Plugin JavaScript -->
|
||||
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
|
||||
|
||||
<!-- Custom scripts for this template -->
|
||||
<script src="js/agency.js"></script>
|
||||
<script src="js/timeline.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
showTimeline(".timeline")
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user