1.1 --- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Sat May 23 14:13:09 2020 +0200 1.2 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Sun May 24 15:30:43 2020 +0200 1.3 @@ -25,87 +25,46 @@ 1.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.5 --%> 1.6 <%@page pageEncoding="UTF-8" %> 1.7 -<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 1.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 1.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 1.10 1.11 -<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 1.12 - 1.13 <jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 1.14 -<jsp:useBean id="issues" type="java.util.List<de.uapcore.lightpit.entities.Issue>" scope="request"/> 1.15 +<jsp:useBean id="statsAffected" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.16 +<jsp:useBean id="statsScheduled" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.17 +<jsp:useBean id="statsResolved" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.18 +<jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> 1.19 +<jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> 1.20 +<jsp:useBean id="statsHideZeros" type="java.lang.Boolean" scope="request"/> 1.21 1.22 <div id="tool-area"> 1.23 <a href="./projects/versions/edit" class="button"><fmt:message key="button.version.create"/></a> 1.24 <a href="./projects/issues/edit" class="button"><fmt:message key="button.issue.create"/></a> 1.25 + <a href="./projects/issues/" class="button"><fmt:message key="button.issue.list"/></a> 1.26 + <c:if test="${not statsHideZeros}"> 1.27 + <a href="./projects/view?reduced=1" class="button"><fmt:message key="button.stats.hidezeros"/></a> 1.28 + </c:if> 1.29 + <c:if test="${statsHideZeros}"> 1.30 + <a href="./projects/view?reduced=0" class="button"><fmt:message key="button.stats.showzeros"/></a> 1.31 + </c:if> 1.32 </div> 1.33 1.34 -<c:if test="${not empty versions}"> 1.35 - <table id="version-list" class="datatable medskip"> 1.36 - <thead> 1.37 - <tr> 1.38 - <th></th> 1.39 - <th><fmt:message key="thead.version.name"/></th> 1.40 - <th><fmt:message key="thead.version.status"/></th> 1.41 - </tr> 1.42 - </thead> 1.43 - <tbody> 1.44 - <c:forEach var="version" items="${versions}"> 1.45 - <tr class="nowrap"> 1.46 - <td style="width: 2em;"><a href="./projects/versions/edit?id=${version.id}">✎</a> 1.47 - </td> 1.48 - <td><c:out value="${version.name}"/></td> 1.49 - <td><fmt:message key="version.status.${version.status}"/></td> 1.50 - </tr> 1.51 - </c:forEach> 1.52 - </tbody> 1.53 - </table> 1.54 -</c:if> 1.55 +<div id="version-stats"> 1.56 +<c:forEach var="version" items="${versions}" varStatus="iter"> 1.57 + <h2> 1.58 + <fmt:message key="version.label" /> <c:out value="${version.name}" /> - <fmt:message key="version.status.${version.status}"/> 1.59 + <a href="./projects/versions/edit?id=${version.id}">✎</a> 1.60 + </h2> 1.61 1.62 -<table id="issue-list" class="datatable medskip"> 1.63 - <thead> 1.64 - <tr> 1.65 - <th><fmt:message key="thead.issue.subject"/></th> 1.66 - <th><fmt:message key="thead.issue.assignee"/></th> 1.67 - <th><fmt:message key="thead.issue.category"/></th> 1.68 - <th><fmt:message key="thead.issue.status"/></th> 1.69 - <th><fmt:message key="thead.issue.created"/></th> 1.70 - <th><fmt:message key="thead.issue.updated"/></th> 1.71 - <th><fmt:message key="thead.issue.eta"/></th> 1.72 - <!-- TODO: add other information --> 1.73 - </tr> 1.74 - </thead> 1.75 - <tbody> 1.76 - <c:forEach var="issue" items="${issues}"> 1.77 - <tr> 1.78 - <td> 1.79 - <a href="./projects/issues/edit?id=${issue.id}"> 1.80 - <c:out value="${issue.subject}" /> 1.81 - </a> 1.82 - </td> 1.83 - <td> 1.84 - <c:if test="${not empty issue.assignee}"> 1.85 - <c:out value="${issue.assignee.shortDisplayname}" /> 1.86 - </c:if> 1.87 - <c:if test="${empty issue.assignee}"> 1.88 - <fmt:message key="placeholder.null-assignee" /> 1.89 - </c:if> 1.90 - </td> 1.91 - <td> 1.92 - <fmt:message key="issue.category.${issue.category}" /> 1.93 - </td> 1.94 - <td> 1.95 - <fmt:message key="issue.status.${issue.status}" /> 1.96 - </td> 1.97 - <td> 1.98 - <fmt:formatDate value="${issue.created}" type="BOTH"/> 1.99 - </td> 1.100 - <td> 1.101 - <fmt:formatDate value="${issue.updated}" type="BOTH"/> 1.102 - </td> 1.103 - <td> 1.104 - <fmt:formatDate value="${issue.eta}" /> 1.105 - </td> 1.106 - </tr> 1.107 - </c:forEach> 1.108 - </tbody> 1.109 -</table> 1.110 + <h3><fmt:message key="version.statistics.affected" /></h3> 1.111 + <c:set var="stats" value="${statsAffected[iter.index]}" /> 1.112 + <%@include file="../jspf/version-stats.jsp" %> 1.113 + 1.114 + <h3><fmt:message key="version.statistics.scheduled" /></h3> 1.115 + <c:set var="stats" value="${statsScheduled[iter.index]}" /> 1.116 + <%@include file="../jspf/version-stats.jsp" %> 1.117 + 1.118 + <h3><fmt:message key="version.statistics.resolved" /></h3> 1.119 + <c:set var="stats" value="${statsResolved[iter.index]}" /> 1.120 + <%@include file="../jspf/version-stats.jsp" %> 1.121 +</c:forEach> 1.122 +</div>