<%
  import org.exoplatform.wiki.mow.api.PermissionEntry;
  import org.exoplatform.wiki.mow.api.Permission;
  import org.apache.commons.lang.StringEscapeUtils;
  
  PermissionEntry permissionEntry = uicomponent.getPermissionEntry();
  String id = permissionEntry.getId();
  boolean isImmutable = uicomponent.isImmutable();
  String fullName = StringEscapeUtils.escapeHtml(uicomponent.getEntryFullName());
  Permission[] permissions = permissionEntry.getPermissions();
  def uiPermissionForm = uicomponent.getParent().getParent();
  def deleteLink = uiPermissionForm.event(uiPermissionForm.DELETE_ENTRY, uicomponent.id);
%>
<td>
  <div>$fullName</div>
  <div class="Id">($id)</div>
</td>
<%
  for(permission in permissions){
    def checkboxField = uicomponent.getChildById(permission.getPermissionType().toString() + id) ;
    if (isImmutable) {
      checkboxField.setDisabled(true);
    }
    %>
    <td class="center"><% uicomponent.renderChild(checkboxField); %></td>
<%}
%>
<td class="center">
   <% if (!isImmutable) { %>
		<a class="actionIcon" rel='tooltip' data-placement='bottom'  title="<%= _ctx.appRes("UIPermissionEntry.title.DeletePermission"); %>" onclick="$deleteLink" ><i class="uiIconDelete uiIconLightGray"></i></a>
   <% } %>
</td>