#parse ( "colors.vm" )

#include ( "doctype.txt" )
<HTML>
<HEAD>
   	<title>Jadmin</title>
   	<link rel="stylesheet" href="../style.css" type="text/css" >
</HEAD>
<BODY bgcolor=$bg_color text=$txt_color link=$link_color alink=$alink_color >
<CENTER>
#include ( "links.txt" )

#set ( $currentService = "SECURITY" )
#set ( $currentServlet = "SecurityService" )
#SetServletNames()

## Open Big table
#TABLE ($bg_color "0" "3" "3" "750")
   #parse ( "index.vm" )
   #Banner ( $currentServlet )

   #TableCellOpen ($no_color $cell_color "0" "0" "5" "100%")
   <tr>
     <td>
        $!alertException
        ## The Main Cell is a Table of elements
        #TABLE ( $no_color "0" "3" "3" "100%")
	#if ( $existsServer )
          ############################
          #AreaTitle ( "JOnAS Server" )
	  #AreaOpen ()
          <tr>
            <td width="240" align="right" nowrap>Server Name:</td>
            <td width="750" align="left"><b>${serverName}</b></td>
          </tr>
	  #AreaClose ()
          #if ( $existsSecurityService )
            #if ( $info_error.equals("") )
              #AreaTitle ( "Security service" )
              #AreaOpen ()
		#if ( $mapping.isEmpty() )
                  <tr><td><i>No mapping between principal and role.</i></td></tr>
                #else 
                  #foreach ($key in $mapping.keys())
                    #set ( $roles = $mapping.get($key) )
                    <tr>
                      <td width="240" align="right" nowrap>$key</td>
                      <td width="750" align="left">
                      <b>
                        #foreach ( $role in $roles )
		          $role &nbsp;
                        #end
                      </b>
                      </td>
                    </tr>
                  #end
                #end
              #AreaClose ()
            #else
              <tr>
                <td colspan="2"><b>Error while getting attribute: </b><br>$info_error</td>
              </tr>
            #end
          #else
            <tr>
              <td>Service not available.</td>
            </tr>
          #end
        #else
           #AreaTitle ( "Server not manageable." )
           #AreaOpen ()
             <tr>
               <td><a href=${gui}${managementServlet}${gui}>Choose another registry</a></td>
             </tr>
           #AreaClose ()
	#end
        </TABLE>
      </td>
    </tr>   
    #TableCellClose ()
 ## End Big table
</TABLE>
</CENTER>
</BODY>
</HTML>
