Thu, 15 Oct 2020 20:04:56 +0200
removes trailing slash in version links in projects.jsp
universe@75 | 1 | <%-- |
universe@75 | 2 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
universe@75 | 3 | |
universe@75 | 4 | Copyright 2018 Mike Becker. All rights reserved. |
universe@75 | 5 | |
universe@75 | 6 | Redistribution and use in source and binary forms, with or without |
universe@75 | 7 | modification, are permitted provided that the following conditions are met: |
universe@75 | 8 | |
universe@75 | 9 | 1. Redistributions of source code must retain the above copyright |
universe@75 | 10 | notice, this list of conditions and the following disclaimer. |
universe@75 | 11 | |
universe@75 | 12 | 2. Redistributions in binary form must reproduce the above copyright |
universe@75 | 13 | notice, this list of conditions and the following disclaimer in the |
universe@75 | 14 | documentation and/or other materials provided with the distribution. |
universe@75 | 15 | |
universe@75 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
universe@75 | 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
universe@75 | 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
universe@75 | 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
universe@75 | 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
universe@75 | 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
universe@75 | 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
universe@75 | 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
universe@75 | 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
universe@75 | 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
universe@75 | 26 | --%> |
universe@75 | 27 | <%@page pageEncoding="UTF-8" %> |
universe@75 | 28 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
universe@75 | 29 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
universe@75 | 30 | |
universe@86 | 31 | <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueEditView" scope="request"/> |
universe@86 | 32 | <c:set var="issue" scope="page" value="${viewmodel.issue}" /> |
universe@75 | 33 | |
universe@131 | 34 | <%-- TODO: change to ./issues/commit --%> |
universe@131 | 35 | <form action="./projects/commit-issue" method="post"> |
universe@124 | 36 | <table class="formtable fullwidth"> |
universe@75 | 37 | <colgroup> |
universe@75 | 38 | <col> |
universe@124 | 39 | <col style="width: 100%"> |
universe@75 | 40 | </colgroup> |
universe@75 | 41 | <tbody> |
universe@113 | 42 | <c:if test="${viewmodel.issue.id ge 0}"> |
universe@75 | 43 | <tr> |
universe@108 | 44 | <th><fmt:message key="issue.id"/></th> |
universe@108 | 45 | <td>${issue.id}</td> |
universe@108 | 46 | </tr> |
universe@113 | 47 | </c:if> |
universe@108 | 48 | <tr> |
universe@82 | 49 | <th><fmt:message key="issue.project"/></th> |
universe@76 | 50 | <td> |
universe@86 | 51 | <c:choose> |
universe@86 | 52 | <c:when test="${not empty issue.project}"> |
universe@86 | 53 | <c:out value="${issue.project.name}" /> |
universe@86 | 54 | <input type="hidden" name="pid" value="${issue.project.id}" /> |
universe@86 | 55 | </c:when> |
universe@86 | 56 | <c:otherwise> |
universe@86 | 57 | <select name="pid" required> |
universe@86 | 58 | <c:forEach var="project" items="${viewmodel.projects}"> |
universe@86 | 59 | <option value="${project.id}"> |
universe@86 | 60 | <c:out value="${project.name}" /> |
universe@86 | 61 | </option> |
universe@86 | 62 | </c:forEach> |
universe@86 | 63 | </select> |
universe@86 | 64 | </c:otherwise> |
universe@86 | 65 | </c:choose> |
universe@76 | 66 | </td> |
universe@76 | 67 | </tr> |
universe@76 | 68 | <tr> |
universe@103 | 69 | <th><fmt:message key="issue.created"/></th> |
universe@103 | 70 | <td><fmt:formatDate value="${issue.created}" /></td> |
universe@103 | 71 | </tr> |
universe@103 | 72 | <tr> |
universe@103 | 73 | <th><fmt:message key="issue.updated"/></th> |
universe@103 | 74 | <td><fmt:formatDate value="${issue.updated}" /></td> |
universe@103 | 75 | </tr> |
universe@103 | 76 | <tr> |
universe@82 | 77 | <th><fmt:message key="issue.category"/></th> |
universe@75 | 78 | <td> |
universe@75 | 79 | <select name="category"> |
universe@86 | 80 | <c:forEach var="category" items="${viewmodel.issueCategory}"> |
universe@75 | 81 | <option |
universe@75 | 82 | <c:if test="${category eq issue.category}">selected</c:if> |
universe@75 | 83 | value="${category}"> |
universe@75 | 84 | <fmt:message key="issue.category.${category}" /> |
universe@75 | 85 | </option> |
universe@75 | 86 | </c:forEach> |
universe@75 | 87 | </select> |
universe@75 | 88 | </td> |
universe@75 | 89 | </tr> |
universe@75 | 90 | <tr> |
universe@82 | 91 | <th><fmt:message key="issue.status"/></th> |
universe@75 | 92 | <td> |
universe@75 | 93 | <select name="status"> |
universe@86 | 94 | <c:forEach var="status" items="${viewmodel.issueStatus}"> |
universe@75 | 95 | <option |
universe@75 | 96 | <c:if test="${status eq issue.status}">selected</c:if> |
universe@75 | 97 | value="${status}"> |
universe@75 | 98 | <fmt:message key="issue.status.${status}" /> |
universe@75 | 99 | </option> |
universe@75 | 100 | </c:forEach> |
universe@75 | 101 | </select> |
universe@75 | 102 | </td> |
universe@75 | 103 | </tr> |
universe@75 | 104 | <tr> |
universe@82 | 105 | <th><fmt:message key="issue.subject"/></th> |
universe@85 | 106 | <td><input name="subject" type="text" maxlength="200" required value="<c:out value="${issue.subject}"/>" /></td> |
universe@75 | 107 | </tr> |
universe@75 | 108 | <tr> |
universe@82 | 109 | <th class="vtop"><fmt:message key="issue.description"/></th> |
universe@75 | 110 | <td> |
universe@86 | 111 | <textarea name="description" rows="10"><c:out value="${issue.description}"/></textarea> |
universe@75 | 112 | </td> |
universe@75 | 113 | </tr> |
universe@75 | 114 | <tr> |
universe@82 | 115 | <th><fmt:message key="issue.assignee"/></th> |
universe@75 | 116 | <td> |
universe@75 | 117 | <select name="assignee"> |
universe@75 | 118 | <option value="-1"><fmt:message key="placeholder.null-assignee"/></option> |
universe@86 | 119 | <c:forEach var="user" items="${viewmodel.users}"> |
universe@75 | 120 | <option |
universe@75 | 121 | <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if> |
universe@75 | 122 | value="${user.id}"><c:out value="${user.displayname}"/></option> |
universe@75 | 123 | </c:forEach> |
universe@75 | 124 | </select> |
universe@75 | 125 | </td> |
universe@75 | 126 | </tr> |
universe@83 | 127 | <c:if test="${issue.project.id ge 0}"> |
universe@75 | 128 | <tr> |
universe@83 | 129 | <th class="vtop"><fmt:message key="issue.affected-versions"/></th> |
universe@83 | 130 | <td> |
universe@83 | 131 | <c:set var="fieldname" value="affected"/> |
universe@90 | 132 | <c:set var="selectionList" value="${viewmodel.versionsRecent}"/> |
universe@83 | 133 | <c:set var="data" value="${issue.affectedVersions}" /> |
universe@115 | 134 | <%@include file="../jspf/version-list.jspf"%> |
universe@83 | 135 | </td> |
universe@75 | 136 | </tr> |
universe@75 | 137 | <tr> |
universe@83 | 138 | <th class="vtop"><fmt:message key="issue.resolved-versions"/></th> |
universe@83 | 139 | <td> |
universe@83 | 140 | <c:set var="fieldname" value="resolved"/> |
universe@90 | 141 | <c:set var="selectionList" value="${viewmodel.versionsUpcoming}"/> |
universe@83 | 142 | <c:set var="data" value="${issue.resolvedVersions}" /> |
universe@115 | 143 | <%@include file="../jspf/version-list.jspf"%> |
universe@83 | 144 | </td> |
universe@75 | 145 | </tr> |
universe@83 | 146 | </c:if> |
universe@75 | 147 | <tr> |
universe@82 | 148 | <th><fmt:message key="issue.eta"/></th> |
universe@75 | 149 | <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td> |
universe@75 | 150 | </tr> |
universe@75 | 151 | </tbody> |
universe@75 | 152 | <tfoot> |
universe@75 | 153 | <tr> |
universe@75 | 154 | <td colspan="2"> |
universe@75 | 155 | <input type="hidden" name="id" value="${issue.id}"/> |
universe@131 | 156 | <%-- TODO: fix #14 --%> |
universe@131 | 157 | <a href="./projects/${issue.project.id}/versions/" class="button"> |
universe@75 | 158 | <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> |
universe@75 | 159 | </a> |
universe@75 | 160 | <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button> |
universe@75 | 161 | </td> |
universe@75 | 162 | </tr> |
universe@75 | 163 | </tfoot> |
universe@75 | 164 | </table> |
universe@75 | 165 | </form> |
universe@124 | 166 | <hr class="comments-separator"/> |
universe@124 | 167 | <h2><fmt:message key="issue.comments"/></h2> |
universe@124 | 168 | <c:if test="${viewmodel.issue.id ge 0}"> |
universe@131 | 169 | <form id="comment-form" action="./projects/commit-issue-comment" method="post"> |
universe@124 | 170 | <table class="formtable fullwidth"> |
universe@124 | 171 | <tbody> |
universe@124 | 172 | <tr> |
universe@125 | 173 | <td><textarea rows="5" name="comment" required></textarea></td> |
universe@124 | 174 | </tr> |
universe@124 | 175 | </tbody> |
universe@124 | 176 | <tfoot> |
universe@124 | 177 | <tr> |
universe@124 | 178 | <td> |
universe@124 | 179 | <input type="hidden" name="issueid" value="${issue.id}"/> |
universe@124 | 180 | <button type="submit"><fmt:message key="button.comment"/></button> |
universe@124 | 181 | </td> |
universe@124 | 182 | </tr> |
universe@124 | 183 | </tfoot> |
universe@124 | 184 | </table> |
universe@124 | 185 | </form> |
universe@124 | 186 | <c:forEach var="comment" items="${viewmodel.comments}"> |
universe@124 | 187 | <div class="comment"> |
universe@124 | 188 | <div class="caption"> |
universe@124 | 189 | <c:if test="${not empty comment.author}"> |
universe@124 | 190 | <c:out value="${comment.author.displayname}"/> |
universe@124 | 191 | </c:if> |
universe@124 | 192 | <c:if test="${empty comment.author}"> |
universe@124 | 193 | <fmt:message key="issue.comments.anonauthor"/> |
universe@124 | 194 | </c:if> |
universe@124 | 195 | </div> |
universe@124 | 196 | <div class="smalltext"> |
universe@124 | 197 | <fmt:formatDate type="BOTH" value="${comment.created}" /> |
universe@124 | 198 | <c:if test="${comment.updateCount gt 0}"> |
universe@124 | 199 | <!-- TODO: update count --> |
universe@124 | 200 | </c:if> |
universe@124 | 201 | </div> |
universe@124 | 202 | <div class="medskip"> |
universe@124 | 203 | <c:out value="${comment.comment}"/> |
universe@124 | 204 | </div> |
universe@124 | 205 | </div> |
universe@124 | 206 | </c:forEach> |
universe@124 | 207 | </c:if> |
universe@124 | 208 |