--- a/src/main/webapp/WEB-INF/jsp/issue-view.jsp Sat Jan 23 14:47:59 2021 +0100 +++ b/src/main/webapp/WEB-INF/jsp/issue-view.jsp Fri Apr 02 11:59:14 2021 +0200 @@ -29,8 +29,14 @@ <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueDetailView" scope="request"/> + +<c:set var="project" scope="page" value="${viewmodel.project}"/> +<c:set var="component" scope="page" value="${viewmodel.component}"/> +<c:set var="version" scope="page" value="${viewmodel.version}"/> <c:set var="issue" scope="page" value="${viewmodel.issue}" /> +<c:set var="issuesHref" scope="page" value="./projects/${project.node}/issues/${empty version ? '-' : version.node }/${empty component ? '-' : component.node}/"/> + <table class="formtable fullwidth"> <colgroup> <col> @@ -137,11 +143,10 @@ <tfoot> <tr> <td colspan="2"> - <%-- TODO: fix #14 --%> - <a href="./projects/${issue.project.node}/all-components/all-versions/issues/" class="button"> + <a href="${issuesHref}" class="button"> <fmt:message key="button.cancel"/> </a> - <a href="./projects/${issue.project.node}/issues/${issue.id}/edit" class="button submit"> + <a href="${issuesHref}${issue.id}/edit" class="button submit"> <fmt:message key="button.issue.edit"/> </a> </td> @@ -152,7 +157,7 @@ <hr class="comments-separator"/> <h2><fmt:message key="issue.comments"/></h2> <c:if test="${viewmodel.issue.id ge 0}"> -<form id="comment-form" action="./projects/commit-issue-comment" method="post"> +<form id="comment-form" action="${issuesHref}${issue.id}/comment" method="post"> <table class="formtable fullwidth"> <tbody> <tr> @@ -162,7 +167,6 @@ <tfoot> <tr> <td> - <input type="hidden" name="issueid" value="${issue.id}"/> <button type="submit"><fmt:message key="button.comment"/></button> </td> </tr>