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

Sat, 31 Oct 2020 10:54:20 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 31 Oct 2020 10:54:20 +0100
changeset 156
c5d6820d884e
parent 150
822b7e3d064d
child 162
2adc8623dd89
permissions
-rw-r--r--

fixes #33 - display time tooltip for created/update dates

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

mercurial