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

Sat, 30 May 2020 18:05:06 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 May 2020 18:05:06 +0200
changeset 83
24a3596b8f98
parent 82
4ec7f2600c83
child 84
5407d4ea0611
permissions
-rw-r--r--

adds version selection in issue editor

universe@51 1 <%--
universe@51 2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@51 3
universe@51 4 Copyright 2018 Mike Becker. All rights reserved.
universe@51 5
universe@51 6 Redistribution and use in source and binary forms, with or without
universe@51 7 modification, are permitted provided that the following conditions are met:
universe@51 8
universe@51 9 1. Redistributions of source code must retain the above copyright
universe@51 10 notice, this list of conditions and the following disclaimer.
universe@51 11
universe@51 12 2. Redistributions in binary form must reproduce the above copyright
universe@51 13 notice, this list of conditions and the following disclaimer in the
universe@51 14 documentation and/or other materials provided with the distribution.
universe@51 15
universe@51 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@51 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@51 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
universe@51 19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
universe@51 20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
universe@51 21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
universe@51 22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
universe@51 23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
universe@51 24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
universe@51 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
universe@51 26 --%>
universe@51 27 <%@page pageEncoding="UTF-8" %>
universe@51 28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
universe@51 29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
universe@51 30
universe@76 31 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" />
universe@59 32 <jsp:useBean id="version" type="de.uapcore.lightpit.entities.Version" scope="request"/>
universe@72 33 <jsp:useBean id="versionStatusEnum" type="de.uapcore.lightpit.entities.VersionStatus[]" scope="request"/>
universe@51 34
universe@80 35 <jsp:useBean id="statsAffected" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/>
universe@80 36 <jsp:useBean id="statsScheduled" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/>
universe@80 37 <jsp:useBean id="statsResolved" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/>
universe@80 38 <jsp:useBean id="statsHideZeros" type="java.lang.Boolean" scope="request"/>
universe@80 39
universe@78 40 <form action="./projects/versions/commit" method="post">
universe@51 41 <table class="formtable" style="width: 35ch">
universe@51 42 <colgroup>
universe@51 43 <col>
universe@51 44 <col style="width: 100%">
universe@51 45 </colgroup>
universe@51 46 <tbody>
universe@51 47 <tr>
universe@82 48 <th><fmt:message key="version.project"/></th>
universe@76 49 <td>
universe@83 50 <c:if test="${version.project.id ge 0}">
universe@83 51 <c:out value="${version.project.name}" />
universe@83 52 <input type="hidden" name="pid" value="${version.project.id}" />
universe@83 53 </c:if>
universe@83 54 <c:if test="${empty version.project or version.project.id lt 0}">
universe@83 55 <select name="pid" required>
universe@83 56 <c:forEach var="project" items="${projects}">
universe@83 57 <option value="${project.id}">
universe@83 58 <c:out value="${project.name}" />
universe@83 59 </option>
universe@83 60 </c:forEach>
universe@83 61 </select>
universe@83 62 </c:if>
universe@76 63 </td>
universe@76 64 </tr>
universe@76 65 <tr>
universe@82 66 <th><fmt:message key="version.name"/></th>
universe@75 67 <td><input name="name" type="text" maxlength="20" required value="<c:out value="${version.name}"/>" /></td>
universe@51 68 </tr>
universe@51 69 <tr>
universe@82 70 <th><fmt:message key="version.status"/></th>
universe@59 71 <td>
universe@59 72 <select name="status" required>
universe@59 73 <c:forEach var="elem" items="${versionStatusEnum}">
universe@72 74 <option
universe@72 75 <c:if test="${elem eq version.status}">selected</c:if> value="${elem}"><fmt:message
universe@72 76 key="version.status.${elem}"/></option>
universe@59 77 </c:forEach>
universe@59 78 </select>
universe@59 79 </td>
universe@51 80 </tr>
universe@59 81 <tr title="<fmt:message key="tooltip.ordinal" />">
universe@82 82 <th><fmt:message key="version.ordinal"/></th>
universe@59 83 <td>
universe@72 84 <input name="ordinal" type="number" min="0" value="${version.ordinal}"/>
universe@59 85 </td>
universe@51 86 </tr>
universe@51 87 </tbody>
universe@51 88 <tfoot>
universe@51 89 <tr>
universe@51 90 <td colspan="2">
universe@72 91 <input type="hidden" name="id" value="${version.id}"/>
universe@76 92 <c:choose>
universe@76 93 <c:when test="${not empty version.project and version.project.id ge 0}">
universe@78 94 <c:set var="cancelUrl">./projects/view?pid=${version.project.id}</c:set>
universe@76 95 </c:when>
universe@76 96 <c:otherwise>
universe@78 97 <c:set var="cancelUrl">./projects/</c:set>
universe@76 98 </c:otherwise>
universe@76 99 </c:choose>
universe@76 100 <a href="${cancelUrl}" class="button">
universe@75 101 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
universe@75 102 </a>
universe@72 103 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
universe@51 104 </td>
universe@51 105 </tr>
universe@51 106 </tfoot>
universe@51 107 </table>
universe@51 108 </form>
universe@80 109
universe@80 110 <h3><fmt:message key="version.statistics.affected" /></h3>
universe@80 111 <c:set var="stats" value="${statsAffected}" />
universe@80 112 <%@include file="../jspf/version-stats.jsp" %>
universe@80 113
universe@80 114 <h3><fmt:message key="version.statistics.scheduled" /></h3>
universe@80 115 <c:set var="stats" value="${statsScheduled}" />
universe@80 116 <%@include file="../jspf/version-stats.jsp" %>
universe@80 117
universe@80 118 <h3><fmt:message key="version.statistics.resolved" /></h3>
universe@80 119 <c:set var="stats" value="${statsResolved}" />
universe@80 120 <%@include file="../jspf/version-stats.jsp" %>

mercurial