<%

  import org.exoplatform.ecm.webui.component.explorer.UIJCRExplorerPortlet;
  import org.exoplatform.ecm.webui.component.explorer.sidebar.UISideBar;
  def managers = uicomponent.getManagers();
  
  public String getCSSClassName(String item) {
    if (uicomponent.getSelectedComp().equals(item)) return "SelectedItem";
    return "NormalItem";
  }
%>
<div class="UISideBar" id="UISideBar">
  <div class="UISideBarContainer">
    <div class="UIResizableBlock">
      <% 
        String[] arrComp = [uicomponent.getCurrentComp()];
        uicomponent.renderSideBarChild(arrComp); 
       %>        
    <% if (uicomponent.getAncestorOfType(UIJCRExplorerPortlet.class).isShowFilterBar()) { %>   
	    <div class="ResizeTreeExplorer" onmousedown="eXo.ecm.ECMUtils.resizeTreeInSideBar(event)">
				<div class="ResizeTreeButton" onclick="eXo.ecm.ECMUtils.showHideItemsInSideBar(this)"><span></span></div>
			</div>
      <div class="SelectItem" id ="SelectItemArea">
        <% 
            String[] arrAllItems = ["UIAllItems", "UIAllItemsByType"];
            uicomponent.renderSideBarChild(arrAllItems);
        %>
      </div>
      <% } %>
    </div>
    <div class="UISelectContent">
      					 		<%
					 			for(itemContext in managers) {
					 			def action = itemContext.getUIExtensionName();
					 		%>
      <div class="<%=getCSSClassName(action)%>" onclick="<%=itemContext.event(action)%>" title="<%=_ctx.appRes(uicomponent.getId() + ".label." + action)%>">
        <div class="ItemIcon DefaultIcon ${action}Icon"><span></span></div>
      </div>
	  <% } %>
    </div>
    <div style="clear: both;"><span></span></div>
  </div>
 
</div>