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

Thu, 19 Aug 2021 14:51:04 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 19 Aug 2021 14:51:04 +0200
changeset 231
dcb1d5a7ea3a
parent 227
f0ede8046b59
child 292
703591e739f4
permissions
-rw-r--r--

#163 removes multi selection for versions

universe@75 1 <%--
universe@75 2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@75 3
universe@180 4 Copyright 2021 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@184 32
universe@86 33 <c:set var="issue" scope="page" value="${viewmodel.issue}" />
universe@184 34 <c:set var="project" scope="page" value="${viewmodel.project}"/>
universe@184 35 <c:set var="component" scope="page" value="${viewmodel.component}"/>
universe@184 36 <c:set var="version" scope="page" value="${viewmodel.version}"/>
universe@75 37
universe@184 38 <c:set var="issuesHref" value="./projects/${project.node}/issues/${empty version ? '-' : version.node }/${empty component ? '-' : component.node}/"/>
universe@184 39
universe@186 40 <form action="${issuesHref}-/commit" method="post">
universe@212 41 <input type="hidden" name="project" value="${issue.project.id}" />
universe@124 42 <table class="formtable fullwidth">
universe@75 43 <colgroup>
universe@75 44 <col>
universe@124 45 <col style="width: 100%">
universe@75 46 </colgroup>
universe@75 47 <tbody>
universe@113 48 <c:if test="${viewmodel.issue.id ge 0}">
universe@75 49 <tr>
universe@108 50 <th><fmt:message key="issue.id"/></th>
universe@108 51 <td>${issue.id}</td>
universe@108 52 </tr>
universe@113 53 </c:if>
universe@108 54 <tr>
universe@214 55 <th><label for="issue-component"><fmt:message key="component"/></label></th>
universe@134 56 <td>
universe@214 57 <select id="issue-component" name="component">
universe@134 58 <option value="-1"><fmt:message key="placeholder.null-component"/></option>
universe@186 59 <c:forEach var="comp" items="${viewmodel.components}">
universe@227 60 <c:set var="isSelectedComponent" value="${not empty issue.component and comp eq issue.component}" scope="page"/>
universe@227 61 <c:if test="${isSelectedComponent or comp.active}">
universe@134 62 <option
universe@227 63 <c:if test="${isSelectedComponent}">selected</c:if>
universe@186 64 value="${comp.id}"><c:out value="${comp.name}"/></option>
universe@227 65 </c:if>
universe@134 66 </c:forEach>
universe@134 67 </select>
universe@134 68 </td>
universe@134 69 </tr>
universe@134 70 <tr>
universe@214 71 <th><label for="issue-category"><fmt:message key="issue.category"/></label></th>
universe@75 72 <td>
universe@214 73 <select id="issue-category" name="category">
universe@86 74 <c:forEach var="category" items="${viewmodel.issueCategory}">
universe@75 75 <option
universe@75 76 <c:if test="${category eq issue.category}">selected</c:if>
universe@75 77 value="${category}">
universe@75 78 <fmt:message key="issue.category.${category}" />
universe@75 79 </option>
universe@75 80 </c:forEach>
universe@75 81 </select>
universe@75 82 </td>
universe@75 83 </tr>
universe@75 84 <tr>
universe@214 85 <th><label for="issue-status"><fmt:message key="issue.status"/></label></th>
universe@75 86 <td>
universe@214 87 <select id="issue-status" name="status">
universe@86 88 <c:forEach var="status" items="${viewmodel.issueStatus}">
universe@75 89 <option
universe@75 90 <c:if test="${status eq issue.status}">selected</c:if>
universe@75 91 value="${status}">
universe@75 92 <fmt:message key="issue.status.${status}" />
universe@75 93 </option>
universe@75 94 </c:forEach>
universe@75 95 </select>
universe@75 96 </td>
universe@75 97 </tr>
universe@75 98 <tr>
universe@214 99 <th><label for="issue-subject"><fmt:message key="issue.subject"/></label></th>
universe@214 100 <td><input id="issue-subject" name="subject" type="text" maxlength="200" required value="<c:out value="${issue.subject}"/>" /></td>
universe@75 101 </tr>
universe@75 102 <tr>
universe@214 103 <th class="vtop"><label for="issue-description"><fmt:message key="issue.description"/></label></th>
universe@75 104 <td>
universe@214 105 <textarea id="issue-description" name="description" rows="10"><c:out value="${issue.description}"/></textarea>
universe@75 106 </td>
universe@75 107 </tr>
universe@75 108 <tr>
universe@214 109 <th><label for="issue-assignee"><fmt:message key="issue.assignee"/></label></th>
universe@75 110 <td>
universe@214 111 <select id="issue-assignee" name="assignee">
universe@136 112 <option value="-2" title="<fmt:message key="placeholder.auto-assignee.tooltip"/>"><fmt:message key="placeholder.auto-assignee"/></option>
universe@136 113 <option value="-1"
universe@136 114 <c:if test="${issue.id ge 0 and empty issue.assignee}">selected</c:if>
universe@136 115 ><fmt:message key="placeholder.null-assignee"/></option>
universe@86 116 <c:forEach var="user" items="${viewmodel.users}">
universe@75 117 <option
universe@75 118 <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if>
universe@75 119 value="${user.id}"><c:out value="${user.displayname}"/></option>
universe@75 120 </c:forEach>
universe@75 121 </select>
universe@75 122 </td>
universe@75 123 </tr>
universe@83 124 <c:if test="${issue.project.id ge 0}">
universe@75 125 <tr>
universe@214 126 <th class="vtop"><label for="issue-affected"><fmt:message key="issue.affected-versions"/></label></th>
universe@83 127 <td>
universe@231 128 <select id="issue-affected" name="affected">
universe@231 129 <option value="-1"><fmt:message key="placeholder.null-version"/></option>
universe@231 130 <c:forEach var="vselitem" items="${viewmodel.versionsRecent}">
universe@231 131 <option value="${vselitem.id}" <c:if test="${issue.affected eq vselitem}">selected</c:if> >
universe@231 132 <c:out value="${vselitem.name}" />
universe@231 133 </option>
universe@231 134 </c:forEach>
universe@231 135 </select>
universe@83 136 </td>
universe@75 137 </tr>
universe@75 138 <tr>
universe@214 139 <th class="vtop"><label for="issue-resolved"><fmt:message key="issue.resolved-versions"/></label></th>
universe@83 140 <td>
universe@231 141 <select id="issue-resolved" name="resolved">
universe@231 142 <option value="-1"><fmt:message key="placeholder.null-version"/></option>
universe@231 143 <c:forEach var="vselitem" items="${viewmodel.versionsUpcoming}">
universe@231 144 <option value="${vselitem.id}" <c:if test="${issue.resolved eq vselitem}">selected</c:if> >
universe@231 145 <c:out value="${vselitem.name}" />
universe@231 146 </option>
universe@231 147 </c:forEach>
universe@231 148 </select>
universe@83 149 </td>
universe@75 150 </tr>
universe@83 151 </c:if>
universe@75 152 <tr>
universe@214 153 <th><label for="issue-eta"><fmt:message key="issue.eta"/></label></th>
universe@214 154 <td><input id="issue-eta" name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
universe@75 155 </tr>
universe@214 156 <c:if test="${issue.id ge 0}">
universe@214 157 <tr>
universe@214 158 <th class="vtop"><label for="issue-comment"><fmt:message key="issue.comment"/></label> </th>
universe@214 159 <td><textarea id="issue-comment" rows="3" name="comment"></textarea></td>
universe@214 160 </tr>
universe@214 161 </c:if>
universe@75 162 </tbody>
universe@75 163 <tfoot>
universe@75 164 <tr>
universe@75 165 <td colspan="2">
universe@185 166 <input type="checkbox" id="more" name="more" <c:if test="${more}">checked</c:if> />
universe@185 167 <label for="more"><fmt:message key="button.issue.create.another"/> </label>
universe@75 168 <input type="hidden" name="id" value="${issue.id}"/>
universe@146 169 <c:if test="${issue.id ge 0}">
universe@184 170 <a href="${issuesHref}${issue.id}" class="button">
universe@180 171 <fmt:message key="button.cancel"/>
universe@75 172 </a>
universe@146 173 </c:if>
universe@146 174 <c:if test="${issue.id lt 0}">
universe@184 175 <a href="${issuesHref}" class="button">
universe@180 176 <fmt:message key="button.cancel"/>
universe@146 177 </a>
universe@146 178 </c:if>
universe@180 179 <button type="submit"><fmt:message key="button.okay"/></button>
universe@75 180 </td>
universe@75 181 </tr>
universe@75 182 </tfoot>
universe@75 183 </table>
universe@75 184 </form>

mercurial