Resolve "Ping конференции в списке конференций"
#196
Merged
VladimirZarayskiy
merged 44 commits from 68-ping-conf
into dev
5 years ago
@ -0,0 +1,7 @@
|
||||
package ru.ulstu.paper.error;
|
||||
|
||||
public class PaperConferenceRelationExistException extends RuntimeException {
|
||||
public PaperConferenceRelationExistException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package ru.ulstu.students.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TaskFilterDto {
|
||||
|
||||
private List<TaskDto> tasks;
|
||||
private Task.TaskStatus status;
|
||||
private Integer tagId;
|
||||
private String order;
|
||||
|
||||
public TaskFilterDto(List<TaskDto> tasks, Task.TaskStatus status, Integer tagId, String order) {
|
||||
this.tasks = tasks;
|
||||
this.status = status;
|
||||
this.tagId = tagId;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public TaskFilterDto() {
|
||||
|
||||
}
|
||||
|
||||
public List<TaskDto> getTasks() {
|
||||
return tasks;
|
||||
}
|
||||
|
||||
public void setTasks(List<TaskDto> tasks) {
|
||||
this.tasks = tasks;
|
||||
}
|
||||
|
||||
public Task.TaskStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Task.TaskStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getTag() {
|
||||
return tagId;
|
||||
}
|
||||
|
||||
public void setTag(Integer tagId) {
|
||||
this.tagId = tagId;
|
||||
}
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
}
|
@ -1,7 +1,18 @@
|
||||
package ru.ulstu.students.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import ru.ulstu.students.model.Task;
|
||||
import ru.ulstu.tags.model.Tag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TaskRepository extends JpaRepository<Task, Integer> {
|
||||
|
||||
@Query("SELECT t FROM Task t WHERE (t.status = :status OR :status IS NULL) AND (:tag IS NULL OR :tag MEMBER OF t.tags) ORDER BY create_date DESC")
|
||||
List<Task> filterNew(@Param("status") Task.TaskStatus status, @Param("tag") Tag tag);
|
||||
|
||||
@Query("SELECT t FROM Task t WHERE (t.status = :status OR :status IS NULL) AND (:tag IS NULL OR :tag MEMBER OF t.tags) ORDER BY create_date ASC")
|
||||
List<Task> filterOld(@Param("status") Task.TaskStatus status, @Param("tag") Tag tag);
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
<?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="tanya" id="20190419_000000-1">
|
||||
<createTable tableName="grants_papers">
|
||||
<column name="grant_id" type="integer"/>
|
||||
<column name="paper_id" type="integer"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="grants_papers" baseColumnNames="grant_id"
|
||||
constraintName="fk_grants_grants_papers" referencedTableName="grants"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint baseTableName="grants_papers" baseColumnNames="paper_id"
|
||||
constraintName="fk_paper_grants_papers" referencedTableName="paper"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
@ -0,0 +1,16 @@
|
||||
<?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="anton" id="20190418_000000-1">
|
||||
<addColumn tableName="project">
|
||||
<column name="file_id" type="integer"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint baseTableName="project" baseColumnNames="file_id"
|
||||
constraintName="fk_project_file_id" referencedTableName="file"
|
||||
referencedColumnNames="id"/>
|
||||
<addColumn tableName="project">
|
||||
<column name="applicationFileName" type="varchar(255)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
@ -0,0 +1,42 @@
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function () {
|
||||
$(".project-row").mouseenter(function (event) {
|
||||
var projectRow = $(event.target).closest(".project-row");
|
||||
$(projectRow).css("background-color", "#f8f9fa");
|
||||
$(projectRow).find(".remove-paper").removeClass("d-none");
|
||||
|
||||
});
|
||||
$(".project-row").mouseleave(function (event) {
|
||||
var projectRow = $(event.target).closest(".project-row");
|
||||
$(projectRow).css("background-color", "white");
|
||||
$(projectRow).find(".remove-paper").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;
|
||||
});
|
||||
});
|
||||
/*]]>*/
|
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<div th:fragment="projectDashboard (project)" 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="projects/fragments/projectStatusFragment :: projectStatus(projectStatus=${project.status})"/>
|
||||
</div>
|
||||
<div class="col col-10 text-right">
|
||||
<h7 class="service-heading" th:text="${project.title}"> title</h7>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue