98 lines
4.5 KiB
HTML
98 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorator="default" xmlns:th="">
|
|
<head>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container" layout:fragment="content">
|
|
<form id="papers-form" method="get" th:action="@{'/papers/papers'}">
|
|
<input th:type="hidden" name="paperDeleteId" id="paperDeleteId"/>
|
|
<section id="papers">
|
|
<div class="container">
|
|
<div class="row" id="paper-list">
|
|
<div class="col-lg-12 text-center">
|
|
<h2 class="section-heading text-uppercase">Статьи</h2>
|
|
|
|
<div th:replace="papers/fragments/paperNavigationFragment"/>
|
|
<div class="filter">
|
|
<h5>Фильтровать по:</h5>
|
|
<select id="author">
|
|
<option value="1">Алёна</option>
|
|
<option value="2">Маша</option>
|
|
<option value="3">Петя</option>
|
|
</select>
|
|
<select id="index score">
|
|
<option>РИНЦ</option>
|
|
<option>Scopus</option>
|
|
<option>Web of science</option>
|
|
</select>
|
|
<select id="year">
|
|
<option>2018</option>
|
|
<option>2017</option>
|
|
<option>2016</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:each="paper : ${papers}">
|
|
<div th:replace="papers/fragments/paperLineFragment :: titleLine(paper=${paper})"/>
|
|
</th:block>
|
|
</div>
|
|
</section>
|
|
|
|
<div id="modalDelete"/>
|
|
</form>
|
|
<script src="/js/papers.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
/*<![CDATA[*/
|
|
$(document).ready(function () {
|
|
$(".paper-row").mouseenter(function (event) {
|
|
var paperRow = $(event.target).closest(".paper-row");
|
|
$(paperRow).css("background-color", "#f8f9fa");
|
|
$(paperRow).find(".remove-paper").removeClass("d-none");
|
|
|
|
});
|
|
$(".paper-row").mouseleave(function (event) {
|
|
var paperRow = $(event.target).closest(".paper-row");
|
|
$(paperRow).css("background-color", "white");
|
|
$(paperRow).closest(".paper-row").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;
|
|
});
|
|
});
|
|
/*]]>*/
|
|
</script>
|
|
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|