1.1 --- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Sat May 30 18:12:38 2020 +0200 1.2 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Mon Jun 01 14:46:58 2020 +0200 1.3 @@ -28,66 +28,46 @@ 1.4 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 1.5 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 1.6 1.7 -<jsp:useBean id="project" type="de.uapcore.lightpit.entities.Project" scope="request" /> 1.8 -<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 1.9 -<jsp:useBean id="statsAffected" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.10 -<jsp:useBean id="statsScheduled" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.11 -<jsp:useBean id="statsResolved" type="java.util.List<de.uapcore.lightpit.entities.VersionStatistics>" scope="request"/> 1.12 -<jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> 1.13 -<jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> 1.14 -<jsp:useBean id="statsHideZeros" type="java.lang.Boolean" scope="request"/> 1.15 +<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request" /> 1.16 1.17 -<div id="project-attributes"> 1.18 - <div class="row"> 1.19 - <div class="caption"><fmt:message key="name"/>:</div> 1.20 - <div><c:out value="${project.name}"/></div> 1.21 - <div class="caption"><fmt:message key="description"/>:</div> 1.22 - <div><c:out value="${project.description}"/></div> 1.23 - </div> 1.24 - <div class="row"> 1.25 - <div class="caption"><fmt:message key="owner"/>:</div> 1.26 - <div> 1.27 - <c:if test="${not empty project.owner}"><c:out value="${project.owner.displayname}"/></c:if> 1.28 - </div> 1.29 - <div class="caption"><fmt:message key="repoUrl"/>:</div> 1.30 - <div> 1.31 - <c:if test="${not empty project.repoUrl}"> 1.32 - <a target="_blank" href="<c:out value="${project.repoUrl}"/>"><c:out 1.33 - value="${project.repoUrl}"/></a> 1.34 - </c:if> 1.35 - </div> 1.36 - </div> 1.37 -</div> 1.38 +<c:set var="project" scope="page" value="${viewmodel.project}"/> 1.39 +<%@include file="../jspf/project-header.jsp"%> 1.40 1.41 <div id="tool-area"> 1.42 <a href="./projects/versions/edit" class="button"><fmt:message key="button.version.create"/></a> 1.43 - <a href="./projects/issues/edit" class="button"><fmt:message key="button.issue.create"/></a> 1.44 - <a href="./projects/issues/" class="button"><fmt:message key="button.issue.list"/></a> 1.45 - <c:if test="${not statsHideZeros}"> 1.46 - <a href="./projects/view?reduced=1" class="button"><fmt:message key="button.stats.hidezeros"/></a> 1.47 - </c:if> 1.48 - <c:if test="${statsHideZeros}"> 1.49 - <a href="./projects/view?reduced=0" class="button"><fmt:message key="button.stats.showzeros"/></a> 1.50 - </c:if> 1.51 + <a href="./projects/issues/edit?pid=${project.id}" class="button"><fmt:message key="button.issue.create"/></a> 1.52 </div> 1.53 1.54 -<div id="version-stats"> 1.55 -<c:forEach var="version" items="${versions}" varStatus="iter"> 1.56 +<h2><fmt:message key="progress" /></h2> 1.57 + 1.58 +<c:set var="summary" value="${viewmodel.issuesTotal}" /> 1.59 +<%@include file="../jspf/issue-summary.jsp"%> 1.60 + 1.61 +<h2><fmt:message key="issue.without-version" /></h2> 1.62 + 1.63 +<c:set var="issues" value="${viewmodel.issuesWithoutVersion}"/> 1.64 +<c:set var="summary" value="${viewmodel.issuesWithoutVersionTotal}" /> 1.65 +<%@include file="../jspf/issue-summary.jsp"%> 1.66 +<%@include file="../jspf/issue-list.jsp"%> 1.67 + 1.68 +<c:forEach var="versionInfo" items="${viewmodel.versionInfos}"> 1.69 <h2> 1.70 - <fmt:message key="version.label" /> <c:out value="${version.name}" /> - <fmt:message key="version.status.${version.status}"/> 1.71 - <a href="./projects/versions/edit?id=${version.id}">✎</a> 1.72 + <fmt:message key="version.label" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/> 1.73 + (<a href="./projects/versions/view?vid=${versionInfo.version.id}">open</a>) 1.74 </h2> 1.75 1.76 - <h3><fmt:message key="version.statistics.affected" /></h3> 1.77 - <c:set var="stats" value="${statsAffected[iter.index]}" /> 1.78 - <%@include file="../jspf/version-stats.jsp" %> 1.79 + <h3><fmt:message key="issues.reported"/> </h3> 1.80 + <c:set var="summary" value="${versionInfo.reportedTotal}"/> 1.81 + <c:set var="issues" value="${versionInfo.reported}"/> 1.82 + <%@include file="../jspf/issue-summary.jsp"%> 1.83 1.84 - <h3><fmt:message key="version.statistics.scheduled" /></h3> 1.85 - <c:set var="stats" value="${statsScheduled[iter.index]}" /> 1.86 - <%@include file="../jspf/version-stats.jsp" %> 1.87 + <h3><fmt:message key="issues.scheduled"/> </h3> 1.88 + <c:set var="summary" value="${versionInfo.scheduledTotal}"/> 1.89 + <c:set var="issues" value="${versionInfo.scheduled}"/> 1.90 + <%@include file="../jspf/issue-summary.jsp"%> 1.91 1.92 - <h3><fmt:message key="version.statistics.resolved" /></h3> 1.93 - <c:set var="stats" value="${statsResolved[iter.index]}" /> 1.94 - <%@include file="../jspf/version-stats.jsp" %> 1.95 -</c:forEach> 1.96 -</div> 1.97 + <h3><fmt:message key="issues.resolved"/> </h3> 1.98 + <c:set var="summary" value="${versionInfo.resolvedTotal}"/> 1.99 + <c:set var="issues" value="${versionInfo.resolved}"/> 1.100 + <%@include file="../jspf/issue-summary.jsp"%> 1.101 +</c:forEach> 1.102 \ No newline at end of file