src/main/webapp/WEB-INF/jsp/issue-view.jsp

Fri, 02 Apr 2021 11:59:14 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 02 Apr 2021 11:59:14 +0200
changeset 184
e8eecee6aadf
parent 181
502a10e24b85
child 207
479dd7993ef9
permissions
-rw-r--r--

completes kotlin migration

     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.IssueDetailView" scope="request"/>
    33 <c:set var="project" scope="page" value="${viewmodel.project}"/>
    34 <c:set var="component" scope="page" value="${viewmodel.component}"/>
    35 <c:set var="version" scope="page" value="${viewmodel.version}"/>
    36 <c:set var="issue" scope="page" value="${viewmodel.issue}" />
    38 <c:set var="issuesHref" scope="page" value="./projects/${project.node}/issues/${empty version ? '-' : version.node }/${empty component ? '-' : component.node}/"/>
    40 <table class="formtable fullwidth">
    41     <colgroup>
    42         <col>
    43         <col style="width: 100%">
    44     </colgroup>
    45     <tbody>
    46     <c:if test="${viewmodel.issue.id ge 0}">
    47     <tr>
    48         <th><fmt:message key="issue.id"/></th>
    49         <td>${issue.id}</td>
    50     </tr>
    51     </c:if>
    52     <tr>
    53         <th><fmt:message key="project"/></th>
    54         <td>
    55             <c:out value="${issue.project.name}" />
    56         </td>
    57     </tr>
    58     <tr>
    59         <th><fmt:message key="issue.created"/></th>
    60         <td>
    61             <c:set var="dateValue" value="${issue.created}"/>
    62             <%@include file="../jspf/date-with-tooltip.jspf"%>
    63         </td>
    64     </tr>
    65     <tr>
    66         <th><fmt:message key="issue.updated"/></th>
    67         <td>
    68             <c:set var="dateValue" value="${issue.updated}"/>
    69             <%@include file="../jspf/date-with-tooltip.jspf"%>
    70         </td>
    71     </tr>
    72     <tr>
    73         <th><fmt:message key="component"/></th>
    74         <td>
    75             <c:if test="${not empty issue.component}">
    76                 <c:out value="${issue.component.name}"/>
    77             </c:if>
    78             <c:if test="${empty issue.component}">
    79                 <fmt:message key="placeholder.null-component"/>
    80             </c:if>
    81         </td>
    82     </tr>
    83     <tr>
    84         <th><fmt:message key="issue.category"/></th>
    85         <td>
    86             <div class="issue-tag ${issue.category}" style="width: auto">
    87                 <fmt:message key="issue.category.${issue.category}" />
    88             </div>
    89         </td>
    90     </tr>
    91     <tr>
    92         <th><fmt:message key="issue.status"/></th>
    93         <td>
    94             <div class="issue-tag phase-${issue.status.phase.number}" style="width: auto">
    95                 <fmt:message key="issue.status.${issue.status}" />
    96             </div>
    97         </td>
    98     </tr>
    99     <tr>
   100         <th><fmt:message key="issue.subject"/></th>
   101         <td><c:out value="${issue.subject}"/></td>
   102     </tr>
   103     <tr>
   104         <th class="vtop"><fmt:message key="issue.description"/></th>
   105         <td>
   106             <div class="markdown-styled">
   107             ${issue.description}
   108             </div>
   109         </td>
   110     </tr>
   111     <tr>
   112         <th><fmt:message key="issue.assignee"/></th>
   113         <td>
   114             <c:if test="${not empty issue.assignee}">
   115                 <c:out value="${issue.assignee.displayname}"/>
   116             </c:if>
   117             <c:if test="${empty issue.assignee}">
   118                 <fmt:message key="placeholder.null-assignee" />
   119             </c:if>
   120         </td>
   121     </tr>
   122     <tr>
   123         <th class="vtop"><fmt:message key="issue.affected-versions"/></th>
   124         <td>
   125             <c:forEach var="version" items="${issue.affectedVersions}">
   126                 <c:out value="${version.name}"/>
   127             </c:forEach>
   128         </td>
   129     </tr>
   130     <tr>
   131         <th class="vtop"><fmt:message key="issue.resolved-versions"/></th>
   132         <td>
   133             <c:forEach var="version" items="${issue.resolvedVersions}">
   134                 <c:out value="${version.name}"/>
   135             </c:forEach>
   136         </td>
   137     </tr>
   138     <tr>
   139         <th><fmt:message key="issue.eta"/></th>
   140         <td><fmt:formatDate value="${issue.eta}" /></td>
   141     </tr>
   142     </tbody>
   143     <tfoot>
   144     <tr>
   145         <td colspan="2">
   146             <a href="${issuesHref}" class="button">
   147                 <fmt:message key="button.cancel"/>
   148             </a>
   149             <a href="${issuesHref}${issue.id}/edit" class="button submit">
   150                 <fmt:message key="button.issue.edit"/>
   151             </a>
   152         </td>
   153     </tr>
   154     </tfoot>
   155 </table>
   157 <hr class="comments-separator"/>
   158 <h2><fmt:message key="issue.comments"/></h2>
   159 <c:if test="${viewmodel.issue.id ge 0}">
   160 <form id="comment-form" action="${issuesHref}${issue.id}/comment" method="post">
   161     <table class="formtable fullwidth">
   162         <tbody>
   163             <tr>
   164                 <td><textarea rows="5" name="comment" required></textarea></td>
   165             </tr>
   166         </tbody>
   167         <tfoot>
   168             <tr>
   169                 <td>
   170                     <button type="submit"><fmt:message key="button.comment"/></button>
   171                 </td>
   172             </tr>
   173         </tfoot>
   174     </table>
   175 </form>
   176     <c:forEach var="comment" items="${viewmodel.comments}">
   177         <div class="comment">
   178             <div class="caption">
   179                 <c:if test="${not empty comment.author}">
   180                     <c:if test="${not empty comment.author.mail}">
   181                         <a href="mailto:${comment.author.mail}">
   182                     </c:if>
   183                     <c:out value="${comment.author.displayname}"/>
   184                     <c:if test="${not empty comment.author.mail}">
   185                         </a>
   186                     </c:if>
   187                 </c:if>
   188                 <c:if test="${empty comment.author}">
   189                     <fmt:message key="issue.comments.anonauthor"/>
   190                 </c:if>
   191             </div>
   192             <div class="smalltext">
   193                 <fmt:formatDate type="BOTH" value="${comment.created}" />
   194                 <c:if test="${comment.updateCount gt 0}">
   195                     <!-- TODO: update count -->
   196                 </c:if>
   197             </div>
   198             <div class="medskip markdown-styled">
   199                 ${comment.comment}
   200             </div>
   201         </div>
   202     </c:forEach>
   203 </c:if>

mercurial