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; this.conferenceService = paperService;
} }
@GetMapping("/papers") @GetMapping("/conferences")
public void getPapers(ModelMap modelMap) { public void getConferences(ModelMap modelMap) {
modelMap.put("filteredPapers", new ConferenceFilterDto(conferenceService.findAllDto(), null, null)); modelMap.put("filteredConferences", new ConferenceFilterDto(conferenceService.findAllDto(), null, null));
} }
} }

View File

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

View File

@ -7,7 +7,7 @@
<body> <body>
<div layout:fragment="content"> <div layout:fragment="content">
<form id="conferences-form" method="post"> <form id="conferences-form" method="post" th:action="@{'/conferences/conferences'}">
<section id="conferences"> <section id="conferences">
<div class="container"> <div class="container">
<div class="row" id="conference-list"> <div class="row" id="conference-list">
@ -19,7 +19,9 @@
<hr/> <hr/>
<div class="row"> <div class="row">
<div class="col-md-9 col-sm-12"> <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>
<div class="col-md-3 col-sm-12"> <div class="col-md-3 col-sm-12">
<div class="filter"> <div class="filter">

View File

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