26 --%> |
26 --%> |
27 <%@page pageEncoding="UTF-8" %> |
27 <%@page pageEncoding="UTF-8" %> |
28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
30 |
30 |
31 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" /> |
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.VersionEditView" scope="request" /> |
32 <jsp:useBean id="version" type="de.uapcore.lightpit.entities.Version" scope="request"/> |
32 <c:set var="version" scope="page" value="${viewmodel.version}"/> |
33 <jsp:useBean id="versionStatusEnum" type="de.uapcore.lightpit.entities.VersionStatus[]" scope="request"/> |
|
34 |
|
35 <jsp:useBean id="statsAffected" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/> |
|
36 <jsp:useBean id="statsScheduled" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/> |
|
37 <jsp:useBean id="statsResolved" type="de.uapcore.lightpit.entities.VersionStatistics" scope="request"/> |
|
38 <jsp:useBean id="statsHideZeros" type="java.lang.Boolean" scope="request"/> |
|
39 |
33 |
40 <form action="./projects/versions/commit" method="post"> |
34 <form action="./projects/versions/commit" method="post"> |
41 <table class="formtable" style="width: 35ch"> |
35 <table class="formtable" style="width: 35ch"> |
42 <colgroup> |
36 <colgroup> |
43 <col> |
37 <col> |
45 </colgroup> |
39 </colgroup> |
46 <tbody> |
40 <tbody> |
47 <tr> |
41 <tr> |
48 <th><fmt:message key="version.project"/></th> |
42 <th><fmt:message key="version.project"/></th> |
49 <td> |
43 <td> |
50 <c:if test="${version.project.id ge 0}"> |
44 <c:choose> |
51 <c:out value="${version.project.name}" /> |
45 <c:when test="${not empty version.project}"> |
52 <input type="hidden" name="pid" value="${version.project.id}" /> |
46 <c:out value="${version.project.name}" /> |
53 </c:if> |
47 <input type="hidden" name="pid" value="${version.project.id}" /> |
54 <c:if test="${empty version.project or version.project.id lt 0}"> |
48 </c:when> |
55 <select name="pid" required> |
49 <c:otherwise> |
56 <c:forEach var="project" items="${projects}"> |
50 <select name="pid" required> |
57 <option value="${project.id}"> |
51 <c:forEach var="project" items="${viewmodel.projects}"> |
58 <c:out value="${project.name}" /> |
52 <option value="${project.id}"> |
59 </option> |
53 <c:out value="${project.name}" /> |
60 </c:forEach> |
54 </option> |
61 </select> |
55 </c:forEach> |
62 </c:if> |
56 </select> |
|
57 </c:otherwise> |
|
58 </c:choose> |
63 </td> |
59 </td> |
64 </tr> |
60 </tr> |
65 <tr> |
61 <tr> |
66 <th><fmt:message key="version.name"/></th> |
62 <th><fmt:message key="version.name"/></th> |
67 <td><input name="name" type="text" maxlength="20" required value="<c:out value="${version.name}"/>" /></td> |
63 <td><input name="name" type="text" maxlength="20" required value="<c:out value="${version.name}"/>" /></td> |
68 </tr> |
64 </tr> |
69 <tr> |
65 <tr> |
70 <th><fmt:message key="version.status"/></th> |
66 <th><fmt:message key="version.status"/></th> |
71 <td> |
67 <td> |
72 <select name="status" required> |
68 <select name="status" required> |
73 <c:forEach var="elem" items="${versionStatusEnum}"> |
69 <c:forEach var="elem" items="${viewmodel.versionStatus}"> |
74 <option |
70 <option |
75 <c:if test="${elem eq version.status}">selected</c:if> value="${elem}"><fmt:message |
71 <c:if test="${elem eq version.status}">selected</c:if> value="${elem}"><fmt:message |
76 key="version.status.${elem}"/></option> |
72 key="version.status.${elem}"/></option> |
77 </c:forEach> |
73 </c:forEach> |
78 </select> |
74 </select> |