#109 show other paper attachs

This commit is contained in:
Семенова Мария 2019-05-07 23:53:10 +04:00
parent 1e07c5424d
commit 2fba252df0
2 changed files with 36 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import ru.ulstu.core.model.BaseEntity;
import ru.ulstu.core.model.UserContainer;
import ru.ulstu.deadline.model.Deadline;
import ru.ulstu.file.model.FileData;
import ru.ulstu.grant.model.Grant;
import ru.ulstu.timeline.model.Event;
import ru.ulstu.user.model.User;
@ -118,6 +119,9 @@ public class Paper extends BaseEntity implements UserContainer {
@ManyToMany(mappedBy = "papers")
private List<Conference> conferences;
@ManyToMany(mappedBy = "papers")
private List<Grant> grants;
public PaperStatus getStatus() {
return status;
}
@ -230,6 +234,14 @@ public class Paper extends BaseEntity implements UserContainer {
this.conferences = conferences;
}
public List<Grant> getGrants() {
return grants;
}
public void setGrants(List<Grant> grants) {
this.grants = grants;
}
@Override
public Set<User> getUsers() {
return getAuthors();

View File

@ -201,6 +201,30 @@
Статус статьи
</span>
</div>
<div class="col" th:unless="${#lists.isEmpty(paper.grants)}">
<label>Гранты: </label>
<div th:each="grant, grantRowStat : *{papers[__${rowStat.index}__].grants}"
th:remove="tag">
<div th:unless="${grant.id}==*{id}" th:remove="tag">
<li>
<a th:href="@{'/grants/grant?id=' + ${grant.id} + ''}">
<span th:text="${grant.title} "></span>
</a>
</li>
</div>
</div>
</div>
<div class="col" th:unless="${#lists.isEmpty(paper.conferences)}">
<label>Конференции: </label>
<div th:each="conference, conferenceRowStat : *{papers[__${rowStat.index}__].conferences}"
th:remove="tag">
<li>
<a th:href="@{'/conferences/conference?id=' + ${conference.id} + ''}">
<span th:text="${conference.title}"></span>
</a>
</li>
</div>
</div>
</div>
</div>
</div>