Skip to content

Commit

Permalink
Fixed up JSTL in cartable
Browse files Browse the repository at this point in the history
  • Loading branch information
oskopek committed Apr 15, 2014
1 parent 657e032 commit 7d7edff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions carcv-webapp/src/main/webapp/app/cartable.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
</style>
</head>
<body>
<c:set var = "admin" value = "${'admin'}" />
<c:set var = "isAdmin" value = "request.isUserInRole(admin)" />
<c:out value = "request.getUserPrincipal.getName()" />
<table style="border: 1px solid #C0C0C0;">
<tr>
<th style="width: 160px; height: 15px; background-color: #B0C4DE;">Car preview</th>
Expand All @@ -24,7 +27,9 @@
<th style="width: 15%; height: 15px; background-color: #B0C4DE;">Video</th>
<th style="width: 15%; height: 15px; background-color: #B0C4DE;">Pictures</th>
<th style="width: 15%; height: 15px; background-color: #B0C4DE;">Report</th>
<th style="width: 10%; height: 15px; background-color: #B0C4DE;">Delete</th>
<c:if test="isAdmin">
<th style="width: 10%; height: 15px; background-color: #B0C4DE;">Delete</th>
</c:if>
</tr>

<c:forEach var="member" items="${wrtmList}">
Expand All @@ -39,8 +44,7 @@
<td><a href="/servlet/DisplayImage?path=${member.previewPath}" target="_top">View preview</a></td>
<td><a href="/servlet/GenerateReport?entry_id=${member.entryId}&timezone=${member.timeZone}" target="_top">Generate
report</a></td>

<c:if test="${request.isUserInRole(\"admin\")}">
<c:if test="isAdmin">
<td>
<button onclick="confirmRemove()">Delete</button>
<script>
Expand All @@ -52,8 +56,6 @@
}
</script>
</td>
<td><a href="/admin/servlet/RemoveEntry?entry_id=${member.entryId}" target="_top">Delete</a></td>
</c:if>
</tr>
</c:forEach>
Expand Down

0 comments on commit 7d7edff

Please sign in to comment.