This commit is contained in:
Nightblade73 2019-04-04 20:26:38 +04:00
parent 2d04b1b43a
commit 9d69f75530
4 changed files with 15 additions and 14 deletions

View File

@ -20,8 +20,8 @@ public class ConferenceController {
this.conferenceService = paperService;
}
@GetMapping("/papers")
public void getPapers(ModelMap modelMap) {
modelMap.put("filteredPapers", new ConferenceFilterDto(conferenceService.findAllDto(), null, null));
@GetMapping("/conferences")
public void getConferences(ModelMap modelMap) {
modelMap.put("filteredConferences", new ConferenceFilterDto(conferenceService.findAllDto(), null, null));
}
}

View File

@ -4,7 +4,7 @@ import java.util.List;
public class ConferenceFilterDto {
private List<ConferenceDto> papers;
private List<ConferenceDto> conferences;
private Integer filterAuthorId;
private Integer year;
@ -12,17 +12,17 @@ public class ConferenceFilterDto {
}
public ConferenceFilterDto(List<ConferenceDto> conferenceDtos, Integer filterAuthorId, Integer year) {
this.papers = conferenceDtos;
this.conferences = conferenceDtos;
this.filterAuthorId = filterAuthorId;
this.year = year;
}
public List<ConferenceDto> getPapers() {
return papers;
public List<ConferenceDto> getConferences() {
return conferences;
}
public void setPapers(List<ConferenceDto> papers) {
this.papers = papers;
public void setConferences(List<ConferenceDto> conferences) {
this.conferences = conferences;
}
public Integer getFilterAuthorId() {

View File

@ -7,7 +7,7 @@
<body>
<div layout:fragment="content">
<form id="conferences-form" method="post">
<form id="conferences-form" method="post" th:action="@{'/conferences/conferences'}">
<section id="conferences">
<div class="container">
<div class="row" id="conference-list">
@ -19,7 +19,9 @@
<hr/>
<div class="row">
<div class="col-md-9 col-sm-12">
<th:block th:each="conference : ${filteredConferences.conferences}">
<div th:replace="conferences/fragments/confLineFragment :: confLine(conference=${conference})"/>
</th:block>
</div>
<div class="col-md-3 col-sm-12">
<div class="filter">

View File

@ -6,9 +6,8 @@
<body>
<div th:fragment="confLine (conference)" class="row text-left paper-row" style="background-color: white;">
<div class="col">
<a href="/conference">
<span class="h6"></span>
<span class="text-muted"></span>
<a th:href="@{'conf?id='+${conference.id}}">
<span class="h6" th:text="${conference.title}"/>
</a>
<input class="id-class" type="hidden"/>
<a class="remove-paper pull-right d-none"