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="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueEditView" scope="request"/> |
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueEditView" scope="request"/> |
|
32 |
32 <c:set var="issue" scope="page" value="${viewmodel.issue}" /> |
33 <c:set var="issue" scope="page" value="${viewmodel.issue}" /> |
33 |
34 <c:set var="project" scope="page" value="${viewmodel.project}"/> |
34 <%-- TODO: change to ./issues/commit --%> |
35 <c:set var="component" scope="page" value="${viewmodel.component}"/> |
35 <form action="./projects/commit-issue" method="post"> |
36 <c:set var="version" scope="page" value="${viewmodel.version}"/> |
|
37 |
|
38 <c:set var="issuesHref" value="./projects/${project.node}/issues/${empty version ? '-' : version.node }/${empty component ? '-' : component.node}/"/> |
|
39 |
|
40 <form action="${issuesHref}-/commit-issue" method="post"> |
36 <table class="formtable fullwidth"> |
41 <table class="formtable fullwidth"> |
37 <colgroup> |
42 <colgroup> |
38 <col> |
43 <col> |
39 <col style="width: 100%"> |
44 <col style="width: 100%"> |
40 </colgroup> |
45 </colgroup> |
47 </c:if> |
52 </c:if> |
48 <tr> |
53 <tr> |
49 <th><fmt:message key="project"/></th> |
54 <th><fmt:message key="project"/></th> |
50 <td> |
55 <td> |
51 <c:choose> |
56 <c:choose> |
52 <c:when test="${not empty issue.project}"> |
57 <c:when test="${issue.project.id ge 0}"> |
53 <c:out value="${issue.project.name}" /> |
58 <c:out value="${issue.project.name}" /> |
54 <input type="hidden" name="pid" value="${issue.project.id}" /> |
59 <input type="hidden" name="project" value="${issue.project.id}" /> |
55 </c:when> |
60 </c:when> |
56 <c:otherwise> |
61 <c:otherwise> |
57 <select name="pid" required> |
62 <select name="project" required> |
58 <c:forEach var="project" items="${viewmodel.projects}"> |
63 <c:forEach var="project" items="${viewmodel.projects}"> |
59 <option value="${project.id}"> |
64 <option value="${project.id}"> |
60 <c:out value="${project.name}" /> |
65 <c:out value="${project.name}" /> |
61 </option> |
66 </option> |
62 </c:forEach> |
67 </c:forEach> |
177 <td colspan="2"> |
182 <td colspan="2"> |
178 <input type="checkbox" id="create-another" name="create-another" <c:if test="${more}">checked</c:if> /> |
183 <input type="checkbox" id="create-another" name="create-another" <c:if test="${more}">checked</c:if> /> |
179 <label for="create-another"><fmt:message key="button.issue.create.another"/> </label> |
184 <label for="create-another"><fmt:message key="button.issue.create.another"/> </label> |
180 <input type="hidden" name="id" value="${issue.id}"/> |
185 <input type="hidden" name="id" value="${issue.id}"/> |
181 <c:if test="${issue.id ge 0}"> |
186 <c:if test="${issue.id ge 0}"> |
182 <a href="./projects/${issue.project.node}/issues/${issue.id}/view" class="button"> |
187 <a href="${issuesHref}${issue.id}" class="button"> |
183 <fmt:message key="button.cancel"/> |
188 <fmt:message key="button.cancel"/> |
184 </a> |
189 </a> |
185 </c:if> |
190 </c:if> |
186 <c:if test="${issue.id lt 0}"> |
191 <c:if test="${issue.id lt 0}"> |
187 <%-- TODO: fix #14 --%> |
192 <a href="${issuesHref}" class="button"> |
188 <a href="./projects/${issue.project.node}/all-components/all-versions/issues/" class="button"> |
|
189 <fmt:message key="button.cancel"/> |
193 <fmt:message key="button.cancel"/> |
190 </a> |
194 </a> |
191 </c:if> |
195 </c:if> |
192 <button type="submit"><fmt:message key="button.okay"/></button> |
196 <button type="submit"><fmt:message key="button.okay"/></button> |
193 </td> |
197 </td> |