81 lines
3.5 KiB
HTML
81 lines
3.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">
|
|
<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 class="row justify-content-center">
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
|
<a href="./papers" class="btn btn-light toolbar-button"><i class="fa fa-list-alt"></i>
|
|
Список</a>
|
|
</div>
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
|
<a href="./dashboard" class="btn btn-light toolbar-button"><i class="fa fa-newspaper-o"
|
|
aria-hidden="true"></i> Панель
|
|
управления</a>
|
|
</div>
|
|
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3">
|
|
<a href="./paper" class="btn btn-light toolbar-button"><i class="fa fa-plus-circle"
|
|
aria-hidden="true"></i>
|
|
Добавить статью</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<th:block th:each="paper : ${papers}">
|
|
<div th:replace="papers/fragments/paperLineFragment :: titleLine(paper=${paper})"/>
|
|
</th:block>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"
|
|
id="remove-paper-modal">
|
|
<div class="modal-dialog modal-sm">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h8 class="modal-title" id="myModalLabel">Удалить статью?</h8>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Закрыть"><span
|
|
aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" id="modal-btn-yes">Да</button>
|
|
<button type="button" class="btn btn-primary" id="modal-btn-no">Нет</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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");
|
|
});
|
|
});
|
|
/*]]>*/
|
|
</script>
|
|
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|