Commit e29e4bfe authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1296: Show hierarchy on recursive hierarchical elements

Task-Url: https://pm.winseda.de/issues/1296
parent 2050499c
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<%@page import="java.util.List"%> <%@page import="java.util.List"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<c:set var="hierarchyElementTitle" scope="request" value="" /> <c:set var="hierarchyElementTitle" scope="request" value="" />
<c:choose> <c:choose>
...@@ -18,13 +19,15 @@ ...@@ -18,13 +19,15 @@
</c:choose> </c:choose>
<c:if test="${fn:length(hierarchyElementTitle)==0}"> <c:if test="${fn:length(hierarchyElementTitle)==0}">
<c:set var="hierarchyElementTitle" scope="request" value="~no title" /> <c:set var="hierarchyElementTitle" scope="request">
<s:message code="~eu.dariah.de.minfba.search.view.result.no_title" />
</c:set>
</c:if> </c:if>
<li class="item-detail-hierarchy-element"> <li class="${hierarchyElement.id==item.id ? 'item-detail-hierarchy-element-selected' : 'item-detail-hierarchy-element'}">
<c:choose> <c:choose>
<c:when test="${hierarchyElement.id==item.id}"> <c:when test="${hierarchyElement.id==item.id}">
<span class="item-detail-hierarchy-element-selected">${hierarchyElementTitle}</span> <i class="fas fa-angle-right"></i> ${hierarchyElementTitle}
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<a href="/item/${type}/${hierarchyElement.id}/">${hierarchyElementTitle}</a> <a href="/item/${type}/${hierarchyElement.id}/">${hierarchyElementTitle}</a>
...@@ -49,7 +52,7 @@ ...@@ -49,7 +52,7 @@
</c:forEach> </c:forEach>
<c:if test="${placeholderElements}"> <c:if test="${placeholderElements}">
<li class="item-detail-hierarchy-placeholder">Unterelemente gesamt: ${fn:length(e.value)}</li> <li class="item-detail-hierarchy-placeholder">... ${fn:length(e.value)} <s:message code="~eu.dariah.de.minfba.search.view.result.subelements_total" /></li>
</c:if> </c:if>
</c:if> </c:if>
</c:forEach> </c:forEach>
......
...@@ -12,6 +12,17 @@ ...@@ -12,6 +12,17 @@
<div class="row"> <div class="row">
<div class="col-12 ${fn:length(images)>0 ? 'col-md-7 col-lg-8 col-xl-9' : ''}"> <div class="col-12 ${fn:length(images)>0 ? 'col-md-7 col-lg-8 col-xl-9' : ''}">
<h3 id="item-detail-collection">${collectionName}</h3> <h3 id="item-detail-collection">${collectionName}</h3>
<c:if test="${rootParents!=null && fn:length(rootParents)>0}">
<c:forEach items="${rootParents}" var="hierarchyElement">
<ul class="item-detail-hierarchy">
<%@ include file="hierarchyElement.jsp" %>
</c:forEach>
<c:forEach items="${rootParents}" var="hierarchyElement">
</ul>
</c:forEach>
</c:if>
<h1 id="item-detail-resource"> <h1 id="item-detail-resource">
<c:choose> <c:choose>
<c:when test="${titles==null || fn:length(images)==0}"> <c:when test="${titles==null || fn:length(images)==0}">
...@@ -100,16 +111,7 @@ ...@@ -100,16 +111,7 @@
<div class="row"> <div class="row">
<div class="col-12 col-md-7 col-lg-8 col-xl-9"> <div class="col-12 col-md-7 col-lg-8 col-xl-9">
<c:if test="${rootParents!=null && fn:length(rootParents)>0}">
<h2>~Hierarchy</h2>
<c:forEach items="${rootParents}" var="hierarchyElement">
<ul class="item-detail-hierarchy">
<%@ include file="hierarchyElement.jsp" %>
</c:forEach>
<c:forEach items="${rootParents}" var="hierarchyElement">
</ul>
</c:forEach>
</c:if>
<h2><s:message code="~eu.dariah.de.minfba.search.view.item.additional_data" /></h2> <h2><s:message code="~eu.dariah.de.minfba.search.view.item.additional_data" /></h2>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment