<%
  import org.exoplatform.wiki.webui.UIWikiPermissionForm.Scope;
  
  def uiParent = uicomponent.getParent();
%>
<div id="$uicomponent.id" class="uiPermissionGrid">
  <table class="uiGrid table table-hover table-striped">
    <thead>
      <tr>
      <%
        if(Scope.WIKI.equals(uiParent.getScope())){
      %>
        <th><%=_ctx.appRes("UIPermissionGrid.label.Owner")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.VIEWPAGE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.EDITPAGE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.ADMINPAGE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.ADMINSPACE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.Action")%></th>
      <% } else { %>
        <th><%=_ctx.appRes("UIPermissionGrid.label.Owner")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.VIEWPAGE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.EDITPAGE")%></th>
        <th class="center"><%=_ctx.appRes("UIPermissionGrid.label.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 ><% uicomponent.renderChild(component); %></tr>
   <% }
  }
%>
    </tbody>
  </table>
  
</div>