#59 added begin-end dates in conferenceRow

merge-requests/65/head
Nightblade73 5 years ago
parent 34033fac5f
commit 338d7c2e09

@ -18,6 +18,9 @@ import static ru.ulstu.core.util.StreamApiUtils.convert;
public class ConferenceDto { public class ConferenceDto {
String BEGINDATESTRING = "Начало: ";
String ENDDATESTRING = "Конец: ";
private Integer id; private Integer id;
@NotEmpty @NotEmpty
@Size(min = 2, max = 400) @Size(min = 2, max = 400)
@ -211,4 +214,8 @@ public class ConferenceDto {
this.notSelectedPapers = notSelectedPapers; this.notSelectedPapers = notSelectedPapers;
} }
public String getDatesString() {
return BEGINDATESTRING + beginDate.toString().split(" ")[0] + " " + ENDDATESTRING + endDate.toString().split(" ")[0];
}
} }

@ -3,7 +3,7 @@ body {
} }
.conference-row .col:hover { .conference-row .col:hover {
background-color: #eaeaea; background-color: #f3f3f3;
border-radius: .25rem; border-radius: .25rem;
} }
@ -15,6 +15,10 @@ body {
margin-bottom: 10px; margin-bottom: 10px;
} }
.conference-row .col .text-decoration {
text-decoration: none;
}
.form-group textarea { .form-group textarea {
min-height: 206px; min-height: 206px;

@ -1,17 +1,5 @@
$(document).ready(function () { $(document).ready(function () {
$(".conference-row").mouseenter(function (event) {
var conferenceRow = $(event.target).closest(".conference-row");
$(conferenceRow).css("background-color", "#f8f9fa");
$(conferenceRow).find(".remove-conference").removeClass("d-none");
});
$(".conference-row").mouseleave(function (event) {
var conferenceRow = $(event.target).closest(".conference-row");
$(conferenceRow).css("background-color", "white");
$(conferenceRow).closest(".conference-row").find(".remove-conference").addClass("d-none");
});
$('a[data-confirm]').click(function(ev) { $('a[data-confirm]').click(function(ev) {
var href = $(this).attr('href'); var href = $(this).attr('href');
if (!$('#dataConfirmModal').length) { if (!$('#dataConfirmModal').length) {

@ -5,13 +5,14 @@
</head> </head>
<body> <body>
<div th:fragment="confLine (conference)" class="row text-left conference-row h3" style="background-color: white;"> <div th:fragment="confLine (conference)" class="row text-left conference-row h3" style="background-color: white;">
<div class="col"> <div class="col d-flex justify-content-between">
<a th:href="@{'conference?id='+${conference.id}}"> <a th:href="@{'conference?id='+${conference.id}}" class="w-100 text-decoration">
<span class="h5" th:text="${conference.title}"/> <span class="h5" th:text="${conference.title}"/>
<span class="text-muted h6 float-right m-2" th:text="${conference.datesString}"/>
</a> </a>
<input class="id-class" type="hidden" th:value="${conference.id}"/> <input class="id-class" type="hidden" th:value="${conference.id}"/>
<a class="remove-paper pull-right" th:href="@{'/conferences/delete/'+${conference.id}}" <a class="remove-paper pull-right m-auto" th:href="@{'/conferences/delete/'+${conference.id}}"
data-confirm="Удалить статью?"> data-confirm="Удалить конференцию?">
<i class="fa fa-trash" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i>
</a> </a>
</div> </div>

Loading…
Cancel
Save