Sun, 21 Jun 2020 11:56:36 +0200
only show relevant versions in issue editor
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@78 | 34 | <form action="./projects/issues/commit" method="post"> |
universe@75 | 35 | <table class="formtable"> |
universe@75 | 36 | <colgroup> |
universe@75 | 37 | <col> |
universe@75 | 38 | <col style="width: 75ch"> |
universe@75 | 39 | </colgroup> |
universe@75 | 40 | <tbody> |
universe@75 | 41 | <tr> |
universe@82 | 42 | <th><fmt:message key="issue.project"/></th> |
universe@76 | 43 | <td> |
universe@86 | 44 | <c:choose> |
universe@86 | 45 | <c:when test="${not empty issue.project}"> |
universe@86 | 46 | <c:out value="${issue.project.name}" /> |
universe@86 | 47 | <input type="hidden" name="pid" value="${issue.project.id}" /> |
universe@86 | 48 | </c:when> |
universe@86 | 49 | <c:otherwise> |
universe@86 | 50 | <select name="pid" required> |
universe@86 | 51 | <c:forEach var="project" items="${viewmodel.projects}"> |
universe@86 | 52 | <option value="${project.id}"> |
universe@86 | 53 | <c:out value="${project.name}" /> |
universe@86 | 54 | </option> |
universe@86 | 55 | </c:forEach> |
universe@86 | 56 | </select> |
universe@86 | 57 | </c:otherwise> |
universe@86 | 58 | </c:choose> |
universe@76 | 59 | </td> |
universe@76 | 60 | </tr> |
universe@76 | 61 | <tr> |
universe@82 | 62 | <th><fmt:message key="issue.category"/></th> |
universe@75 | 63 | <td> |
universe@75 | 64 | <select name="category"> |
universe@86 | 65 | <c:forEach var="category" items="${viewmodel.issueCategory}"> |
universe@75 | 66 | <option |
universe@75 | 67 | <c:if test="${category eq issue.category}">selected</c:if> |
universe@75 | 68 | value="${category}"> |
universe@75 | 69 | <fmt:message key="issue.category.${category}" /> |
universe@75 | 70 | </option> |
universe@75 | 71 | </c:forEach> |
universe@75 | 72 | </select> |
universe@75 | 73 | </td> |
universe@75 | 74 | </tr> |
universe@75 | 75 | <tr> |
universe@82 | 76 | <th><fmt:message key="issue.status"/></th> |
universe@75 | 77 | <td> |
universe@75 | 78 | <select name="status"> |
universe@86 | 79 | <c:forEach var="status" items="${viewmodel.issueStatus}"> |
universe@75 | 80 | <option |
universe@75 | 81 | <c:if test="${status eq issue.status}">selected</c:if> |
universe@75 | 82 | value="${status}"> |
universe@75 | 83 | <fmt:message key="issue.status.${status}" /> |
universe@75 | 84 | </option> |
universe@75 | 85 | </c:forEach> |
universe@75 | 86 | </select> |
universe@75 | 87 | </td> |
universe@75 | 88 | </tr> |
universe@75 | 89 | <tr> |
universe@82 | 90 | <th><fmt:message key="issue.subject"/></th> |
universe@85 | 91 | <td><input name="subject" type="text" maxlength="200" required value="<c:out value="${issue.subject}"/>" /></td> |
universe@75 | 92 | </tr> |
universe@75 | 93 | <tr> |
universe@82 | 94 | <th class="vtop"><fmt:message key="issue.description"/></th> |
universe@75 | 95 | <td> |
universe@86 | 96 | <textarea name="description" rows="10"><c:out value="${issue.description}"/></textarea> |
universe@75 | 97 | </td> |
universe@75 | 98 | </tr> |
universe@75 | 99 | <tr> |
universe@82 | 100 | <th><fmt:message key="issue.assignee"/></th> |
universe@75 | 101 | <td> |
universe@75 | 102 | <select name="assignee"> |
universe@75 | 103 | <option value="-1"><fmt:message key="placeholder.null-assignee"/></option> |
universe@86 | 104 | <c:forEach var="user" items="${viewmodel.users}"> |
universe@75 | 105 | <option |
universe@75 | 106 | <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if> |
universe@75 | 107 | value="${user.id}"><c:out value="${user.displayname}"/></option> |
universe@75 | 108 | </c:forEach> |
universe@75 | 109 | </select> |
universe@75 | 110 | </td> |
universe@75 | 111 | </tr> |
universe@83 | 112 | <c:if test="${issue.project.id ge 0}"> |
universe@75 | 113 | <tr> |
universe@83 | 114 | <th class="vtop"><fmt:message key="issue.affected-versions"/></th> |
universe@83 | 115 | <td> |
universe@83 | 116 | <c:set var="fieldname" value="affected"/> |
universe@90 | 117 | <c:set var="selectionList" value="${viewmodel.versionsRecent}"/> |
universe@83 | 118 | <c:set var="data" value="${issue.affectedVersions}" /> |
universe@83 | 119 | <%@include file="../jspf/version-list.jsp"%> |
universe@83 | 120 | </td> |
universe@75 | 121 | </tr> |
universe@75 | 122 | <tr> |
universe@83 | 123 | <th class="vtop"><fmt:message key="issue.resolved-versions"/></th> |
universe@83 | 124 | <td> |
universe@83 | 125 | <c:set var="fieldname" value="resolved"/> |
universe@90 | 126 | <c:set var="selectionList" value="${viewmodel.versionsUpcoming}"/> |
universe@83 | 127 | <c:set var="data" value="${issue.resolvedVersions}" /> |
universe@83 | 128 | <%@include file="../jspf/version-list.jsp"%> |
universe@83 | 129 | </td> |
universe@75 | 130 | </tr> |
universe@83 | 131 | </c:if> |
universe@75 | 132 | <tr> |
universe@82 | 133 | <th><fmt:message key="issue.eta"/></th> |
universe@75 | 134 | <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td> |
universe@75 | 135 | </tr> |
universe@75 | 136 | <tr> |
universe@82 | 137 | <th><fmt:message key="issue.created"/></th> |
universe@75 | 138 | <td><fmt:formatDate value="${issue.created}" /></td> |
universe@75 | 139 | </tr> |
universe@75 | 140 | <tr> |
universe@82 | 141 | <th><fmt:message key="issue.updated"/></th> |
universe@75 | 142 | <td><fmt:formatDate value="${issue.updated}" /></td> |
universe@75 | 143 | </tr> |
universe@75 | 144 | </tbody> |
universe@75 | 145 | <tfoot> |
universe@75 | 146 | <tr> |
universe@75 | 147 | <td colspan="2"> |
universe@75 | 148 | <input type="hidden" name="id" value="${issue.id}"/> |
universe@76 | 149 | <c:choose> |
universe@86 | 150 | <c:when test="${not empty issue.project}"> |
universe@81 | 151 | <c:set var="cancelUrl">./projects/issues/?pid=${issue.project.id}</c:set> |
universe@76 | 152 | </c:when> |
universe@76 | 153 | <c:otherwise> |
universe@78 | 154 | <c:set var="cancelUrl">./projects/</c:set> |
universe@76 | 155 | </c:otherwise> |
universe@76 | 156 | </c:choose> |
universe@76 | 157 | <a href="${cancelUrl}" 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> |