src/main/webapp/WEB-INF/jsp/versions.jsp

Tue, 03 Jan 2023 18:19:40 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 03 Jan 2023 18:19:40 +0100
changeset 266
65c72e65ff67
parent 225
87328572e36f
permissions
-rw-r--r--

simplify project-details view

     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 <%@page pageEncoding="UTF-8" %>
    28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.VersionsView" scope="request"/>
    33 <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/>
    34 <%@include file="../jspf/project-header.jspf" %>
    36 <div>
    37     <a href="./projects/${project.node}/issues/-/-/-/create" class="button"><fmt:message key="button.issue.create"/></a>
    38     <button onclick="toggleProjectDetails()" id="toggle-details-button"><fmt:message key="button.project.details"/></button>
    39     <a href="./projects/${project.node}/versions/-/create" class="button"><fmt:message key="button.version.create"/></a>
    40 </div>
    42 <h2><fmt:message key="progress"/></h2>
    44 <c:set var="summary" value="${viewmodel.projectInfo.issueSummary}"/>
    45 <%@include file="../jspf/issue-summary.jspf" %>
    47 <table id="version-list" class="datatable medskip fullwidth">
    48     <colgroup>
    49         <col>
    50         <col style="width: 28%">
    51         <col style="width: 12%">
    52         <col style="width: 12%">
    53         <col style="width: 12%">
    54         <col style="width: 12%">
    55         <col style="width: 12%">
    56         <col style="width: 12%">
    57     </colgroup>
    58     <thead>
    59     <tr>
    60         <th colspan="2"></th>
    61         <th colspan="3" class="hcenter">
    62             <fmt:message key="issues.resolved"/>
    63         </th>
    64         <th colspan="3" class="hcenter">
    65             <fmt:message key="issues.reported"/>
    66         </th>
    67     </tr>
    68     <tr>
    69         <th></th>
    70         <th><fmt:message key="version"/></th>
    71         <th class="hcenter"><fmt:message key="issues.open"/></th>
    72         <th class="hcenter"><fmt:message key="issues.active"/></th>
    73         <th class="hcenter"><fmt:message key="issues.done"/></th>
    74         <th class="hcenter"><fmt:message key="issues.open"/></th>
    75         <th class="hcenter"><fmt:message key="issues.active"/></th>
    76         <th class="hcenter"><fmt:message key="issues.done"/></th>
    77     </tr>
    78     </thead>
    79     <tbody>
    80     <c:forEach var="versionInfo" items="${viewmodel.versionInfos}">
    81         <tr>
    82             <td rowspan="2" style="width: 2em;"><a
    83                     href="./projects/${project.node}/versions/${versionInfo.version.node}/edit">&#x270e;</a></td>
    84             <td rowspan="2">
    85                 <a href="./projects/${project.node}/issues/${versionInfo.version.node}/-/">
    86                     <c:out value="${versionInfo.version.name}"/>
    87                 </a>
    88                 <div class="version-tag version-${versionInfo.version.status}"
    89                         <c:if test="${not empty versionInfo.version.releaseOrEolDate}">
    90                             title="<fmt:formatDate type="date" value="${versionInfo.version.releaseOrEolDate}"/>"
    91                         </c:if>
    92                 >
    93                     <fmt:message key="version.status.${versionInfo.version.status}"/>
    94                 </div>
    95             </td>
    96             <td class="hright">${versionInfo.resolvedTotal.open}</td>
    97             <td class="hright">${versionInfo.resolvedTotal.active}</td>
    98             <td class="hright">${versionInfo.resolvedTotal.done}</td>
    99             <td class="hright">${versionInfo.reportedTotal.open}</td>
   100             <td class="hright">${versionInfo.reportedTotal.active}</td>
   101             <td class="hright">${versionInfo.reportedTotal.done}</td>
   102         </tr>
   103         <tr>
   104             <td colspan="3">
   105                 <c:set var="summary" value="${versionInfo.resolvedTotal}"/>
   106                 <%@include file="../jspf/issue-progress.jspf" %>
   107             </td>
   108             <td colspan="3">
   109                 <c:set var="summary" value="${versionInfo.reportedTotal}"/>
   110                 <%@include file="../jspf/issue-progress.jspf" %>
   111             </td>
   112         </tr>
   113     </c:forEach>
   114     </tbody>
   115 </table>

mercurial