src/main/webapp/WEB-INF/jsp/project-details.jsp

changeset 105
250c5cbb8276
parent 101
c34c81b87674
child 109
2e0669e814ff
--- a/src/main/webapp/WEB-INF/jsp/project-details.jsp	Sat Aug 29 16:48:15 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp	Sat Aug 29 17:13:09 2020 +0200
@@ -34,6 +34,9 @@
 <%@include file="../jspf/project-header.jsp"%>
 
 <div id="tool-area">
+    <c:if test="${not empty viewmodel.versionFilter}">
+        <a href="./projects/versions/edit?vid=${viewmodel.versionFilter.id}" class="button"><fmt:message key="button.version.edit"/></a>
+    </c:if>
     <a href="./projects/versions/edit" class="button"><fmt:message key="button.version.create"/></a>
     <a href="./projects/issues/edit?pid=${project.id}" class="button"><fmt:message key="button.issue.create"/></a>
 </div>
@@ -43,14 +46,8 @@
 <c:set var="summary" value="${viewmodel.projectInfo.issueSummary}" />
 <%@include file="../jspf/issue-summary.jsp"%>
 
-<h2><fmt:message key="issue.without-version" /></h2>
-
-<c:set var="issues" value="${viewmodel.projectDetails.issuesWithoutVersion}"/>
-<c:set var="summary" value="${viewmodel.projectDetails.issuesWithoutVersionTotal}" />
-<%@include file="../jspf/issue-summary.jsp"%>
-<%@include file="../jspf/issue-list.jsp"%>
-
-<c:forEach var="versionInfo" items="${viewmodel.projectDetails.versionInfos}">
+<c:if test="${not empty viewmodel.versionFilter}">
+    <c:set var="versionInfo" value="${viewmodel.projectDetails.versionInfo}"/>
     <h2>
         <fmt:message key="version.label" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/>
     </h2>
@@ -70,4 +67,15 @@
         <%@include file="../jspf/issue-summary.jsp"%>
         <%@include file="../jspf/issue-list.jsp"%>
     </c:if>
-</c:forEach>
\ No newline at end of file
+</c:if>
+<c:if test="${empty viewmodel.versionFilter}">
+    <h2>
+        <fmt:message key="issue.without-version" />
+    </h2>
+    <c:set var="summary" value="${viewmodel.projectDetails.issueSummary}"/>
+    <c:set var="issues" value="${viewmodel.projectDetails.issues}"/>
+    <%@include file="../jspf/issue-summary.jsp"%>
+    <c:if test="${not empty issues}">
+        <%@include file="../jspf/issue-list.jsp"%>
+    </c:if>
+</c:if>

mercurial