<%
  import org.exoplatform.ecm.webui.component.admin.repository.UIRepositoryControl ;
  import org.exoplatform.ecm.webui.component.admin.UIECMAdminControlPanel ;
  import org.exoplatform.ecm.webui.component.admin.UIECMAdminWorkingArea ;
  import org.exoplatform.webui.core.UIPopupContainer;
  def rcontext = _ctx.getRequestContext() ;
  rcontext.getJavascriptManager().importJavascript('eXo.ecm.ECMUtils','/ecm-wcm-extension/javascript/');
  rcontext.getJavascriptManager().addJavascript("eXo.ecm.ECMUtils.fixHeight('UIECMAdminPortlet') ;") ;
  def userAgent = uicomponent.getUserAgent();
  if(userAgent != null && userAgent.contains("MSIE 6.0")) {
	  rcontext.getJavascriptManager().addJavascript("SelectFix.autoRepairFloatingElements(100) ;") ;
  }
%>
<div class="UIECMAdminPortlet" id="UIECMAdminPortlet">
  <%uicomponent.renderChild(UIPopupContainer.class);%>
	<%
	/* uicomponent.renderChild(UIRepositoryControl.class); */
	%>
	<div class="UIResizableBlock" style="height: 600px">
	  <%
	    int style = 6;
	    def sideBar = "NotShowSideBar";
	    if(uicomponent.isShowSideBar()) {
	      sideBar = "ShowSideBar";
	  %>
	      <div class="ECMAdminPanel">
	        <div class="ECMAdminTitleBar"><%=_ctx.appRes("UIRepositoryList.titlebar.label")%></div>
	        <% 
	          if(uicomponent.getChild(UIECMAdminControlPanel.class) != null) {
	            uicomponent.renderChild(UIECMAdminControlPanel.class);
	          }
	        %>
	      </div>
	  <%}%>
	  <div class="ECMLayoutSeparator ECMLayoutFloat" >
	    <div class="<%=(uicomponent.isShowSideBar() ? "CollapseSideBar" : "ExpandSideBar")%>" onclick="<%=uicomponent.event('ShowHide')%>"><span></span></div>
	  </div>
	  <div class="$sideBar">
		   <div style="overflow: auto; width: 100%; height: 100%;">
		      <% 
		      if(uicomponent.getChild(UIECMAdminWorkingArea.class) != null) uicomponent.renderChild(UIECMAdminWorkingArea.class); %>
			 </div>
		</div>
		<div style="clear: left;"><span style="display: none;"></span></div>
	</div>	
</div>