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

Tue, 03 Aug 2021 15:10:43 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 03 Aug 2021 15:10:43 +0200
changeset 212
c50da26a6d31
parent 194
2b3b7d0a885e
child 214
69647ddb57f2
permissions
-rw-r--r--

#154 improves issue view

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@181 55 <th><fmt:message key="component"/></th>
universe@134 56 <td>
universe@134 57 <select 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@82 68 <th><fmt:message key="issue.category"/></th>
universe@75 69 <td>
universe@75 70 <select 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@82 82 <th><fmt:message key="issue.status"/></th>
universe@75 83 <td>
universe@75 84 <select 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@82 96 <th><fmt:message key="issue.subject"/></th>
universe@85 97 <td><input name="subject" type="text" maxlength="200" required value="<c:out value="${issue.subject}"/>" /></td>
universe@75 98 </tr>
universe@75 99 <tr>
universe@82 100 <th class="vtop"><fmt:message key="issue.description"/></th>
universe@75 101 <td>
universe@86 102 <textarea name="description" rows="10"><c:out value="${issue.description}"/></textarea>
universe@75 103 </td>
universe@75 104 </tr>
universe@75 105 <tr>
universe@82 106 <th><fmt:message key="issue.assignee"/></th>
universe@75 107 <td>
universe@75 108 <select 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@83 123 <th class="vtop"><fmt:message key="issue.affected-versions"/></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@83 132 <th class="vtop"><fmt:message key="issue.resolved-versions"/></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@82 142 <th><fmt:message key="issue.eta"/></th>
universe@75 143 <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
universe@75 144 </tr>
universe@75 145 </tbody>
universe@75 146 <tfoot>
universe@75 147 <tr>
universe@75 148 <td colspan="2">
universe@185 149 <input type="checkbox" id="more" name="more" <c:if test="${more}">checked</c:if> />
universe@185 150 <label for="more"><fmt:message key="button.issue.create.another"/> </label>
universe@75 151 <input type="hidden" name="id" value="${issue.id}"/>
universe@146 152 <c:if test="${issue.id ge 0}">
universe@184 153 <a href="${issuesHref}${issue.id}" class="button">
universe@180 154 <fmt:message key="button.cancel"/>
universe@75 155 </a>
universe@146 156 </c:if>
universe@146 157 <c:if test="${issue.id lt 0}">
universe@184 158 <a href="${issuesHref}" class="button">
universe@180 159 <fmt:message key="button.cancel"/>
universe@146 160 </a>
universe@146 161 </c:if>
universe@180 162 <button type="submit"><fmt:message key="button.okay"/></button>
universe@75 163 </td>
universe@75 164 </tr>
universe@75 165 </tfoot>
universe@75 166 </table>
universe@75 167 </form>

mercurial