1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/main/webapp/WEB-INF/jsp/issue-view.jsp Fri Oct 23 13:29:33 2020 +0200 1.3 @@ -0,0 +1,186 @@ 1.4 +<%-- 1.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 1.6 + 1.7 +Copyright 2018 Mike Becker. All rights reserved. 1.8 + 1.9 +Redistribution and use in source and binary forms, with or without 1.10 +modification, are permitted provided that the following conditions are met: 1.11 + 1.12 +1. Redistributions of source code must retain the above copyright 1.13 +notice, this list of conditions and the following disclaimer. 1.14 + 1.15 +2. Redistributions in binary form must reproduce the above copyright 1.16 +notice, this list of conditions and the following disclaimer in the 1.17 +documentation and/or other materials provided with the distribution. 1.18 + 1.19 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 1.20 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1.21 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 1.22 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 1.23 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1.24 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 1.25 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 1.26 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.27 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1.28 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.29 +--%> 1.30 +<%@page pageEncoding="UTF-8" %> 1.31 +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 1.32 +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 1.33 + 1.34 +<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueDetailView" scope="request"/> 1.35 +<c:set var="issue" scope="page" value="${viewmodel.issue}" /> 1.36 + 1.37 +<table class="formtable fullwidth"> 1.38 + <colgroup> 1.39 + <col> 1.40 + <col style="width: 100%"> 1.41 + </colgroup> 1.42 + <tbody> 1.43 + <c:if test="${viewmodel.issue.id ge 0}"> 1.44 + <tr> 1.45 + <th><fmt:message key="issue.id"/></th> 1.46 + <td>${issue.id}</td> 1.47 + </tr> 1.48 + </c:if> 1.49 + <tr> 1.50 + <th><fmt:message key="issue.project"/></th> 1.51 + <td> 1.52 + <c:out value="${issue.project.name}" /> 1.53 + </td> 1.54 + </tr> 1.55 + <tr> 1.56 + <th><fmt:message key="issue.created"/></th> 1.57 + <td><fmt:formatDate value="${issue.created}" /></td> 1.58 + </tr> 1.59 + <tr> 1.60 + <th><fmt:message key="issue.updated"/></th> 1.61 + <td><fmt:formatDate value="${issue.updated}" /></td> 1.62 + </tr> 1.63 + <tr> 1.64 + <th><fmt:message key="issue.component"/></th> 1.65 + <td> 1.66 + <c:if test="${not empty issue.component}"> 1.67 + <c:out value="${issue.component.name}"/> 1.68 + </c:if> 1.69 + <c:if test="${empty issue.component}"> 1.70 + <fmt:message key="placeholder.null-component"/> 1.71 + </c:if> 1.72 + </td> 1.73 + </tr> 1.74 + <tr> 1.75 + <th><fmt:message key="issue.category"/></th> 1.76 + <td> 1.77 + <div class="issue-tag ${issue.category}" style="width: auto"> 1.78 + <fmt:message key="issue.category.${issue.category}" /> 1.79 + </div> 1.80 + </td> 1.81 + </tr> 1.82 + <tr> 1.83 + <th><fmt:message key="issue.status"/></th> 1.84 + <td> 1.85 + <div class="issue-tag phase-${issue.status.phase}" style="width: auto"> 1.86 + <fmt:message key="issue.status.${issue.status}" /> 1.87 + </div> 1.88 + </td> 1.89 + </tr> 1.90 + <tr> 1.91 + <th><fmt:message key="issue.subject"/></th> 1.92 + <td><c:out value="${issue.subject}"/></td> 1.93 + </tr> 1.94 + <tr> 1.95 + <th class="vtop"><fmt:message key="issue.description"/></th> 1.96 + <td> 1.97 + <textarea readonly rows="10"><c:out value="${issue.description}"/></textarea> 1.98 + </td> 1.99 + </tr> 1.100 + <tr> 1.101 + <th><fmt:message key="issue.assignee"/></th> 1.102 + <td> 1.103 + <c:if test="${not empty issue.assignee}"> 1.104 + <c:out value="${issue.assignee.displayname}"/> 1.105 + </c:if> 1.106 + <c:if test="${empty issue.assignee}"> 1.107 + <fmt:message key="placeholder.null-assignee" /> 1.108 + </c:if> 1.109 + </td> 1.110 + </tr> 1.111 + <tr> 1.112 + <th class="vtop"><fmt:message key="issue.affected-versions"/></th> 1.113 + <td> 1.114 + <c:forEach var="version" items="${issue.affectedVersions}"> 1.115 + <c:out value="${version.name}"/> 1.116 + </c:forEach> 1.117 + </td> 1.118 + </tr> 1.119 + <tr> 1.120 + <th class="vtop"><fmt:message key="issue.resolved-versions"/></th> 1.121 + <td> 1.122 + <c:forEach var="version" items="${issue.resolvedVersions}"> 1.123 + <c:out value="${version.name}"/> 1.124 + </c:forEach> 1.125 + </td> 1.126 + </tr> 1.127 + <tr> 1.128 + <th><fmt:message key="issue.eta"/></th> 1.129 + <td><fmt:formatDate value="${issue.eta}" /></td> 1.130 + </tr> 1.131 + </tbody> 1.132 + <tfoot> 1.133 + <tr> 1.134 + <td colspan="2"> 1.135 + <%-- TODO: fix #14 --%> 1.136 + <a href="./projects/${issue.project.node}/all-components/all-versions/issues/" class="button"> 1.137 + <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 1.138 + </a> 1.139 + <a href="./projects/${issue.project.node}/issues/${issue.id}/edit" class="button submit"> 1.140 + <fmt:message key="button.issue.edit"/> 1.141 + </a> 1.142 + </td> 1.143 + </tr> 1.144 + </tfoot> 1.145 +</table> 1.146 + 1.147 +<hr class="comments-separator"/> 1.148 +<h2><fmt:message key="issue.comments"/></h2> 1.149 +<c:if test="${viewmodel.issue.id ge 0}"> 1.150 +<form id="comment-form" action="./projects/commit-issue-comment" method="post"> 1.151 + <table class="formtable fullwidth"> 1.152 + <tbody> 1.153 + <tr> 1.154 + <td><textarea rows="5" name="comment" required></textarea></td> 1.155 + </tr> 1.156 + </tbody> 1.157 + <tfoot> 1.158 + <tr> 1.159 + <td> 1.160 + <input type="hidden" name="issueid" value="${issue.id}"/> 1.161 + <button type="submit"><fmt:message key="button.comment"/></button> 1.162 + </td> 1.163 + </tr> 1.164 + </tfoot> 1.165 + </table> 1.166 +</form> 1.167 + <c:forEach var="comment" items="${viewmodel.comments}"> 1.168 + <div class="comment"> 1.169 + <div class="caption"> 1.170 + <c:if test="${not empty comment.author}"> 1.171 + <c:out value="${comment.author.displayname}"/> 1.172 + </c:if> 1.173 + <c:if test="${empty comment.author}"> 1.174 + <fmt:message key="issue.comments.anonauthor"/> 1.175 + </c:if> 1.176 + </div> 1.177 + <div class="smalltext"> 1.178 + <fmt:formatDate type="BOTH" value="${comment.created}" /> 1.179 + <c:if test="${comment.updateCount gt 0}"> 1.180 + <!-- TODO: update count --> 1.181 + </c:if> 1.182 + </div> 1.183 + <div class="medskip"> 1.184 + <c:out value="${comment.comment}"/> 1.185 + </div> 1.186 + </div> 1.187 + </c:forEach> 1.188 +</c:if> 1.189 +