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

changeset 76
82f71fb1758a
parent 75
33b6843fdf8a
child 78
bb4c52bf3439
equal deleted inserted replaced
75:33b6843fdf8a 76:82f71fb1758a
28 <%@page import="de.uapcore.lightpit.Constants" %> 28 <%@page import="de.uapcore.lightpit.Constants" %>
29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
31 31
32 <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 32 <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/>
33 <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/>
34 33
34 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" />
35 <jsp:useBean id="version" type="de.uapcore.lightpit.entities.Version" scope="request"/> 35 <jsp:useBean id="version" type="de.uapcore.lightpit.entities.Version" scope="request"/>
36 <jsp:useBean id="versionStatusEnum" type="de.uapcore.lightpit.entities.VersionStatus[]" scope="request"/> 36 <jsp:useBean id="versionStatusEnum" type="de.uapcore.lightpit.entities.VersionStatus[]" scope="request"/>
37 37
38 <form action="./${moduleInfo.modulePath}/versions/commit" method="post"> 38 <form action="./${moduleInfo.modulePath}/versions/commit" method="post">
39 <table class="formtable" style="width: 35ch"> 39 <table class="formtable" style="width: 35ch">
40 <colgroup> 40 <colgroup>
41 <col> 41 <col>
42 <col style="width: 100%"> 42 <col style="width: 100%">
43 </colgroup> 43 </colgroup>
44 <tbody> 44 <tbody>
45 <tr>
46 <th><fmt:message key="thead.version.project"/></th>
47 <td>
48 <select name="pid" required>
49 <c:forEach var="project" items="${projects}">
50 <option value="${project.id}" <c:if test="${project eq version.project}">selected</c:if> >
51 <c:out value="${project.name}" />
52 </option>
53 </c:forEach>
54 </select>
55 </td>
56 </tr>
45 <tr> 57 <tr>
46 <th><fmt:message key="thead.version.name"/></th> 58 <th><fmt:message key="thead.version.name"/></th>
47 <td><input name="name" type="text" maxlength="20" required value="<c:out value="${version.name}"/>" /></td> 59 <td><input name="name" type="text" maxlength="20" required value="<c:out value="${version.name}"/>" /></td>
48 </tr> 60 </tr>
49 <tr> 61 <tr>
67 </tbody> 79 </tbody>
68 <tfoot> 80 <tfoot>
69 <tr> 81 <tr>
70 <td colspan="2"> 82 <td colspan="2">
71 <input type="hidden" name="id" value="${version.id}"/> 83 <input type="hidden" name="id" value="${version.id}"/>
72 <a href="./${moduleInfo.modulePath}/view?pid=${version.project.id}" class="button"> 84 <c:choose>
85 <c:when test="${not empty version.project and version.project.id ge 0}">
86 <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${version.project.id}</c:set>
87 </c:when>
88 <c:otherwise>
89 <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set>
90 </c:otherwise>
91 </c:choose>
92 <a href="${cancelUrl}" class="button">
73 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 93 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
74 </a> 94 </a>
75 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button> 95 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
76 </td> 96 </td>
77 </tr> 97 </tr>

mercurial