src/main/webapp/WEB-INF/jsp/issues.jsp

changeset 86
0a658e53177c
parent 82
4ec7f2600c83
child 109
2e0669e814ff
--- a/src/main/webapp/WEB-INF/jsp/issues.jsp	Sat May 30 18:12:38 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/issues.jsp	Mon Jun 01 14:46:58 2020 +0200
@@ -28,60 +28,26 @@
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 
-<jsp:useBean id="issues" type="java.util.List<de.uapcore.lightpit.entities.Issue>" scope="request"/>
+<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssuesView" scope="request"/>
+<c:set var="project" scope="page" value="${viewmodel.project}"/>
+<c:set var="version" scope="page" value="${viewmodel.version}"/>
+<%@include file="../jspf/project-header.jsp"%>
+
+<c:if test="${not empty version}">
+    <h2>
+        <fmt:message key="version.label" /> <c:out value="${version.name}" /> - <fmt:message key="version.status.${version.status}"/>
+        <a href="./projects/versions/edit?vid=${version.id}">&#x270e;</a>
+    </h2>
+</c:if>
 
 <div id="tool-area">
     <div>
         <a href="./projects/issues/edit" class="button"><fmt:message key="button.issue.create"/></a>
+        <c:if test="${not empty version}">
+            <a href="./projects/issues/?pid=${project.id}&vid=-1" class="button"><fmt:message key="button.issue.all"/></a>
+        </c:if>
     </div>
 </div>
 
-<table id="issue-list" class="datatable medskip">
-    <thead>
-    <tr>
-        <th><fmt:message key="issue.subject"/></th>
-        <th><fmt:message key="issue.assignee"/></th>
-        <th><fmt:message key="issue.category"/></th>
-        <th><fmt:message key="issue.status"/></th>
-        <th><fmt:message key="issue.created"/></th>
-        <th><fmt:message key="issue.updated"/></th>
-        <th><fmt:message key="issue.eta"/></th>
-    </tr>
-    </thead>
-    <tbody>
-    <c:forEach var="issue" items="${issues}">
-        <tr>
-            <td>
-                <span class="phase-${issue.status.phase}">
-                    <a href="./projects/issues/edit?id=${issue.id}">
-                        <c:out value="${issue.subject}" />
-                    </a>
-                </span>
-            </td>
-            <td>
-                <c:if test="${not empty issue.assignee}">
-                    <c:out value="${issue.assignee.shortDisplayname}" />
-                </c:if>
-                <c:if test="${empty issue.assignee}">
-                    <fmt:message key="placeholder.null-assignee" />
-                </c:if>
-            </td>
-            <td>
-                <fmt:message key="issue.category.${issue.category}" />
-            </td>
-            <td>
-                <fmt:message key="issue.status.${issue.status}" />
-            </td>
-            <td>
-                <fmt:formatDate value="${issue.created}" type="BOTH"/>
-            </td>
-            <td>
-                <fmt:formatDate value="${issue.updated}" type="BOTH"/>
-            </td>
-            <td>
-                <fmt:formatDate value="${issue.eta}" />
-            </td>
-        </tr>
-    </c:forEach>
-    </tbody>
-</table>
+<c:set var="issues" value="${viewmodel.issues}"/>
+<%@include file="../jspf/issue-list.jsp"%>
\ No newline at end of file

mercurial