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

Mon, 30 Oct 2023 14:44:36 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 30 Oct 2023 14:44:36 +0100
changeset 292
703591e739f4
parent 268
ca5501d851fa
child 295
1c31921664c4
permissions
-rw-r--r--

add possibility to show issues w/o version or component - fixes #335

     1 <%--
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4 Copyright 2021 Mike Becker. All rights reserved.
     6 Redistribution and use in source and binary forms, with or without
     7 modification, are permitted provided that the following conditions are met:
     9 1. Redistributions of source code must retain the above copyright
    10 notice, this list of conditions and the following disclaimer.
    12 2. Redistributions in binary form must reproduce the above copyright
    13 notice, this list of conditions and the following disclaimer in the
    14 documentation and/or other materials provided with the distribution.
    16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    26 --%>
    27 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    28 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    29 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectDetails" scope="request" />
    33 <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/>
    34 <c:set var="component" scope="page" value="${viewmodel.componentDetails}"/>
    35 <c:set var="issuesHref" value="./${viewmodel.pathInfos.issuesHref}"/>
    36 <%@include file="../jspf/project-header.jspf"%>
    38 <div>
    39     <a href=".${issuesHref}-/create" class="button"><fmt:message key="button.issue.create"/></a>
    40     <button onclick="toggleProjectDetails()" id="toggle-details-button"><fmt:message key="button.project.details"/></button>
    41 </div>
    43 <h3><fmt:message key="issue.filter" /></h3>
    44 <%@include file="../jspf/issue-filter.jspf"%>
    46 <h2><fmt:message key="progress" /></h2>
    48 <c:set var="summary" value="${viewmodel.projectInfo.issueSummary}" />
    49 <%@include file="../jspf/issue-summary.jspf"%>
    51 <c:choose>
    52     <c:when test="${empty viewmodel.versionInfo}">
    53         <h2>
    54             <fmt:message key="issues" />
    55         </h2>
    56         <c:set var="summary" value="${viewmodel.issueSummary}"/>
    57         <c:set var="issues" value="${viewmodel.issues}"/>
    58         <%@include file="../jspf/issue-summary.jspf"%>
    59         <c:if test="${not empty issues}">
    60             <%@include file="../jspf/issue-list.jspf"%>
    61         </c:if>
    62     </c:when>
    63     <c:otherwise>
    64         <c:set var="versionInfo" value="${viewmodel.versionInfo}"/>
    65         <h2>
    66             <fmt:message key="version" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/>
    67             <c:if test="${not empty versionInfo.version.releaseOrEolDate}">
    68                 (<fmt:formatDate type="date" value="${versionInfo.version.releaseOrEolDate}"/>)
    69             </c:if>
    70         </h2>
    72         <h3><fmt:message key="issues.resolved"/> </h3>
    73         <c:set var="summary" value="${versionInfo.resolvedTotal}"/>
    74         <%@include file="../jspf/issue-summary.jspf"%>
    75         <c:set var="issues" value="${versionInfo.resolved}"/>
    76         <c:if test="${not empty issues}">
    77             <%@include file="../jspf/issue-list.jspf"%>
    78         </c:if>
    80         <c:set var="issues" value="${versionInfo.reported}"/>
    81         <c:if test="${not empty issues}">
    82             <h3><fmt:message key="issues.reported"/> </h3>
    83             <c:set var="summary" value="${versionInfo.reportedTotal}"/>
    84             <%@include file="../jspf/issue-summary.jspf"%>
    85             <%@include file="../jspf/issue-list.jspf"%>
    86         </c:if>
    87     </c:otherwise>
    88 </c:choose>

mercurial