list.jsp
3.3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<%@include file="/common/CHeader.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<!doctype html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }
        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<body>
<form class="form-inline definewidth m20" action="addxmldoc" method="post" style="margin-bottom: 10px">
    文档类型:
    <input type="text" name="doctype" class="form-control">  
    文档名称:
    <input type="text" name="docname" class="form-control" placeholder="" value="">  
    数据集ID:
    <select name="datasetid" class="form-control">
        <c:forEach items="${olapDatasetList}" var="u">
            <option value="${u.datasetid}">${u.datasetid}</option>
        </c:forEach>
    </select>
    是否有效:
    <select name="active" class="form-control">
        <option value="Y">有效</option>
        <option value="N">无效</option>
    </select>  
    <input type="submit" class="btn btn-primary"  value="新增"/>
</form>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>文档ID</th>
        <th>文档类型</th>
        <th>文档名称</th>
        <th>数据集ID</th>
        <th>是否有效</th>
        <th>操作</th>
    </tr>
    </thead>
    <c:forEach items="${modelAndPage.model}" var="t">
        <tr>
            <td>${t.docid}</td>
            <td>${t.doctype}</td>
            <td>${t.docname}</td>
            <td>${t.datasetid}</td>
            <td>${t.active}</td>
            <td>
                <a href="<%=basePath %>olapxmlnode/selectlist?docid=${t.docid}">查看</a>  <a href="<%=basePath %>olapxmldoc/findByid?docid=${t.docid}">编辑</a>  <a href="<%=basePath %>olapxmldoc/deleteXmldoc?docid=${t.docid}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<div class="inline pull-right page">
    <c:set var="page" value="${modelAndPage.page}"></c:set>
    ${page.getCount()} 条记录  ${page.getCurrent()}/${page.getTotal()} 页 
    <c:if test="${page.getCurrent()>1}">
        <a href="?begin=${(page.getCurrent()-2)*page.length}">上一页</a> 
    </c:if>
    <c:set var="endPage" value="false"/>
    <c:forEach begin="0" step="1" end="${page.getTotal()-1}" var="everyPage">
        <c:choose>
            <c:when test="${everyPage+1 >5}">
                <c:if test="${endPage=='false'}">
                    <c:set var="endPage" value="true"/>
                </c:if>
            </c:when>
            <%--<c:otherwise>--%>
            <%--<a href="?begin=${everyPage*page.length}">${everyPage+1}</a>--%>
            <%--</c:otherwise>--%>
        </c:choose>
    </c:forEach>
    <c:if test="${page.getCurrent()<page.getTotal()}">
        <a href="?begin=${(page.getCurrent())*page.length}">下一页</a>
    </c:if>
</div>
</body>
</html>