Commit 16705d25 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

975: Hide admin and customization links in custom search

Task-Url: https://pm.winseda.de/issues/975
parent 653a66a3
......@@ -6,10 +6,15 @@
<c:forEach items="${_nav.rootItems}" var="_navItem">
<c:if test="${_navItem.hideInSidebar==false && (_navItem.authRequired==false ||
<c:set var="hide" value="false" />
<c:forEach items="${_navItem.attributes}" var="attr">
<c:if test="${customSearch!=null && attr.key=='hideInCustomSearch' && attr.value==true}">
<c:set var="hide" value="true" />
</c:if>
</c:forEach>
<c:if test="${hide==false && (_navItem.hideInSidebar==false && (_navItem.authRequired==false ||
( (_navItem.authRequired==true && _auth!=null && _auth.auth==true) &&
( _navItem.authMinLevel==0 || (_navItem.authMinLevel<=_auth.level)) ))}">
( _navItem.authMinLevel==0 || (_navItem.authMinLevel<=_auth.level)) )))}">
<div class="list-group nav active">
......
......@@ -61,8 +61,14 @@
</li>
<c:forEach items="${_nav.rootItems}" var="_navItem">
<c:if test="${_navItem.authRequired==false || ( (_navItem.authRequired==true && _auth!=null && _auth.auth==true) &&
( _navItem.authMinLevel==0 || (_navItem.authMinLevel<=_auth.level)) )}">
<c:set var="hide" value="false" />
<c:forEach items="${_navItem.attributes}" var="attr">
<c:if test="${customSearch!=null && attr.key=='hideInCustomSearch' && attr.value==true}">
<c:set var="hide" value="true" />
</c:if>
</c:forEach>
<c:if test="${hide==false && (_navItem.authRequired==false || ( (_navItem.authRequired==true && _auth!=null && _auth.auth==true) &&
( _navItem.authMinLevel==0 || (_navItem.authMinLevel<=_auth.level)) ))}">
<c:choose>
<c:when test="${_navItem.subItems!=null && fn:length(_navItem.subItems)>0}">
<li class="dropdown <c:if test="${_navItem.active || _navItem.childActive}"> active</c:if>">
......
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