<%
  import org.exoplatform.commons.utils.HTMLSanitizer;

  def page = currentWikiPage;
  def parentPage = uicomponent.getCurrentParentPage();
  def parentLink = (parentPage != null) ? uicomponent.getPageLink(parentPage) : "";
  def parentTitle = (parentPage != null) ? HTMLSanitizer.sanitize(parentPage.getTitle()) : "";
  if (parentTitle.isEmpty()) {
    parentTitle = _ctx.appRes("UIWikiPageTitleControlArea.label.Untitled");
  }
%>

<div class="uiPageInfoItem uiPageInfoHierarchy">
  <h6 class="pageInfoTitle"><%= _ctx.appRes("UIWikiPageInfo.label.hierarchy")%></h6>
  <div class="pageInfoItemBody">
    <% if (parentPage != null) { %>
	  <div><%= _ctx.appRes("UIWikiPageInfo.label.parent-page")%></div>
	  <ul class="content">
	    <li class="nodeLabel">
	      <i class="uiIconArrowRight"></i>
	      <a href="$parentLink">$parentTitle</a>
	    </li>
	  </ul>
	<% } %>
	<div><%= _ctx.appRes("UIWikiPageInfo.label.child-pages")%></div>
	<ul>
	  <li class="nodeLabel">
	    <a href="javascript:void(0);">${uicomponent.renderHierarchy()}</a>
	  </li>
	</ul>
  </div>
</div>