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

Mon, 30 Oct 2023 14:44:36 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 30 Oct 2023 14:44:36 +0100
changeset 292
703591e739f4
parent 231
dcb1d5a7ea3a
permissions
-rw-r--r--

add possibility to show issues w/o version or component - fixes #335

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

mercurial