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

Mon, 09 Aug 2021 16:22:56 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 09 Aug 2021 16:22:56 +0200
changeset 214
69647ddb57f2
parent 212
c50da26a6d31
child 227
f0ede8046b59
permissions
-rw-r--r--

#153 adds comment box to issues form

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@134 60 <option
universe@186 61 <c:if test="${not empty issue.component and comp eq issue.component}">selected</c:if>
universe@186 62 value="${comp.id}"><c:out value="${comp.name}"/></option>
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@83 125 <c:set var="fieldname" value="affected"/>
universe@90 126 <c:set var="selectionList" value="${viewmodel.versionsRecent}"/>
universe@83 127 <c:set var="data" value="${issue.affectedVersions}" />
universe@115 128 <%@include file="../jspf/version-list.jspf"%>
universe@83 129 </td>
universe@75 130 </tr>
universe@75 131 <tr>
universe@214 132 <th class="vtop"><label for="issue-resolved"><fmt:message key="issue.resolved-versions"/></label></th>
universe@83 133 <td>
universe@83 134 <c:set var="fieldname" value="resolved"/>
universe@90 135 <c:set var="selectionList" value="${viewmodel.versionsUpcoming}"/>
universe@83 136 <c:set var="data" value="${issue.resolvedVersions}" />
universe@115 137 <%@include file="../jspf/version-list.jspf"%>
universe@83 138 </td>
universe@75 139 </tr>
universe@83 140 </c:if>
universe@75 141 <tr>
universe@214 142 <th><label for="issue-eta"><fmt:message key="issue.eta"/></label></th>
universe@214 143 <td><input id="issue-eta" name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
universe@75 144 </tr>
universe@214 145 <c:if test="${issue.id ge 0}">
universe@214 146 <tr>
universe@214 147 <th class="vtop"><label for="issue-comment"><fmt:message key="issue.comment"/></label> </th>
universe@214 148 <td><textarea id="issue-comment" rows="3" name="comment"></textarea></td>
universe@214 149 </tr>
universe@214 150 </c:if>
universe@75 151 </tbody>
universe@75 152 <tfoot>
universe@75 153 <tr>
universe@75 154 <td colspan="2">
universe@185 155 <input type="checkbox" id="more" name="more" <c:if test="${more}">checked</c:if> />
universe@185 156 <label for="more"><fmt:message key="button.issue.create.another"/> </label>
universe@75 157 <input type="hidden" name="id" value="${issue.id}"/>
universe@146 158 <c:if test="${issue.id ge 0}">
universe@184 159 <a href="${issuesHref}${issue.id}" class="button">
universe@180 160 <fmt:message key="button.cancel"/>
universe@75 161 </a>
universe@146 162 </c:if>
universe@146 163 <c:if test="${issue.id lt 0}">
universe@184 164 <a href="${issuesHref}" class="button">
universe@180 165 <fmt:message key="button.cancel"/>
universe@146 166 </a>
universe@146 167 </c:if>
universe@180 168 <button type="submit"><fmt:message key="button.okay"/></button>
universe@75 169 </td>
universe@75 170 </tr>
universe@75 171 </tfoot>
universe@75 172 </table>
universe@75 173 </form>

mercurial