<%
  import org.exoplatform.wcm.webui.Utils;  
  def rcontext = _ctx.getRequestContext();  
  def jsManager = rcontext.getJavascriptManager();  
  jsManager.addOnLoadJavascript("eXo.ecm.WCMUtils.changePriorityCss()");
%>
<div class="$uicomponent.id">
	<%uiform.begin()%>
	<div class="HorizontalLayout">
		<div class="FormContainer">
			<table class="UIFormGrid">
			    <tr>
			    	<td class="FieldLabel"><label for="<%=uicomponent.DESCRIPTION%>"><%=uicomponent.getLabel(uicomponent.DESCRIPTION) %></label></td>
			    	<td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.DESCRIPTION) %></td>
			    </tr>
			    <tr>
			    	<td class="FieldLabel"><label for="<%=uicomponent.KEYWORDS%>"><%=uicomponent.getLabel(uicomponent.KEYWORDS) %></label></td>
			    	<td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.KEYWORDS) %></td>
			    </tr>
			    <%if(!uicomponent.getOnContent()) { 
			        if(uicomponent.getIsInherited()) {%>
			        <tr>
			    	    <td class="FieldLabel"></td>
			    	    <td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.ISINHERITED) %> <span style="vertical-align: middle;"><%=uicomponent.getLabel(uicomponent.ISINHERITED) %></span></td>
			        </tr>
			        <%}%>
			    <tr>
			    	<td class="FieldLabel"><label for="$uicomponent.ROBOTS_INDEX"><%=uicomponent.getLabel(uicomponent.ROBOTS) %></label></td>
			    	<td class="FieldComponent"><% uiform.renderField(uicomponent.ROBOTS_INDEX) %></td>
			    	<td class="FieldComponent"><% uiform.renderField(uicomponent.ROBOTS_FOLLOW) %></td>
			    </tr>
			    
			    <tr>
			    	<td class="FieldLabel"><%=uicomponent.getLabel(uicomponent.SITEMAP) %></td>
			    	<td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.SITEMAP) %> <span style="vertical-align: middle;"><%=uicomponent.getLabel(uicomponent.SITEMAP_VISIBLE) %></span></td>
			    </tr>			    
			    <tr>
			    	<td class="FieldLabel"><label for="$uicomponent.FREQUENCY"><%=uicomponent.getLabel(uicomponent.FREQUENCY) %></label></td>
			    	<td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.FREQUENCY) %></td>
			    </tr>
			    <tr>
			    	<td class="FieldLabel"><label for="<%=uicomponent.PRIORITY%>"><%=uicomponent.getLabel(uicomponent.PRIORITY) %></label></td>
			    	<td class="FieldComponent" colspan="2"><% uiform.renderField(uicomponent.PRIORITY) %></td>
			    </tr>
			    <%}%>			
			</table>
			<div class="UIActionSEO"> 				
				<% for(action in uicomponent.getActions()) { 
						 String actionLabel = _ctx.appRes(uicomponent.getName() + ".action." + action);
						 String link = uicomponent.event(action);
						 String classAction = "ActionButton LightBlueStyle";
						 if(actionLabel.equals("Cancel")) classAction = "ActionButton LightBlueStyle CancelButton";
				%>							
		 		  <a href="javascript:void(0);" onclick="$link" class="$classAction">$actionLabel</a>
				<%}%>	
			</div>
		</div>
	</div>
	<%uiform.end()%>
</div>