<% 
  import org.exoplatform.web.application.JavascriptManager;
  
  def rcontext = _ctx.getRequestContext();
  JavascriptManager jsmanager = rcontext.getJavascriptManager();
  jsmanager.importJavascript('eXo.wiki.UIWikiSettingContainer', '/wiki/javascript/') ;
  jsmanager.addJavascript("eXo.wiki.UIWikiSettingContainer.init('" + uicomponent.id + "') ;");
  jsmanager.addJavascript("eXo.wiki.WikiLayout.reCalculateContentHeight();"); 
%>

<style>
.UIWikiPortlet .WikiLayout {
  position: static;
}
</style>

<div class="UIWikiSettingContainer" id="$uicomponent.id">
  <div class="SettingItems">
    <%
     List<String> items  = uicomponent.getItems();
     for (int i=0;i< items.size();i++) {
       String link = uicomponent.event( uicomponent.ACTION, items.get(i)) ;
       String selectedClass ="";
       if (items.get(i).equals(uicomponent.getActiveItem())){
         selectedClass = "Selected";
       }
    %>
       <div class="Item $selectedClass">
         <a href="$link"><%= _ctx.appRes("UIWikiSettingContainer.label."+ items.get(i)) %></a>
       </div>  
    <%} %>   
  </div>
  
  <div class="VerticalLine"></div>
  
  <div class="Content">
    <div class="ExtensionContainer">
      <% uicomponent.renderChild(uicomponent.getActiveItem());%>
    </div>        
  </div>
</div>