<%
  def selectedNode = uicomponent.getSelectedNode();
%>
<div class="UIForm LayoutContent">
	<% uiform.begin() %>
  <div class="HorizontalLayout">
  	<table class="UIFormGrid">	  
	    <tr>		          					
	      <td class="FieldLabel"><%=_ctx.appRes("UIThumbnailForm.label.mediumSize")%></td>
	      <td class="FieldComponent">
		      <%
		        def thumbnailNode = uicomponent.getThumbnailNode(selectedNode);
		        if(thumbnailNode != null && thumbnailNode.hasProperty("exo:mediumSize")) { 
							String thumbnailImage = uicomponent.getThumbnailImage(selectedNode);
							def actionLink = uicomponent.event("RemoveThumbnail");
						%>		
							<div>
								<img src="$thumbnailImage" alt="$thumbnailImage" />
								<img onclick="$actionLink" src="/eXoResources/skin/DefaultSkin/background/Blank.gif" alt="<%=_ctx.appRes("UIThumbnailForm.title.remove-thumbnail")%>" class="ActionIcon Remove16x16Icon" title="<%=_ctx.appRes("UIThumbnailForm.title.remove-thumbnail")%>"/>
							</div>
						<%
						} else if(uicomponent.isRemovedThumbnail()) {
						  uicomponent.renderChildren();
						}	else {
              uicomponent.renderChildren();
						}
		      %>
		    </td>
	    </tr>
	  </table>
		<%/* start render action*/%>
	<div class="UIAction"> 
		  <% for(action in uicomponent.getActions()) { 
				 String actionLabel = _ctx.appRes(uicomponent.getName() + ".action." + action) ;
						 String link = uicomponent.event(action) ;
		  %>
				<a onclick="$link" class="ActionButton LightBlueStyle" href="javascript:void(0);">$actionLabel</a>
			<%}%>          
	</div>
	  <%/* end render action*/%>
  </div>
  <% uiform.end() %>
</div>
