<%
import org.exoplatform.services.wcm.newsletter.config.NewsletterUserConfig;
%>
<div class="UITabPane $uicomponent.id">
	<%
	uicomponent.getListPublicUser();
	if(uicomponent.isViewTab){
	%>
	  <div class="TabPaneContent">
	    <div class="WorkingAreaWithHelp">
	      <div class="UIHorizontalTabs">
	        <div class="LeftHorizontalTabs">
		     	  <div class="RightHorizontalTabs">
		     	    <div class="CenterHorizontalTabs">
				        <div class="TabsContainer">
				          <%
				          	String url = uicomponent.url("SelectTab") ;
				          	String selTabId = uicomponent.getSelectedTabId() ;
				            for(uiChild in uicomponent.getChildren()) {
				              if(!uiChild.isRendered()) continue ; 
				              String style = "NormalTab" ;
				              String tabId = uiChild.getId();
				              if(tabId.equals(selTabId)) style="SelectedTab" ;
				          %>
				            <div class="UITab NormalTabStyle">
				              <div class="$style">
				                <div class="LeftTab">
				                  <div class="RightTab">
				                  	<% String actionLink = "ajaxAsyncGetRequest('" + uicomponent.url("SelectTab",tabId) + "', true)" %>                
				                    <div class="MiddleTab" onclick="eXo.webui.UIHorizontalTabs.changeTabForUITabPane(this, '$tabId', '$url');$actionLink"><%=_ctx.appRes("UITabPane.title." + uiChild.getId());%></div>
				                  </div>
				                </div>
				              </div>
				            </div>              
				          <%}%>
				        </div>
				      </div>
				    </div>
				  </div>
	      </div>
	      <div class="UITabContentContainer">
	        <%
	          for(uiChild in uicomponent.getChildren()) {
	          	if(!uiChild.isRendered()) continue ; 
	            String display = "none" ;
	            if(uiChild.getId().equals(selTabId)) display="block" ;
	        %>
	            <div class="UITabContent" style="display: $display;overflow:auto;">
	            	<%uicomponent.renderUIComponent(uiChild);%>
	            </div>
	        <%
	          }
	        %>
	      </div>  
	    </div>  
	  </div>

	<%
	}else{%>
		<div style="border:1px solid gray;padding:5px;margin:10px;height:auto;">
			<%uicomponent.renderChild(uicomponent.UIGRID_MANAGER_USERS);%>
		</div>
	<%
	}%>
	
	<div class="UIAction"> 
	    <% String actionLabel = _ctx.appRes("NewsletterPortlet.action.Close"); 
	       String link = uicomponent.event("Close") ;
	    %>
  	  		<a href="javascript:void(0);" onclick="$link" class="ActionButton LightBlueStyle">$actionLabel</a>
	</div>
	
</div>