--- a/src/main/webapp/WEB-INF/jsp/project-navmenu.jsp Sat Oct 17 15:21:56 2020 +0200 +++ b/src/main/webapp/WEB-INF/jsp/project-navmenu.jsp Sat Oct 17 19:56:50 2020 +0200 @@ -24,7 +24,7 @@ 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" %> +<%@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" %> @@ -33,20 +33,27 @@ <c:forEach var="projectInfo" items="${viewmodel.projectList}"> <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" /> <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> > - <a href="projects/${projectInfo.project.id}/versions/"> + <a href="projects/${projectInfo.project.node}/versions/"> <c:out value="${projectInfo.project.name}"/> </a> </div> <c:if test="${isActive}"> <!-- VERSIONS --> - <div class="menuEntry level-1"> - <a href="projects/${projectInfo.project.id}/versions/"> + <c:set var="componentNode" value="${not empty viewmodel.componentFilter ? viewmodel.componentFilter.node : 'all-components'}"/> + <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_VERSIONS}">data-active</c:if> > + <a href="projects/${projectInfo.project.node}/versions/"> <fmt:message key="navmenu.versions"/> </a> </div> - <div class="menuEntry level-2"> + <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.ALL_VERSIONS}">data-active</c:if>> <div class="navmenu-icon" style="background: black"></div> - <a href="projects/${projectInfo.project.id}/versions/unassigned"> + <a href="projects/${projectInfo.project.node}/${componentNode}/all-versions/issues/"> + <fmt:message key="navmenu.all" /> + </a> + </div> + <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.NO_VERSION}">data-active</c:if>> + <div class="navmenu-icon" style="background: black"></div> + <a href="projects/${projectInfo.project.node}/${componentNode}/no-version/issues/"> <fmt:message key="navmenu.unassigned" /> </a> </div> @@ -55,39 +62,38 @@ <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> title="<fmt:message key="version.status.${version.status}" />"> <div class="navmenu-icon version-${version.status}"></div> - <a href="projects/${projectInfo.project.id}/versions/${version.id}"> + <a href="projects/${projectInfo.project.node}/${componentNode}/${version.node}/issues/"> <c:out value="${version.name}"/> </a> </div> </c:forEach> - <%-- COMPONENTS - TODO: find a way to combine version and component into one URL - <div class="menuEntry level-1"> - <a href="projects/${projectInfo.project.id}/components/"> + <!-- COMPONENTS --> + <c:set var="versionNode" value="${not empty viewmodel.versionFilter ? viewmodel.versionFilter.node : 'all-versions'}"/> + <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_COMPONENTS}">data-active</c:if>> + <a href="projects/${projectInfo.project.node}/components/"> <fmt:message key="navmenu.components"/> </a> </div> - <div class="menuEntry level-2"> + <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.ALL_COMPONENTS}">data-active</c:if>> <div class="navmenu-icon" style="background: black"></div> - <a href="projects/${projectInfo.project.id}/components/"> + <a href="projects/${projectInfo.project.node}/all-components/${versionNode}/issues/"> <fmt:message key="navmenu.all" /> </a> </div> - <div class="menuEntry level-2"> + <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.NO_COMPONENT}">data-active</c:if>> <div class="navmenu-icon" style="background: black"></div> - <a href="projects/${projectInfo.project.id}/components/unassigned"> + <a href="projects/${projectInfo.project.node}/no-component/${versionNode}/issues/"> <fmt:message key="navmenu.unassigned" /> </a> </div> <c:forEach var="component" items="${viewmodel.projectInfo.components}"> <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" /> - <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> > + <div class="menuEntry level-2" <c:if test="${isComponentActive}">data-active</c:if> > <div class="navmenu-icon" style="background-color: ${component.color}"></div> - <a href="projects/view?pid=${projectInfo.project.id}&cid=${component.id}"> + <a href="projects/${projectInfo.project.node}/${component.node}/${versionNode}/issues/"> <c:out value="${component.name}"/> </a> </div> </c:forEach> - --%> </c:if> </c:forEach>