Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-views
Commits
2050499c
Commit
2050499c
authored
May 20, 2019
by
Gradl, Tobias
Browse files
1296: Show hierarchy on recursive hierarchical elements
Task-Url:
https://pm.winseda.de/issues/1296
parent
1009130f
Changes
2
Hide whitespace changes
Inline
Side-by-side
item/hierarchyElement.jsp
0 → 100644
View file @
2050499c
<%@page
import=
"de.unibamberg.minf.processing.model.helper.ResourceHelper"
%>
<%@page
import=
"de.unibamberg.minf.processing.model.base.Resource"
%>
<%@page
import=
"java.util.List"
%>
<%@ taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%>
<%@ taglib
prefix=
"fn"
uri=
"http://java.sun.com/jsp/jstl/functions"
%>
<c:set
var=
"hierarchyElementTitle"
scope=
"request"
value=
""
/>
<c:choose>
<c:when
test=
"
${
idTitleMap
!=
null
&&
fn:
length
(
idTitleMap
)>
0
}
"
>
<c:forEach
items=
"
${
idTitleMap
}
"
var=
"e"
>
<c:if
test=
"
${
e
.
key
==
hierarchyElement
.
id
}
"
>
<c:forEach
items=
"
${
e
.
value
}
"
var=
"title"
>
<c:set
var=
"hierarchyElementTitle"
scope=
"request"
value=
"
${
hierarchyElementTitle
}
${fn:replace(title.value, newLineChar, ' ')}"
/>
</c:forEach>
</c:if>
</c:forEach>
</c:when>
</c:choose>
<c:if
test=
"
${
fn:
length
(
hierarchyElementTitle
)==
0
}
"
>
<c:set
var=
"hierarchyElementTitle"
scope=
"request"
value=
"~no title"
/>
</c:if>
<li
class=
"item-detail-hierarchy-element"
>
<c:choose>
<c:when
test=
"
${
hierarchyElement
.
id
==
item
.
id
}
"
>
<span
class=
"item-detail-hierarchy-element-selected"
>
${hierarchyElementTitle}
</span>
</c:when>
<c:otherwise>
<a
href=
"/item/${type}/${hierarchyElement.id}/"
>
${hierarchyElementTitle}
</a>
</c:otherwise>
</c:choose>
<c:if
test=
"
${
hierarchyElement
.
relatedElementsMap
!=
null
&&
fn:
length
(
hierarchyElement
.
relatedElementsMap
)>
0
}
"
>
<ul
class=
"item-detail-hierarchy"
>
<c:forEach
items=
"
${
hierarchyElement
.
relatedElementsMap
}
"
var=
"e"
>
<c:if
test=
"
${
e
.
key
==
'PARENT_OF'
}
"
>
<c:set
var=
"placeholderElements"
value=
"false"
/>
<c:forEach
items=
"
${
e
.
value
}
"
var=
"childElement"
>
<c:choose>
<c:when
test=
"
${
!
childElement
.
placeholder
}
"
>
<c:set
var=
"hierarchyElement"
value=
"
${
childElement
}
"
scope=
"request"
/>
<jsp:include
page=
"hierarchyElement.jsp"
/>
</c:when>
<c:otherwise>
<c:set
var=
"placeholderElements"
value=
"true"
/>
</c:otherwise>
</c:choose>
</c:forEach>
<c:if
test=
"
${
placeholderElements
}
"
>
<li
class=
"item-detail-hierarchy-placeholder"
>
Unterelemente gesamt: ${fn:length(e.value)}
</li>
</c:if>
</c:if>
</c:forEach>
</ul>
</c:if>
</li>
\ No newline at end of file
item/view.jsp
View file @
2050499c
...
...
@@ -100,6 +100,18 @@
<div
class=
"row"
>
<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>
<div
class=
"row"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment