--- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Sat Jan 23 14:47:59 2021 +0100 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Fri Apr 02 11:59:14 2021 +0200 @@ -24,37 +24,28 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --%> -<%@page pageEncoding="UTF-8" import="de.uapcore.lightpit.viewmodel.ProjectView" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectDetailsView" scope="request" /> +<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectDetails" scope="request" /> <c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/> -<c:set var="component" scope="page" value="${viewmodel.componentFilter}"/> +<c:set var="component" scope="page" value="${viewmodel.component}"/> +<c:set var="version" scope="page" value="${viewmodel.version}"/> <%@include file="../jspf/project-header.jspf"%> <div id="tool-area"> - <c:remove var="createIssueParams"/> - <c:if test="${viewmodel.versionFilter.id gt 0}"> - <c:set var="createIssueParams">&vid=${viewmodel.versionFilter.id}</c:set> - </c:if> - <c:if test="${viewmodel.componentFilter.id gt 0}"> - <c:set var="createIssueParams">${createIssueParams}&cid=${viewmodel.componentFilter.id}</c:set> - </c:if> - <c:if test="${not empty createIssueParams}"> - <c:set var="createIssueParams">?${fn:substringAfter(createIssueParams, "&")}</c:set> + <a href="./projects/${project.node}/issues/${empty version ? '-' : version.node}/${empty component ? '-' : component.node}/-/create" class="button"><fmt:message key="button.issue.create"/></a> + <a href="./projects/${project.node}/edit" class="button"><fmt:message key="button.project.edit"/></a> + <c:if test="${not empty version}"> + <a href="./projects/${project.node}/versions/${version.node}/edit" class="button"><fmt:message key="button.version.edit"/></a> </c:if> - <a href="./projects/${project.node}/create-issue${createIssueParams}" class="button"><fmt:message key="button.issue.create"/></a> - <c:if test="${viewmodel.versionFilter.id gt 0}"> - <a href="./projects/${project.node}/versions/${viewmodel.versionFilter.node}/edit" class="button"><fmt:message key="button.version.edit"/></a> + <a href="./projects/${project.node}/versions/-/create" class="button"><fmt:message key="button.version.create"/></a> + <c:if test="${not empty component}"> + <a href="./projects/${project.node}/components/${component.node}/edit" class="button"><fmt:message key="button.component.edit"/></a> </c:if> - <a href="./projects/${project.node}/create-version" class="button"><fmt:message key="button.version.create"/></a> - <c:if test="${viewmodel.componentFilter.id gt 0}"> - <a href="./projects/${project.node}/components/${viewmodel.componentFilter.node}/edit" class="button"><fmt:message key="button.component.edit"/></a> - </c:if> - <a href="./projects/${project.node}/create-component" class="button"><fmt:message key="button.component.create"/></a> + <a href="./projects/${project.node}/components/-/create" class="button"><fmt:message key="button.component.create"/></a> </div> <h2><fmt:message key="progress" /></h2> @@ -63,24 +54,19 @@ <%@include file="../jspf/issue-summary.jspf"%> <c:choose> - <c:when test="${viewmodel.versionFilter eq ProjectView.NO_VERSION or viewmodel.versionFilter eq ProjectView.ALL_VERSIONS}"> + <c:when test="${empty viewmodel.versionInfo}"> <h2> - <c:if test="${viewmodel.versionFilter eq ProjectView.NO_VERSION}"> - <fmt:message key="issue.without-version" /> - </c:if> - <c:if test="${viewmodel.versionFilter ne ProjectView.NO_VERSION}"> - <fmt:message key="issues" /> - </c:if> + <fmt:message key="issues" /> </h2> - <c:set var="summary" value="${viewmodel.projectDetails.issueSummary}"/> - <c:set var="issues" value="${viewmodel.projectDetails.issues}"/> + <c:set var="summary" value="${viewmodel.issueSummary}"/> + <c:set var="issues" value="${viewmodel.issues}"/> <%@include file="../jspf/issue-summary.jspf"%> <c:if test="${not empty issues}"> <%@include file="../jspf/issue-list.jspf"%> </c:if> </c:when> <c:otherwise> - <c:set var="versionInfo" value="${viewmodel.projectDetails.versionInfo}"/> + <c:set var="versionInfo" value="${viewmodel.versionInfo}"/> <h2> <fmt:message key="version" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/> </h2>