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

changeset 76
82f71fb1758a
parent 75
33b6843fdf8a
child 78
bb4c52bf3439
equal deleted inserted replaced
75:33b6843fdf8a 76:82f71fb1758a
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 33
34 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" />
34 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/> 35 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/>
35 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> 36 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/>
36 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> 37 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/>
37 <jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/>
38 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> 38 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/>
39 39
40 <form action="./${moduleInfo.modulePath}/issues/commit" method="post"> 40 <form action="./${moduleInfo.modulePath}/issues/commit" method="post">
41 <table class="formtable"> 41 <table class="formtable">
42 <colgroup> 42 <colgroup>
43 <col> 43 <col>
44 <col style="width: 75ch"> 44 <col style="width: 75ch">
45 </colgroup> 45 </colgroup>
46 <tbody> 46 <tbody>
47 <tr>
48 <th><fmt:message key="thead.issue.project"/></th>
49 <td>
50 <select name="pid" required>
51 <c:forEach var="project" items="${projects}">
52 <option value="${project.id}" <c:if test="${project eq issue.project}">selected</c:if> >
53 <c:out value="${project.name}" />
54 </option>
55 </c:forEach>
56 </select>
57 </td>
58 </tr>
47 <tr> 59 <tr>
48 <th><fmt:message key="thead.issue.category"/></th> 60 <th><fmt:message key="thead.issue.category"/></th>
49 <td> 61 <td>
50 <select name="category"> 62 <select name="category">
51 <c:forEach var="category" items="${issueCategoryEnum}"> 63 <c:forEach var="category" items="${issueCategoryEnum}">
149 </tbody> 161 </tbody>
150 <tfoot> 162 <tfoot>
151 <tr> 163 <tr>
152 <td colspan="2"> 164 <td colspan="2">
153 <input type="hidden" name="id" value="${issue.id}"/> 165 <input type="hidden" name="id" value="${issue.id}"/>
154 <a href="./${moduleInfo.modulePath}/view?pid=${issue.project.id}" class="button"> 166 <c:choose>
167 <c:when test="${not empty issue.project and issue.project.id ge 0}">
168 <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${issue.project.id}</c:set>
169 </c:when>
170 <c:otherwise>
171 <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set>
172 </c:otherwise>
173 </c:choose>
174 <a href="${cancelUrl}" class="button">
155 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 175 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
156 </a> 176 </a>
157 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button> 177 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
158 </td> 178 </td>
159 </tr> 179 </tr>

mercurial