<% 
  import org.exoplatform.ecm.webui.utils.Utils ;
%>
<div id="$uicomponent.id">
	<table class="UIGrid" id="$uicomponent.id">  
		<tbody>
	    <tr>
	      <th><%=_ctx.appRes("UIDriveSelector.label.driveName")%></th>
	      <th><%=_ctx.appRes("UIDriveSelector.label.action") %></th>    
	    </tr>
	    
	    <div class="HomeNode">
	    <%
	      def listDrive = uicomponent.getListDrive();
	      if (listDrive != null && listDrive.size() > 0) {
	        def rowClass = null;
  	      boolean even = true;
  		    for (drive in listDrive) {
  	 	      if (even) rowClass = "EvenRow";  
	  	      else rowClass = "OddRow"; 
	  	      even = !even;
	     %>
	          <tr class="$rowClass">
							<td><%=drive.getName()%></td>	          	
							<td width="10%">
								<div class="ActionContainer">
									<img class="Select16x16Icon" src="/eXoResources/skin/sharedImages/Blank.gif" alt="" onclick="<%=uicomponent.event("AddDrive", Utils.formatNodeName(drive.getName()))%>" title="<%=_ctx.appRes("UIDriveSelector.label.adddrives")%>" />
								</div>
							</td>
	          </tr>
	     <% 
	        }
	      } else { %>
	         <tr class="EvenRow">
	           <td style="font-style:italic; text-align: center; color: #FF5604" colspan="2">
	             <%=_ctx.appRes("UIGrid.msg.empty")%>
	           </td>
	         </tr>
	    <%}%>
	  	</div>
	  </tbody>
	</table>
	
  <% if (uicomponent.getUIPageIterator().getAvailablePage() > 1) { %>
  <div style="margin:1px 0px 5px 0px;">
    <%_ctx.renderUIComponent(uicomponent.getUIPageIterator())%>
  </div>
  <% } %>
</div>