<%
  import org.exoplatform.ecm.webui.utils.Utils;
	import java.net.URLEncoder;
	import org.exoplatform.wcm.webui.reader.ContentReader;
	
%>
<%
  List<String[]> listValues = uicomponent.listUploadValues();
  uicomponent.getListUploadedNode();
  String[] arrLabel = ["fileName", "nodeName", "fileSize", "mimeType", "manageMetadata"];
%>
<div class="$uicomponent.id">
	<table class="UIGrid" cellspacing="0" borderspacing="0" style="width: 99%;">
	  <col width="40px;"><col><col><col><col>
	  <thead>
	    <tr>
	      <th></th>
	      <% for(label in arrLabel) { %>
	        <th><%=_ctx.appRes("UIUploadContent.label." + label)%></th>
	      <% } %>
	    </tr>
	  </thead>
	  <tbody>
	    <%
	    for(arrValues in listValues) {
	    %>
	    <tr>
	      <%
	        int index = 0;
	        for(value in arrValues) {	          
	          String subValue = value;
	          index++; 
	          if(value.length() > 20) subValue = value.substring(0,15) + "..." ;
	          if (index == 1) {
	      %>
	            <td><div class="ItemIcon16x16 <%=value%>"></div><span></span></td>
	        <%} else {%>
	                  <td style="text-align: center;overflow:hidden">
		            <%if (index == 6) {%>
								<% String valuePath = Utils.formatNodeName(value); %>
		              <a href="<%=uicomponent.event("ManageMetadata", valuePath)%>" title="<%=_ctx.appRes("UIUploadContent.tooltip.ManageMetadata")%>">
		              <div class="Icon16x16 Edit16x16Icon" style="margin-left: 30px;" title="<%=_ctx.appRes("UIUploadContent.tooltip.ManageMetadata")%>"><span></span></div>
	                </a>
		            <%} else {%>
		              <span title="$value"><%=ContentReader.getEscapeHtmlContent(subValue)%></span>
		            <% } %>
	            </td>
	      <%
	          }
	        }
	      %>
	    </tr>
	    <%}%>
	  </tbody>
	</table>
</div>