src/main/webapp/WEB-INF/jspf/version-stats.jsp

Sat, 30 May 2020 15:26:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 May 2020 15:26:15 +0200
changeset 81
1a2e7b5d48f7
parent 80
27a25f32048e
permissions
-rw-r--r--

adds issue summaries

<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>

<table class="datatable">
    <c:if test="${statsHideZeros}">
        <c:set var="visibleColumns" value="0"/>
        <c:forEach var="idx" begin="0" end="${fn:length(issueStatusEnum)-1}">
            <c:set var="visibleColumns" value="${visibleColumns + (stats.columnTotals[idx] eq 0 ? 0 :1)}"/>
        </c:forEach>
    </c:if>
    <c:if test="${not statsHideZeros}">
        <c:set var="visibleColumns" value="${fn:length(issueStatusEnum)}" />
    </c:if>
    <c:set var="colwidth"><fmt:formatNumber value="${100/(visibleColumns+2)}" maxFractionDigits="0" /></c:set>
    <colgroup>
        <c:forEach var="idx" begin="1" end="${visibleColumns+2}">
        <col width="${colwidth}%">
        </c:forEach>
    </colgroup>
    <thead>
        <tr>
            <th></th>
            <c:forEach var="issueStatus" items="${issueStatusEnum}" varStatus="statusIter">
                <c:if test="${not statsHideZeros or stats.columnTotals[statusIter.index] gt 0}">
                <th class="hcenter"><fmt:message key="issue.status.${issueStatus}"/></th>
                </c:if>
            </c:forEach>
            <th class="hcenter"><fmt:message key="version.statistics.total"/> </th>
        </tr>
    </thead>
    <tbody>
    <c:forEach var="issueCategory" items="${issueCategoryEnum}" varStatus="categoryIter">
        <c:if test="${not statsHideZeros or stats.rowTotals[categoryIter.index] gt 0}">
        <tr>
        <th><fmt:message key="issue.category.${issueCategory}" /></th>
        <c:forEach var="issueStatus" items="${issueStatusEnum}" varStatus="statusIter">
            <c:if test="${not statsHideZeros or stats.columnTotals[statusIter.index] gt 0}">
            <td>${stats.issueCount[categoryIter.index][statusIter.index]}</td>
            </c:if>
        </c:forEach>
        <td>${stats.rowTotals[categoryIter.index]}</td>
        </tr>
        </c:if>
    </c:forEach>
    <tr>
        <th><fmt:message key="version.statistics.total"/> </th>
        <c:forEach var="issueStatus" items="${issueStatusEnum}" varStatus="statusIter">
            <c:if test="${not statsHideZeros or stats.columnTotals[statusIter.index] gt 0}">
            <td>${stats.columnTotals[statusIter.index]}</td>
            </c:if>
        </c:forEach>
        <td>${stats.total}</td>
    </tr>
    </tbody>
</table>

mercurial