relate.jsp
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<jsp:useBean id="word" scope="request" type="com.dookay.cihai.core.word.domain.WordDomain"/>--%>
<%--<jsp:useBean id="vos" scope="request" type="java.util.List<com.dookay.cihai.core.word.dto.WordDTO>"/>--%>
<jsp:useBean id="vo" scope="request" type="com.dookay.cihai.app.controller.vo.OneWayRelateVO"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>辞海 - ${vo.word}的相关词</title>
<link rel="stylesheet" href="${ctx}/static/css/vendor.css">
</head>
<body class="relation-word-body">
<%--<div class="container-fluid">--%>
<%--<div class="relation-word">--%>
<%--<h4>相关词</h4>--%>
<%--<div class="list-group">--%>
<%--<span class="list-group-item list-group-item-header">${word.word}</span>--%>
<%--<c:forEach items="${vos}" var="item">--%>
<%--<a class="list-group-item" href="/word/info/${item.wordId}">${item.word}</a>--%>
<%--</c:forEach>--%>
<%--</div>--%>
<%--</div>--%>
<%--</div>--%>
<div class="relation-word">
<h4>相关词</h4>
<c:forEach items="${vo.relationByGroup}" var="item">
<div class="list-group">
<span class="list-group-item list-group-item-header">${item.key}</span>
<c:forEach items="${item.value}" var="w">
<a class="list-group-item" href="/word/info/${w.id}">${w.word}</a>
</c:forEach>
</div>
</c:forEach>
</div>
<script src="${ctx}/static/js/plugins/jquery.min.js"></script>
<script src="${ctx}/static/js/vendor.js" merge="true"></script>
<script>
$('.opt').click(function () {
var $this = $(this);
if ($this.hasClass('open')) {
$this.removeClass('open').text('收起')
.siblings('.d-none').removeClass('d-block');
} else {
$this.addClass('open').text('展开')
.siblings('.d-none').addClass('d-block');
}
});
</script>
</body>
</html>