You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gzf/WebRoot/admin/material.jsp

77 lines
2.9 KiB

<%--
Created by IntelliJ IDEA.
User: pan
Date: 2020/6/10 0010
Time: 6:46
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<c:import url="../head.jsp"/>
<link href="<%=basePath %>static/toastr-master/toastr.min.css" rel="stylesheet" type="text/css" />
<script src="<%=basePath %>static/toastr-master/toastr.min.js"></script>
<script>
$(function () {
<c:if test="${!empty state }">
toastr.${state}('${message}', '提示');
</c:if>
})
</script>
</head>
<body>
<div class="box round first" style="margin:15px;">
<div class="block">
<h2>数据列表</h2>
<div>
<a class="btn btn-primary" href="<%=basePath%>admin/material/toAdd.do">添加资料</a>
</div>
</div>
<table id="example" class="data display datatable">
<thead>
<th>资料名</th>
<th>资料类型</th>
<th>资料表单名</th>
<th>资料表单顺序</th>
<th>操作</th>
</thead>
<tbody>
<c:forEach items="${list}" var="item">
<tr class="even gradeA">
<td>${item.materialName}</td>
<td>
<c:choose>
<c:when test="${item.formType eq 'text'}">文本</c:when>
<c:when test="${item.formType eq 'doc'}">图片</c:when>
</c:choose>
</td>
<td>${item.formName}</td>
<td>${item.formOrder}</td>
<td>
<a href="<%=basePath%>admin/material/toUpdate.do?applicationMaterial.id=${item.id}">
<i class="icon-pencil"></i>
更新资料
</a>
<a href="<%=basePath%>admin/material/delete.do?applicationMaterial.id=${item.id}">
<i class="icon-remove"></i>
删除资料
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</body>
</html>