roadinspection.jsp
来自「Java的框架」· JSP 代码 · 共 238 行
JSP
238 行
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="mcaps.apps.prrm.task.model.Task"%>
<%@ page import="mcaps.apps.prrm.task.model.Status"%>
<c:set var="datetimeformat"><fmt:message key="datetime.format"/></c:set>
<html>
<head>
<title><fmt:message key="roadInspection.title"/></title>
<content tag="heading">
<fmt:message key="roadInspection.heading"/>
</content>
</head>
<c:url var="editUrl"
value="/roadInspectionForm.action?method=edit&roadInspectionId=${roadInspection.id}"/>
<c:url var="deleteUrl"
value="/deleteRoadInspection.action?method=delete&roadInspectionId=${roadInspection.id}"/>
<!--
<c:url var="pdfUrl"
value="/roadInspectionReport.action?format=pdf&roadInspectionId=${roadInspection.id}"/>
<c:url var="excelUrl"
value="/roadInspectionReport.action?format=xls&roadInspectionId=${roadInspection.id}"/>
-->
<c:url var="pdfUrl"
value="/reports/roadInspectionReport.pdf?roadInspectionId=${roadInspection.id}"/>
<c:url var="excelUrl"
value="/reports/roadInspectionReport.xls?roadInspectionId=${roadInspection.id}"/>
<c:url var="htmlUrl"
value="/reports/roadInspectionReport.html?roadInspectionId=${roadInspection.id}"/>
<script language="JavaScript">
function deleteRoadInspection(){
bCancel=true;
if (confirmDelete('Road Inspection')) {
window.location='<c:out value="${deleteUrl}" escapeXml="false"/>';
}
}
</script>
<body>
<c:set var="buttons">
<%
Task task=(Task)request.getAttribute("task");
if(Status.OPEN.equals(task.getStatus()))
{ %>
<button name="edit" type="button" style="margin-right: 5px"
onclick="window.location='<c:out value="${editUrl}"/>'">
<fmt:message key="button.edit"/>
</button>
<%} %>
<!--
<button name="delete" type="button" style="margin-right: 5px"
onclick="javascript:deleteRoadInspection();">
<fmt:message key="button.delete"/>
</button>
-->
<!-- if admin then return to the list of road inspections -->
<!-- <button name="cancel" type="button" onclick="window.location='<c:url value="/roadInspections.action" />'">
<fmt:message key="button.cancel"/>
</button>
-->
<!-- TODO: else only return the road inspections assigned to the user -->
<!--
<button name="cancel" type="button" onclick="window.location='<c:out value="${sessionScope.roadInspectionCancelUrl}"/>'">
<fmt:message key="button.cancel"/>
</button>
-->
</c:set>
<table width="100%">
<tr>
<td align="left" width="94%">
<spring:bind path="roadInspection.id">
<p><h3>Road Inspection ID: <c:out value="${status.value}"/></h3></p>
</spring:bind>
</td>
<td align="right" width="2%">
<a target="pdfWindow" href="<c:out value="${pdfUrl}"/>" title="<fmt:message key="title.report.pdf"/>">
<img src="<c:url value="/images/l_pdf.gif" />" class="icon" border="1"/>
</a>
</td>
<td align="right" width="2%">
<a target="excelWindow" href="<c:out value="${excelUrl}"/>" title="<fmt:message key="title.report.xls"/>">
<img src="<c:url value="/images/l_xls.gif" />" class="icon" border="1"/>
</a>
</td>
<td align="right" width="2%">
<a target="htmlWindow" href="<c:out value="${htmlUrl}"/>" title="<fmt:message key="title.report.xls"/>">
<img src="<c:url value="/images/l_html.gif" />" class="icon" border="1"/>
</a>
</td>
</tr>
</table>
<table>
<tr>
<td><fmt:message key="roadInspection.creationTime"/>:</td>
<td><fmt:formatDate value="${roadInspection.creationTime}" pattern="${datetimeformat}"/></td>
</tr>
<tr>
<td><fmt:message key="roadInspection.lastModifiedTime"/>:</td>
<td><fmt:formatDate value="${roadInspection.lastModifiedTime}" pattern="${datetimeformat}"/></td>
</tr>
</table>
<p><h3><fmt:message key="roadInspection.subtitle"/></h3></p>
<table width="100%">
<tr>
<td width="15%">
<fmt:message key="roadInspection.roadDefectId"/>:
</td>
<td width="85%">
<spring:bind path="roadInspection.roadDefectId">
<a href="<c:url value="/roadDefect.action?from=list&roadDefectId=${status.value}"/>"><c:out value="${status.value}"/></a>
</spring:bind>
</td>
</tr>
<tr>
<td width="15%">
<fmt:message key="roadInspection.taskId"/>:
</td>
<td width="85%">
<spring:bind path="roadInspection.taskId">
<a href="<c:url value="/task.action?from=list&taskId=${status.value}"/>"><c:out value="${status.value}"/></a>
</spring:bind>
</td>
</tr>
<tr>
<td width="15%">
<fmt:message key="roadInspection.defectType"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.defectType}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.defectDetail"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.defectDetail}"/>
</td>
</tr>
<tr>
<td width="15%">
<fmt:message key="roadInspection.roadName"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.roadName}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.location"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.location}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.severity"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.severity}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.summary"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.summary}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.solution"/>:
</td>
<td width="85%">
<c:out value="${roadInspection.solution}"/>
</td>
</tr>
<tr>
<td width="15%" valign="top">
<fmt:message key="roadInspection.repairRequired"/>:
</td>
<td width="85%">
<c:if test="${roadInspection.repairRequired}">
Yes
</c:if>
<c:if test="${!roadInspection.repairRequired}">
No
</c:if>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
</td>
</tr>
</table>
<div class="separator"></div>
<p><h3><fmt:message key="roadInspection.subtitle.picture"/></h3></p>
<c:if test="${empty roadinspectionpicturelist}">
No inspection pictures.
</c:if>
<c:if test="${!empty roadinspectionpicturelist}">
<table>
<c:set var="count" value="1" />
<c:forEach var="roadinspectionpicture" items="${roadinspectionpicturelist}">
<c:url value="${roadinspectionpicture.path}/${roadinspectionpicture.name}" var="imageUrl" />
<c:if test="${count % 2 != 0}">
<tr>
</c:if>
<td width="10%" valign="top">
<b>Picture <c:out value="${count}"/>:</b><br/><br/>
</td>
<td width="20%" valign="top">
<c:out value="${roadinspectionpicture.name}"/><br/>
<a target="imgWindow" href="<c:out value="${imageUrl}"/>" title="<c:out value="${roadinspectionpicture.name}"/>">
<img src="<c:out value="${imageUrl}"/>" class="icon" border="1"
width="50" height="50"/>
</a>
</td>
<td width="3%">
</td>
<c:if test="${count % 2 == 0}">
</tr>
</c:if>
<c:set var="count" value="${count+1}" />
</c:forEach>
</table>
</c:if>
<div class="separator"></div>
<c:out value="${buttons}" escapeXml="false" />
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?