alertlist.jsp
来自「Java的框架」· JSP 代码 · 共 125 行
JSP
125 行
<%@ include file="/common/taglibs.jsp"%>
<mcaps:userPreference key="pageSize" name="pageSize" scope="page"/>
<authz:authorize ifAllGranted="alertAdmin">
<c:set var="isAdmin" scope="page" value="true"/>
</authz:authorize>
<html>
<head>
<c:choose>
<c:when test="${(not empty isAdmin) and (not empty param.showAll)}">
<title><fmt:message key="alertList.admin.title"/></title>
<content tag="heading">
<fmt:message key="alertList.admin.heading"/>
</content>
</c:when>
<c:otherwise>
<title><fmt:message key="alertList.title"/></title>
<content tag="heading">
<fmt:message key="alertList.heading"/>
</content>
</c:otherwise>
</c:choose>
</head>
<body>
<c:set var="buttons">
<button type="button" style="margin-right: 5px" onclick="location.href='<c:url value="/addAlert.action"/>?from=list'">
<fmt:message key="button.add"/>
</button>
<button type="button" style="margin-right: 5px" onclick="location.href='<c:url value="/mainPage.action" />'">
<fmt:message key="button.cancel"/>
</button>
<c:if test="${(not empty isAdmin) and (empty param.showAll)}">
<button type="button" onclick="location.href='<c:url value="/listAlert.action?showAll=true" />'">
<fmt:message key="button.showAll"/>
</button>
</c:if>
<c:if test="${(not empty isAdmin) and (not empty param.showAll)}">
<button type="button" onclick="location.href='<c:url value="/listAlert.action" />'">
<fmt:message key="button.showAllCreatedByUser"/>
</button>
</c:if>
</c:set>
<c:out value="${buttons}" escapeXml="false" />
<c:choose>
<c:when test="${(not empty isAdmin) and (not empty param.showAll)}">
<display:table name="${alertList}" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" id="alerts" pagesize="${pageSize}" class="list alertList" export="true" style="width:80%;">
<%-- Table columns --%>
<display:column property="subject" sortable="true" headerClass="sortable" style="width:35%;" url="/viewAlert.action" paramId="id" paramProperty="id" titleKey="alert.subject" maxLength="30"/>
<display:column property="creator" sortable="true" style="width:15%;" paramProperty="type" titleKey="alert.creator" />
<display:column property="type" sortable="true" style="width:15%;" paramProperty="type" titleKey="alert.type" />
<display:column property="creationDate" sortable="true" style="width:20%;" paramProperty="creationDate" titleKey="alert.creationDate" />
<display:column property="status" sortable="true" style="width:15%;" paramProperty="status" titleKey="alert.status" />
<display:setProperty name="paging.banner.item_name" value="alert"/>
<display:setProperty name="paging.banner.items_name" value="alerts"/>
<display:setProperty name="export.excel.filename" value="Alert List.xls"/>
<display:setProperty name="export.csv.filename" value="Alert List.csv"/>
<display:setProperty name="export.pdf.filename" value="Alert List.pdf"/>
</display:table>
</c:when>
<c:otherwise>
<display:table name="${alertList}" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" id="alerts" pagesize="${pageSize}" class="list alertList" export="true" style="width:80%;">
<%-- Table columns --%>
<display:column property="subject" sortable="true" headerClass="sortable" style="width:40%;" url="/viewAlert.action" paramId="id" paramProperty="id" titleKey="alert.subject" maxLength="30"/>
<display:column property="type" sortable="true" style="width:15%;" paramProperty="type" titleKey="alert.type" />
<display:column property="creationDate" sortable="true" style="width:30%;" paramProperty="creationDate" titleKey="alert.creationDate" />
<display:column property="status" sortable="true" style="width:15%;" paramProperty="status" titleKey="alert.status" />
<display:setProperty name="paging.banner.item_name" value="alert"/>
<display:setProperty name="paging.banner.items_name" value="alerts"/>
<display:setProperty name="export.excel.filename" value="Alert List.xls"/>
<display:setProperty name="export.csv.filename" value="Alert List.csv"/>
<display:setProperty name="export.pdf.filename" value="Alert List.pdf"/>
</display:table>
</c:otherwise>
</c:choose>
<c:out value="${buttons}" escapeXml="false" />
<script type="text/javascript">
<!--
highlightTableRows("alerts");
//-->
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?