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

Fri, 09 Oct 2020 11:41:35 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 09 Oct 2020 11:41:35 +0200
changeset 115
c27638a50c92
parent 113
eba08a3a7eb2
child 124
ed2e7aef2a3e
permissions
-rw-r--r--

proper file extensions for JSP fragments

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 <%@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@86 32 <c:set var="issue" scope="page" value="${viewmodel.issue}" />
universe@75 33
universe@78 34 <form action="./projects/issues/commit" method="post">
universe@75 35 <table class="formtable">
universe@75 36 <colgroup>
universe@75 37 <col>
universe@75 38 <col style="width: 75ch">
universe@75 39 </colgroup>
universe@75 40 <tbody>
universe@113 41 <c:if test="${viewmodel.issue.id ge 0}">
universe@75 42 <tr>
universe@108 43 <th><fmt:message key="issue.id"/></th>
universe@108 44 <td>${issue.id}</td>
universe@108 45 </tr>
universe@113 46 </c:if>
universe@108 47 <tr>
universe@82 48 <th><fmt:message key="issue.project"/></th>
universe@76 49 <td>
universe@86 50 <c:choose>
universe@86 51 <c:when test="${not empty issue.project}">
universe@86 52 <c:out value="${issue.project.name}" />
universe@86 53 <input type="hidden" name="pid" value="${issue.project.id}" />
universe@86 54 </c:when>
universe@86 55 <c:otherwise>
universe@86 56 <select name="pid" required>
universe@86 57 <c:forEach var="project" items="${viewmodel.projects}">
universe@86 58 <option value="${project.id}">
universe@86 59 <c:out value="${project.name}" />
universe@86 60 </option>
universe@86 61 </c:forEach>
universe@86 62 </select>
universe@86 63 </c:otherwise>
universe@86 64 </c:choose>
universe@76 65 </td>
universe@76 66 </tr>
universe@76 67 <tr>
universe@103 68 <th><fmt:message key="issue.created"/></th>
universe@103 69 <td><fmt:formatDate value="${issue.created}" /></td>
universe@103 70 </tr>
universe@103 71 <tr>
universe@103 72 <th><fmt:message key="issue.updated"/></th>
universe@103 73 <td><fmt:formatDate value="${issue.updated}" /></td>
universe@103 74 </tr>
universe@103 75 <tr>
universe@82 76 <th><fmt:message key="issue.category"/></th>
universe@75 77 <td>
universe@75 78 <select name="category">
universe@86 79 <c:forEach var="category" items="${viewmodel.issueCategory}">
universe@75 80 <option
universe@75 81 <c:if test="${category eq issue.category}">selected</c:if>
universe@75 82 value="${category}">
universe@75 83 <fmt:message key="issue.category.${category}" />
universe@75 84 </option>
universe@75 85 </c:forEach>
universe@75 86 </select>
universe@75 87 </td>
universe@75 88 </tr>
universe@75 89 <tr>
universe@82 90 <th><fmt:message key="issue.status"/></th>
universe@75 91 <td>
universe@75 92 <select name="status">
universe@86 93 <c:forEach var="status" items="${viewmodel.issueStatus}">
universe@75 94 <option
universe@75 95 <c:if test="${status eq issue.status}">selected</c:if>
universe@75 96 value="${status}">
universe@75 97 <fmt:message key="issue.status.${status}" />
universe@75 98 </option>
universe@75 99 </c:forEach>
universe@75 100 </select>
universe@75 101 </td>
universe@75 102 </tr>
universe@75 103 <tr>
universe@82 104 <th><fmt:message key="issue.subject"/></th>
universe@85 105 <td><input name="subject" type="text" maxlength="200" required value="<c:out value="${issue.subject}"/>" /></td>
universe@75 106 </tr>
universe@75 107 <tr>
universe@82 108 <th class="vtop"><fmt:message key="issue.description"/></th>
universe@75 109 <td>
universe@86 110 <textarea name="description" rows="10"><c:out value="${issue.description}"/></textarea>
universe@75 111 </td>
universe@75 112 </tr>
universe@75 113 <tr>
universe@82 114 <th><fmt:message key="issue.assignee"/></th>
universe@75 115 <td>
universe@75 116 <select name="assignee">
universe@75 117 <option value="-1"><fmt:message key="placeholder.null-assignee"/></option>
universe@86 118 <c:forEach var="user" items="${viewmodel.users}">
universe@75 119 <option
universe@75 120 <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if>
universe@75 121 value="${user.id}"><c:out value="${user.displayname}"/></option>
universe@75 122 </c:forEach>
universe@75 123 </select>
universe@75 124 </td>
universe@75 125 </tr>
universe@83 126 <c:if test="${issue.project.id ge 0}">
universe@75 127 <tr>
universe@83 128 <th class="vtop"><fmt:message key="issue.affected-versions"/></th>
universe@83 129 <td>
universe@83 130 <c:set var="fieldname" value="affected"/>
universe@90 131 <c:set var="selectionList" value="${viewmodel.versionsRecent}"/>
universe@83 132 <c:set var="data" value="${issue.affectedVersions}" />
universe@115 133 <%@include file="../jspf/version-list.jspf"%>
universe@83 134 </td>
universe@75 135 </tr>
universe@75 136 <tr>
universe@83 137 <th class="vtop"><fmt:message key="issue.resolved-versions"/></th>
universe@83 138 <td>
universe@83 139 <c:set var="fieldname" value="resolved"/>
universe@90 140 <c:set var="selectionList" value="${viewmodel.versionsUpcoming}"/>
universe@83 141 <c:set var="data" value="${issue.resolvedVersions}" />
universe@115 142 <%@include file="../jspf/version-list.jspf"%>
universe@83 143 </td>
universe@75 144 </tr>
universe@83 145 </c:if>
universe@75 146 <tr>
universe@82 147 <th><fmt:message key="issue.eta"/></th>
universe@75 148 <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
universe@75 149 </tr>
universe@75 150 </tbody>
universe@75 151 <tfoot>
universe@75 152 <tr>
universe@75 153 <td colspan="2">
universe@75 154 <input type="hidden" name="id" value="${issue.id}"/>
universe@76 155 <c:choose>
universe@86 156 <c:when test="${not empty issue.project}">
universe@99 157 <c:set var="cancelUrl">./projects/view?pid=${issue.project.id}</c:set>
universe@76 158 </c:when>
universe@76 159 <c:otherwise>
universe@78 160 <c:set var="cancelUrl">./projects/</c:set>
universe@76 161 </c:otherwise>
universe@76 162 </c:choose>
universe@76 163 <a href="${cancelUrl}" class="button">
universe@75 164 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
universe@75 165 </a>
universe@75 166 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
universe@75 167 </td>
universe@75 168 </tr>
universe@75 169 </tfoot>
universe@75 170 </table>
universe@75 171 </form>

mercurial