hide deprecated versions from navmenu unless they are selected - fixes #4

Fri, 23 Oct 2020 10:19:46 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 23 Oct 2020 10:19:46 +0200
changeset 140
ac35e58efa44
parent 139
6abc75d213ef
child 141
8160dfc4dbc3

hide deprecated versions from navmenu unless they are selected - fixes #4

pom.xml file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/jsp/project-navmenu.jsp file | annotate | diff | comparison | revisions
--- a/pom.xml	Thu Oct 22 13:06:46 2020 +0200
+++ b/pom.xml	Fri Oct 23 10:19:46 2020 +0200
@@ -4,7 +4,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>de.uapcore</groupId>
     <artifactId>lightpit</artifactId>
-    <version>0.4-SNAPSHOT</version>
+    <version>0.5-SNAPSHOT</version>
     <packaging>war</packaging>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
--- a/src/main/webapp/WEB-INF/jsp/project-navmenu.jsp	Thu Oct 22 13:06:46 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/project-navmenu.jsp	Fri Oct 23 10:19:46 2020 +0200
@@ -24,7 +24,10 @@
 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" %>
+<%@page pageEncoding="UTF-8"
+        import="de.uapcore.lightpit.viewmodel.ProjectView"
+        import="de.uapcore.lightpit.entities.VersionStatus"
+%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 
@@ -59,6 +62,7 @@
         </div>
         <c:forEach var="version" items="${viewmodel.projectInfo.versions}">
             <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" />
+            <c:if test="${version.status ne VersionStatus.Deprecated or isVersionActive}">
             <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>
@@ -66,6 +70,7 @@
                     <c:out value="${version.name}"/>
                 </a>
             </div>
+            </c:if>
         </c:forEach>
         <!-- COMPONENTS -->
         <c:set var="versionNode" value="${not empty viewmodel.versionFilter ? viewmodel.versionFilter.node : 'all-versions'}"/>

mercurial