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

Fri, 22 May 2020 21:23:57 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 22 May 2020 21:23:57 +0200
changeset 75
33b6843fdf8a
child 76
82f71fb1758a
permissions
-rw-r--r--

adds the ability to create and edit issues

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 <%@page import="de.uapcore.lightpit.Constants" %>
universe@75 29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
universe@75 30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
universe@75 31
universe@75 32 <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/>
universe@75 33
universe@75 34 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/>
universe@75 35 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/>
universe@75 36 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/>
universe@75 37 <jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/>
universe@75 38 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/>
universe@75 39
universe@75 40 <form action="./${moduleInfo.modulePath}/issues/commit" method="post">
universe@75 41 <table class="formtable">
universe@75 42 <colgroup>
universe@75 43 <col>
universe@75 44 <col style="width: 75ch">
universe@75 45 </colgroup>
universe@75 46 <tbody>
universe@75 47 <tr>
universe@75 48 <th><fmt:message key="thead.issue.category"/></th>
universe@75 49 <td>
universe@75 50 <select name="category">
universe@75 51 <c:forEach var="category" items="${issueCategoryEnum}">
universe@75 52 <option
universe@75 53 <c:if test="${category eq issue.category}">selected</c:if>
universe@75 54 value="${category}">
universe@75 55 <fmt:message key="issue.category.${category}" />
universe@75 56 </option>
universe@75 57 </c:forEach>
universe@75 58 </select>
universe@75 59 </td>
universe@75 60 </tr>
universe@75 61 <tr>
universe@75 62 <th><fmt:message key="thead.issue.status"/></th>
universe@75 63 <td>
universe@75 64 <select name="status">
universe@75 65 <c:forEach var="status" items="${issueStatusEnum}">
universe@75 66 <option
universe@75 67 <c:if test="${status eq issue.status}">selected</c:if>
universe@75 68 value="${status}">
universe@75 69 <fmt:message key="issue.status.${status}" />
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@75 76 <th><fmt:message key="thead.issue.subject"/></th>
universe@75 77 <td><input name="subject" type="text" maxlength="20" required value="<c:out value="${issue.subject}"/>" /></td>
universe@75 78 </tr>
universe@75 79 <tr>
universe@75 80 <th class="vtop"><fmt:message key="thead.issue.description"/></th>
universe@75 81 <td>
universe@75 82 <textarea name="description"><c:out value="${issue.description}"/></textarea>
universe@75 83 </td>
universe@75 84 </tr>
universe@75 85 <tr>
universe@75 86 <th><fmt:message key="thead.issue.assignee"/></th>
universe@75 87 <td>
universe@75 88 <select name="assignee">
universe@75 89 <option value="-1"><fmt:message key="placeholder.null-assignee"/></option>
universe@75 90 <c:forEach var="user" items="${users}">
universe@75 91 <option
universe@75 92 <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if>
universe@75 93 value="${user.id}"><c:out value="${user.displayname}"/></option>
universe@75 94 </c:forEach>
universe@75 95 </select>
universe@75 96 </td>
universe@75 97 </tr>
universe@75 98 <tr>
universe@75 99 <th>
universe@75 100 <c:choose>
universe@75 101 <c:when test="${issue.affectedVersions.size() gt 1}">
universe@75 102 <fmt:message key="thead.issue.affected-versions"/>
universe@75 103 </c:when>
universe@75 104 <c:otherwise>
universe@75 105 <fmt:message key="thead.issue.affected-version"/>
universe@75 106 </c:otherwise>
universe@75 107 </c:choose>
universe@75 108 </th>
universe@75 109 <td>TODO</td>
universe@75 110 </tr>
universe@75 111 <tr>
universe@75 112 <th>
universe@75 113 <c:choose>
universe@75 114 <c:when test="${issue.scheduledVersions.size() gt 1}">
universe@75 115 <fmt:message key="thead.issue.scheduled-versions"/>
universe@75 116 </c:when>
universe@75 117 <c:otherwise>
universe@75 118 <fmt:message key="thead.issue.scheduled-version"/>
universe@75 119 </c:otherwise>
universe@75 120 </c:choose>
universe@75 121 </th>
universe@75 122 <td>TODO</td>
universe@75 123 </tr>
universe@75 124 <tr>
universe@75 125 <th>
universe@75 126 <c:choose>
universe@75 127 <c:when test="${issue.resolvedVersions.size() gt 1}">
universe@75 128 <fmt:message key="thead.issue.resolved-versions"/>
universe@75 129 </c:when>
universe@75 130 <c:otherwise>
universe@75 131 <fmt:message key="thead.issue.resolved-version"/>
universe@75 132 </c:otherwise>
universe@75 133 </c:choose>
universe@75 134 </th>
universe@75 135 <td>TODO</td>
universe@75 136 </tr>
universe@75 137 <tr>
universe@75 138 <th><fmt:message key="thead.issue.eta"/></th>
universe@75 139 <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
universe@75 140 </tr>
universe@75 141 <tr>
universe@75 142 <th><fmt:message key="thead.issue.created"/></th>
universe@75 143 <td><fmt:formatDate value="${issue.created}" /></td>
universe@75 144 </tr>
universe@75 145 <tr>
universe@75 146 <th><fmt:message key="thead.issue.updated"/></th>
universe@75 147 <td><fmt:formatDate value="${issue.updated}" /></td>
universe@75 148 </tr>
universe@75 149 </tbody>
universe@75 150 <tfoot>
universe@75 151 <tr>
universe@75 152 <td colspan="2">
universe@75 153 <input type="hidden" name="id" value="${issue.id}"/>
universe@75 154 <a href="./${moduleInfo.modulePath}/view?pid=${issue.project.id}" class="button">
universe@75 155 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
universe@75 156 </a>
universe@75 157 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
universe@75 158 </td>
universe@75 159 </tr>
universe@75 160 </tfoot>
universe@75 161 </table>
universe@75 162 </form>

mercurial