<%
  import org.exoplatform.wiki.webui.UIWikiPermissionForm.Scope;
  
  def uiParent = uicomponent.getParent();
%>
<div id="$uicomponent.id" class="UIPermissionGrid">
  <table cellspacing="0" class="UIGrid">
    <thead>
      <tr>
      <%
        if(Scope.WIKI.equals(uiParent.getScope())){
      %>
        <th>Owner</th>
        <th class="center">View Pages</th>
        <th class="center">Edit Pages</th>
        <th class="center">Admin Pages</th>
        <th class="center">Admin Space</th>
        <th class="center">Action</th>
      <% } else { %>
        <th>Owner</th>
        <th class="center">View Pages</th>
        <th class="center">Edit Pages</th>
        <th class="center">Action</th>
      <%}%>
      </tr>
    </thead>
    <tbody>
    <%
  List children = uicomponent.getChildren() ;
  int index = 0;
  String rowClass;
  for(component in children) {
  	if(component.isRendered()){
  	  index++;
      if(index%2 == 1){
        rowClass = "EvenRow";
      }else{
        rowClass = "OddRow";
      }
      %>
      <tr class="$rowClass"><% uicomponent.renderChild(component); %></tr>
   <% }
  }
%>
    </tbody>
  </table>
  
</div>