head	1.23;
access;
symbols;
locks; strict;
comment	@# @;


1.23
date	2001.08.20.22.29.21;	author tfahrner;	state Exp;
branches;
next	1.22;

1.22
date	2001.08.03.05.45.05;	author tfahrner;	state Exp;
branches;
next	1.21;

1.21
date	2001.08.03.04.44.22;	author tfahrner;	state Exp;
branches;
next	1.20;

1.20
date	2001.07.31.01.18.38;	author tfahrner;	state Exp;
branches;
next	1.19;

1.19
date	2001.07.31.00.01.54;	author tfahrner;	state Exp;
branches;
next	1.18;

1.18
date	2001.07.30.21.59.21;	author tfahrner;	state Exp;
branches;
next	1.17;

1.17
date	2001.07.30.21.24.23;	author tfahrner;	state Exp;
branches;
next	1.16;

1.16
date	2001.07.30.18.40.43;	author leonardr;	state Exp;
branches;
next	1.15;

1.15
date	2001.07.27.22.36.07;	author leonardr;	state Exp;
branches;
next	1.14;

1.14
date	2001.07.25.19.39.27;	author leonardr;	state Exp;
branches;
next	1.13;

1.13
date	2001.07.06.16.15.46;	author leonardr;	state Exp;
branches;
next	1.12;

1.12
date	2001.07.02.21.22.08;	author leonardr;	state Exp;
branches;
next	1.11;

1.11
date	2001.06.29.21.02.15;	author jefflove;	state Exp;
branches;
next	1.10;

1.10
date	2001.06.21.01.04.57;	author dlr;	state Exp;
branches;
next	1.9;

1.9
date	2001.06.20.05.24.44;	author jefflove;	state Exp;
branches;
next	1.8;

1.8
date	2001.06.13.18.37.06;	author jefflove;	state Exp;
branches;
next	1.7;

1.7
date	2001.06.13.15.30.19;	author beril;	state Exp;
branches;
next	1.6;

1.6
date	2001.06.12.21.55.29;	author beril;	state Exp;
branches;
next	1.5;

1.5
date	2001.06.06.16.42.44;	author edk;	state Exp;
branches;
next	1.4;

1.4
date	2001.06.06.16.13.36;	author edk;	state Exp;
branches;
next	1.3;

1.3
date	2001.05.24.23.43.19;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2001.05.24.18.48.46;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.23.02.03.11;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.23
log
@first wave of ui revisions. expect minor breakage. working on it.
@
text
@
<div id="useredit" class="app">

#set( $showDeleteControls = false )
#set( $showApproveControls = false )
#set( $projects = $currentUser.getProjectsForUser() )
#foreach( $project in $projects )
 #if( $loginUser.hasRoleGrantPermission($project) )
  #set( $showApproveControls = true )
 #end
 #if( $loginUser.canRevokeRole($currentUser, $project) )
  #set( $showDeleteControls = true )
 #end
#end

#if( $updateSuccessful )
    <p><strong class="alert">Update succeeded</strong>
</p>
#end

<h3>Edit User: $currentUser.getLoginName()</h3>

<form action="UserEdit?userID=$currentUser.getID()" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="userID" value="$currentUser.getID()" />

<div class="axial">
<table border="1" cellspacing="2" cellpadding="3">
 <tr>
  <th nowrap="nowrap">Login Name</th>
  <td>$currentUser.getLoginName()</td>
 </tr>
 <tr>
  <th nowrap="nowrap">Real Name</th>
  <td><input type="text" name="realName" size="25" value="$realName" /></td>
 </tr>
 <tr>
  <th nowrap="nowrap">Email</th>
  <td><input type="text" name="email" size="25" value="$email" /></td>
 </tr>
 <tr>
  <th nowrap="nowrap">Organization</th>
 #if( $userEditSelfAllowsEditOrg || $acl.hasPermission("User - Edit", $currentUser.getDomain()) )
    <td><input type="text" name="organization" size="25" value="$organization" /></td>
 #else
    <td>$organization</td>
 #end
 </tr>
 #if (!$acl.hasPermission("User - Edit", $currentUser.getDomain()))
  <tr>
   <th nowrap="nowrap">Current password</th>
   <td><input type="password" name="oldPassword" size="25" value="" /></td>
  </tr>
 #end

#if (!$currentUser.isDeleted())
 <tr>
  <th nowrap="nowrap">New password</th>
  <td><input type="password" name="passwd" size="25" value="" /></td>
 </tr>
 <tr>
  <th nowrap="nowrap">Retype new password</th>
  <td><input type="password" name="passwdConfirm" size="25" value="" /></td>
 </tr>
  
 #if( $userGroups )
  #set( $userGroups = $currentUser.getRegularGroups() )
 #end
  <tr>
   <th nowrap="nowrap">Group Memberships</th>
   <td>
 #if( !$userGroups.isEmpty() )
  #foreach( $group in $userGroups ) 
   #if( $acl.hasPermission("UserGroup - Edit", $currentUser.getDomain()) )
    <p><a href="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a></p>
   #else
    <p>$group.getName()</p>
   #end
  #end
 #else
  None
 #end
   </td>
  </tr>

 #set( $hasHostRole = false )
 #set( $hasDomainRole = false )
 #set( $userACL = $currentUser.getACL() )

 #foreach( $role in $host.getHostRoles() )
  #if( $userACL.hasRole($role) )
   #set( $hasHostRole = true )
  #end
 #end

 #foreach( $role in $host.getDomainRoles() )
  #if( $userACL.hasRole($role, $currentUser.getDomain()) )
   #set( $hasDomainRole = true )
  #end
 #end

 #if( $hasHostRole || $acl.hasPermission("Role - Grant") )
  <tr>
   <th nowrap="nowrap">Site-wide Roles</th>
  #foreach( $role in $host.getHostRoles() )
   <td>
   #if( $acl.hasPermission("Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()) )
    <input type="checkbox" name="Grant $role.getID()"
    #if( $userACL.hasRole($role) )
     checked="checked"
    #end
     />$role.getFullName()
   #else
     #if( $userACL.hasRole($role) )
      $role.getFullName() <input type="hidden" name="Ignore $role.getID()" />
     #end
   #end
  #end
   </td>
  </tr>
 #end

 #if($hasDomainRole || $acl.hasPermission("Role - Grant", $currentUser.getDomain()))
  <tr>
   <th nowrap="nowrap">Domain-wide Roles</th>
   <td>
  #foreach( $role in $host.getDomainRoles() )
   #if( $acl.hasPermission("Role - Grant", $currentUser.getDomain()) )
    <p><input type="checkbox" name="Grant $role.getID()"
    #if( $userACL.hasRole($role, $currentDomain) )
     checked="checked"
    #end
     />$role.getFullName()</p>
   #else
     #if( $userACL.hasRole($role, $currentUser.getDomain()) )
      <p>$role.getFullName() <input type="hidden" name="Ignore $role.getID()" /></p>
     #end
   #end
  #end
   </td>
  </tr>
 #end

 <tr>
  <td></td>
  <td><input type="submit" name="Button" value="Submit Changes" /></td>
 </tr>
#end
</table>
</div>

#if (!$currentUser.isDeleted())
 <h3>Project Roles</h3>

 #if( !$projects.isEmpty() )
  <table border="1" cellspacing="2" cellpadding="3" width="100%">  
   <tr>
    <th nowrap="nowrap">Project</th>
    <th nowrap="nowrap">Roles</th>
     #if( $showApproveControls || $showDeleteControls )
    <th nowrap="nowrap">Operations</th>
     #end
   </tr>
  #set ($rowClass="a")
  #foreach( $project in $projects )
   ## Flag for whether or not to print out the project name.
   #set( $printProjectName = "true" )
   ## Loop established roles.
   #foreach( $role in $currentUser.getRolesInProject($project) )
   <tr class="$rowClass">
    <td>
     #if( $printProjectName.equals("true") )
            <a href="$res.encodeUrl($project.getProjectHome())">$project.getName()</a>
     #set( $printProjectName = "" )
     #else
            &nbsp;
     #end
    </td>
    <td>$role.getFullName()</td>
     #if( $loginUser.canRevokeRole($currentUser, $project) )
    <td><input type="checkbox" name="$project.getID()\.$role.getID()" value="delete" />Delete</td>
     #end
   </tr>
  #if ($rowClass.equals("a"))
    #set ($rowClass="b")
  #else 
    #set ($rowClass="a")
  #end
   #end

   ## Loop pending roles.
   #foreach( $role in $currentUser.getRequestedRolesInProject($project) )
   <tr class="$rowClass">
    <td>
     #if( $printProjectName.equals("true") )
            <a href="$res.encodeUrl($project.getProjectHome())">$project.getName()</a>
      #set( $printProjectName = "" )
     #else
            &nbsp;
     #end
    </td>
    <td>$role.getFullName() <i>(Pending)</i></td>
     #if( $loginUser.hasRoleGrantPermission($project) )
    <td><input type="radio" name="$project.getID()\.$role.getID()" value="approve" />Approve &nbsp;
        <input type="radio" name="$project.getID()\.$role.getID()" value="defer" checked="checked" />Defer &nbsp;
        <input type="radio" name="$project.getID()\.$role.getID()" value="delete" />Disapprove &nbsp;
    </td>
     #else
      #if( $loginUser.canRevokeRole($currentUser, $project) )
    <td><input type="checkbox" name="${project.getID()}.$role.getID()" value="delete" />Delete</td>
      #end
     #end
   </tr>
  #if ($rowClass.equals("a"))
    #set ($rowClass="b")
  #else 
    #set ($rowClass="a")
  #end
   #end
  #end
  #if( $showApproveControls || $showDeleteControls )
   <tr>
    <td></td>
    <td></td>
    <td><input type="submit" name="Button" value="Update Roles" /></td>
   </tr>
  #end
 </table>
 #else
  #if( $currentUser.getID().equals($loginUser.getID()) )
   <p><strong class="alert">You are not currently involved in any projects. You can join a project from its home page.</strong>
</p>
  #else
   <p><strong class="alert">No projects associated with $currentUser.getLoginName().</strong>
</p>
  #end 
 #end

#if( $acl.hasPermission("User - View - Self", $currentUser.getDomain()) )
<h3>Detailed Role Info</h3>
<ul>
 <li><a href="/servlets/ACLDump?userID=$currentUser.getID()">Direct and Derived Roles</a></li>
 <li><a href="/servlets/PermissionDump?userID=$currentUser.getID()">Details of Permissions</a></li>
</ul>
#end
#if( !($loginUser.equals($currentUser)) && $acl.hasPermission("User - Delete", $currentUser.getDomain()) )
<h3>Other Operations</h3>
<ul>
 <li><a href="UserDelete?userID=$currentUser.getID()">Delete User</a></li>
</ul>
#end
#end
</form>
</div>
@


1.22
log
@getting rid of "tasks" nav; backing out of earlier ill-considered commit
@
text
@a0 1
#parse( "Admin_Nav.vm" )
a2 3
<h2>
 #parse( "Nomen.vm" )
</h2>
d29 1
a29 1
  <th nowrap="nowrap">Login Name:</th>
d33 1
a33 1
  <th nowrap="nowrap">Real Name:</th>
d37 1
a37 1
  <th nowrap="nowrap">Email:</th>
d41 1
a41 1
  <th nowrap="nowrap">Organization:</th>
d50 1
a50 1
   <th nowrap="nowrap">Current password:</th>
d57 1
a57 1
  <th nowrap="nowrap">New password:</th>
d61 1
a61 1
  <th nowrap="nowrap">Retype new password:</th>
d69 1
a69 1
   <th nowrap="nowrap">Group Memberships:</th>
d103 1
a103 1
   <th nowrap="nowrap">Site-wide Roles:</th>
d124 1
a124 1
   <th nowrap="nowrap">Domain-wide Roles:</th>
d152 1
a152 1
 <h3>Project Roles:</h3>
d239 1
a239 1
<h3>Detailed Role Info:</h3>
d246 1
a246 1
<h3>Other Operations:</h3>
@


1.21
log
@restoring admin options nav, fixing html in ProjectAdd
@
text
@a6 3
#if( !$loginUser.isAnonymous() && $servletTaskBar.available($servletName))
#parse("$servletTaskBar.getPath($servletName)")
#end
@


1.20
log
@included "task nav" below headlines
@
text
@d1 1
@


1.19
log
@pulled admin options, added headlines
@
text
@d6 4
@


1.18
log
@html usage revision to synch with scarab
@
text
@a0 1
#parse( "Admin_Nav.vm" )
d3 3
@


1.17
log
@removed dependency on CSS for differentiation of alerts
@
text
@d3 1
a3 1
<div id="useredit">
d27 1
a27 1
<table border="0" cellspacing="0" cellpadding="2">
d155 1
a155 1
  <table border="0" cellspacing="0" cellpadding="2" width="100%">  
@


1.16
log
@Action cleanup. Some role actions, and Audit Log - View, had three actions apiece when one would do. We're now down to 76 actions.
@
text
@d17 2
a18 1
    <p class="alert">Update succeeded</p>
d230 2
a231 1
   <p class="alert">You are not currently involved in any projects. You can join a project from its home page.</p>
d233 2
a234 1
   <p class="alert">No projects associated with $currentUser.getLoginName().</p>
@


1.15
log
@Made Role.getName() get unqualified role name; this was neccessary because BaseRolePeer calls Role.getName(), which was causing roles to be created with their fully-qualified names being stored where their unqualified names should be. Templates which used to use Role.getName() now need to use Role.getFullName()
@
text
@d100 1
a100 1
 #if( $hasHostRole || $acl.hasPermission("Host Role - Grant") )
d105 1
a105 1
   #if( $acl.hasPermission("Host Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()) )
d121 1
a121 1
 #if( $hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()) )
d126 1
a126 1
   #if( $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()) )
@


1.14
log
@User deletes are now soft deletes which change the user type to 'deleted' (a minimal type of user which has user information but is not allowed associations with roles or user groups). Includes some other miscellaneous bug fixes.
@
text
@d110 1
a110 1
     />$role.getName()
d113 1
a113 1
      $role.getName() <input type="hidden" name="Ignore $role.getID()" />
d131 1
a131 1
     />$role.getName()</p>
d134 1
a134 1
      <p>$role.getName() <input type="hidden" name="Ignore $role.getID()" /></p>
d177 1
a177 1
    <td>$role.getName()</td>
d200 1
a200 1
    <td>$role.getName() <i>(Pending)</i></td>
@


1.13
log
@Users without User - Edit must provide old password in order to change password.
@
text
@d53 2
d64 13
a76 12
#if( $userGroups )
 #set( $userGroups = $currentUser.getRegularGroups() )
#end
 <tr>
  <th nowrap="nowrap">Group Memberships:</th>
  <td>
#if( !$userGroups.isEmpty() )
 #foreach( $group in $userGroups ) 
  #if( $acl.hasPermission("UserGroup - Edit", $currentUser.getDomain()) )
   <p><a href="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a></p>
  #else
   <p>$group.getName()</p>
d78 2
d81 6
a86 5
#else
 None
#end
  </td>
 </tr>
d88 4
a91 7
#set( $hasHostRole = false )
#set( $hasDomainRole = false )
#set( $userACL = $currentUser.getACL() )

#foreach( $role in $host.getHostRoles() )
 #if( $userACL.hasRole($role) )
  #set( $hasHostRole = true )
a92 1
#end
d94 4
a97 3
#foreach( $role in $host.getDomainRoles() )
 #if( $userACL.hasRole($role, $currentUser.getDomain()) )
  #set( $hasDomainRole = true )
a98 1
#end
d100 7
a106 12
#if( $hasHostRole || $acl.hasPermission("Host Role - Grant") )
 <tr>
  <th nowrap="nowrap">Site-wide Roles:</th>
 #foreach( $role in $host.getHostRoles() )
  <td>
  #if( $acl.hasPermission("Host Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()) )
   <input type="checkbox" name="Grant $role.getID()"
   #if( $userACL.hasRole($role) )
    checked="checked"
   #end
    />$role.getName()
  #else
d108 1
a108 1
     $role.getName() <input type="hidden" name="Ignore $role.getID()" />
d110 6
d117 2
a119 3
  </td>
 </tr>
#end
d121 15
a135 9
#if( $hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()) )
 <tr>
  <th nowrap="nowrap">Domain-wide Roles:</th>
  <td>
 #foreach( $role in $host.getDomainRoles() )
  #if( $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()) )
   <p><input type="checkbox" name="Grant $role.getID()"
   #if( $userACL.hasRole($role, $currentDomain) )
    checked="checked"
a136 5
    />$role.getName()</p>
  #else
    #if( $userACL.hasRole($role, $currentUser.getDomain()) )
     <p>$role.getName() <input type="hidden" name="Ignore $role.getID()" /></p>
    #end
d138 2
d141 1
a141 3
  </td>
 </tr>
#end
d146 1
d150 2
a151 1
<h3>Project Roles:</h3>
d247 1
@


1.12
log
@Use currentDomain instead of user.getDomain so that root will work.
@
text
@d40 1
a40 1
  <th nowrap="nowrap"></th>
d47 6
d54 1
a54 1
  <th nowrap="nowrap">Password:</th>
d58 1
a58 1
  <th nowrap="nowrap">Retype password:</th>
@


1.11
log
@conditionalized assignment of value to $userGroups based on existence of same; otherwise output stops at that point. change patches over an unknown problem with $userGroups
@
text
@d120 1
a120 1
   #if( $userACL.hasRole($role, $currentUser.getDomain()) )
@


1.10
log
@This text was the cause of some confusion for certain users (we will
not divulge their names to protect their identities, lest they be
ridiculed for their stupidity  ;).

IZ #4608
@
text
@d55 4
a58 1
#set( $userGroups = $currentUser.getRegularGroups() )
d238 1
a238 1
</div>@


1.9
log
@html usage revision
@
text
@d209 1
a209 1
    <td><input type="submit" name="Button" value="Edit Roles" /></td>
@


1.8
log
@added div.axial to table as exemplar
@
text
@a220 2


@


1.7
log
@converted some of the redundant <th> tags to <td>
@
text
@d25 2
a26 1
<table border="0" cellspacing="0" cellpadding="2" width="100%">
d135 1
d207 2
a208 2
    <th></th>
    <th></th>
@


1.6
log
@recoded according to new html/css standards
@
text
@d17 1
a17 1
    <p class="Warning">Update succeeded</p>
d115 1
a115 1
   <input type="checkbox" name="Grant $role.getID()"
d119 1
a119 1
    />$role.getName()
d122 1
a122 1
     $role.getName() <input type="hidden" name="Ignore $role.getID()" />
d130 1
a130 1
  <th></th>
@


1.5
log
@change name internally from UserEditAllows.. to UserEditSelfAllows.. --
which is more accurate
@
text
@d3 1
d20 1
d22 2
a23 38
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" BORDER="0" WIDTH="100%">
<FORM ACTION="UserEdit?userID=$currentUser.getID()" METHOD="POST"
      ENCTYPE="application/x-www-form-urlencoded">
<INPUT TYPE="hidden" NAME="userID" VALUE="$currentUser.getID()">
  <TR>
    <TD CLASS="Header" NOWRAP>Edit User: <SPAN CLASS="ProjectNameHeader">$currentUser.getLoginName()</SPAN></TD>  
  </TR>
</TABLE>

<TABLE BORDER="0" WIDTH="100%">
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Login Name:</TD>
    <TD ALIGN="left" class="PlainText">$currentUser.getLoginName()</TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Real Name:</TD>
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="realName" SIZE="25" VALUE="$realName"></TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Email:</TD>
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="email" SIZE="25" VALUE="$email"></TD>
  </TR>
   <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Organization:</TD>
#if( $userEditSelfAllowsEditOrg || $acl.hasPermission("User - Edit", $currentUser.getDomain()) )
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="organization" SIZE="25" VALUE="$organization"></TD>
#else
    <TD ALIGN="left" class="PlainText">$organization</TD>
#end
   </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Password:</TD>
    <TD ALIGN="left"><INPUT TYPE="password" NAME="passwd" SIZE="25" VALUE=""></TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Retype password:</TD>
    <TD ALIGN="left"><INPUT TYPE="password" NAME="passwdConfirm" SIZE="25" VALUE=""></TD>
  </TR>
d25 29
d55 3
a57 3
<TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Group Memberships:</TD>
<TD ALIGN="left" class="PlainText">
d61 1
a61 1
   <A HREF="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a><br>
d63 1
a63 1
   $group.getName()<br>
d69 2
a70 1
</TD></TR>
d89 2
a90 2
 <TR>
  <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Site-wide Roles:</TD>
d92 1
a92 1
  <TD ALIGN="left" class="PlainText">
d94 1
a94 1
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
d96 1
a96 1
    CHECKED
d98 1
a98 1
   >$role.getName()<br>
d101 1
a101 1
     $role.getName() <INPUT TYPE="hidden" NAME="Ignore $role.getID()"><br>
d105 2
a106 1
 </TD></TR>
d110 3
a112 3
 <TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Domain-wide Roles:</TD>
 <TD ALIGN="left" class="PlainText" VALIGN="top">
d115 1
a115 1
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
d117 1
a117 1
    CHECKED
d119 1
a119 1
   >$role.getName()<br>
d122 1
a122 1
     $role.getName() <INPUT TYPE="hidden" NAME="Ignore $role.getID()"><br>
d126 2
a127 1
 </TD></TR>
d129 41
a169 42

  <TR>
    <TD></TD>
    <TD><INPUT TYPE="submit" NAME="Button" VALUE="Submit Changes"></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD VALIGN="top" CLASS="InputHeader" NOWRAP>Project Roles:</TD>
    <TD>
      <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">  
        <TR>
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="5"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR>
        <TR>
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef">Project</TD>
          <TD WIDTH="10" BGCOLOR="#efefef"><SPACER TYPE="block" WIDTH="10"></TD>
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef" NOWRAP>Roles <SPAN CLASS="ProjectName"></SPAN></TD>
          <TD WIDTH="10" BGCOLOR="#efefef"><SPACER TYPE="block" WIDTH="10"></TD>

#if( $showApproveControls || $showDeleteControls )
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef">Operations</TD>
#end
        </TR>
        <TR>
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="7"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR>
#foreach( $project in $projects )
  ## Flag for whether or not to print out the project name.
  #set( $printProjectName = "true" )

  #if( $haveProjects )
        <TR> 
          <TD HEIGHT="2" COLSPAN="5"><SPACER TYPE="block" HEIGHT="2"></TD> 
        </TR> 
        <TR> 
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="5"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR> 
        <TR> 
          <TD HEIGHT="2" COLSPAN="5"><SPACER TYPE="block" HEIGHT="2"></TD> 
        </TR> 
d171 1
d173 6
a178 6
  ## Loop established roles.
  #foreach( $role in $currentUser.getRolesInProject($project) )
        <TR>
          <TD CLASS="ProjectName">
    #if( $printProjectName.equals("true") )
            <A HREF="$res.encodeUrl($project.getProjectHome())">$project.getName()</A>
d180 1
a180 1
    #else
d182 18
a199 12
    #end
          </TD>
          <TD>&nbsp;</TD> 
          <TD CLASS="PlainText" NOWRAP>$role.getName()</TD>
          <TD>&nbsp;</TD>
          #if( $loginUser.canRevokeRole($currentUser, $project) )
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="checkbox" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Delete
           </TD>
          #end
        </TR>
d201 1
a201 33

  ## Loop pending roles.
  #foreach( $role in $currentUser.getRequestedRolesInProject($project) )
        <TR>
          <TD CLASS="ProjectName">
    #if( $printProjectName.equals("true") )
            <A HREF="$res.encodeUrl($project.getProjectHome())">$project.getName()</A>
      #set( $printProjectName = "" )
    #else
            &nbsp;
    #end
          </TD>
          <TD>&nbsp;</TD> 
          <TD CLASS="PlainText" NOWRAP>$role.getName() <i>(Pending)</i></TD>
          <TD>&nbsp;</TD>
          #if( $loginUser.hasRoleGrantPermission($project) )
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()" 
                    VALUE="approve">Approve &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="defer" CHECKED>Defer &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Disapprove &nbsp;
           </TD>
          #else
           #if( $loginUser.canRevokeRole($currentUser, $project) )
            <TD CLASS="PlainText" NOWRAP>
              <INPUT TYPE="checkbox" NAME="${project.getID()}.$role.getID()"
                     VALUE="delete">Delete
            </TD>
           #end
          #end
        </TR>
d203 14
a216 9
  #set( $haveProjects = true )
#end
#if( $haveProjects )
 #if( $showApproveControls || $showDeleteControls )
        <TR>
          <TD COLSPAN="5">
            <INPUT TYPE="submit" NAME="Button" VALUE="Edit Roles">
          </TD>
        </TR>
d218 3
a220 14
#else
        <TR>
          <TD COLSPAN="5" class="PlainText">
 #if( $currentUser.getID().equals($loginUser.getID()) )
	    <I>You are not currently involved in any projects. You
               can join a project from its home page.</i>              
#else
            <I>No projects associated with $currentUser.getLoginName().</I>
#end          </TD>
        </TR>
#end
      </TABLE>
    </TD>
  </TR>
d222 5
a226 10
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD CLASS="InputHeader" VALIGN="TOP" NOWRAP>Detailed Role Info:</TD>
    <TD CLASS="PlainText">
      <a href="/servlets/ACLDump?userID=$currentUser.getID()">Direct and Derived Roles</a><br>
      <a href="/servlets/PermissionDump?userID=$currentUser.getID()">Details of Permissions</a><br>
    </TD>
  </TR>
d229 4
a232 10
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD CLASS="InputHeader" NOWRAP>Other Operations:</TD>
    <TD CLASS="StatText">
      <A HREF="UserDelete?userID=$currentUser.getID()">Delete User</a>
    </TD>
</FORM>
  </TR>
d234 2
a235 2
</TABLE>

@


1.4
log
@support for a new conf item (whose default is the current behavior)
to determine whether or not users can edit their own organizations
(if they don't have the User - Edit permission)
@
text
@d44 1
a44 1
#if( $userEditAllowsEditOrg || $acl.hasPermission("User - Edit", $currentUser.getDomain()) )
@


1.3
log
@Correcte VTL syntax errors.
@
text
@d44 1
a44 1
#if( $acl.hasPermission("User - Edit", $currentUser.getDomain()) )
@


1.2
log
@Removed BRAND_TEMPLATE_ROOT, SERVLET_TEMPLATE_ROOT, and SANDBOX from use in #include and #parse directives (deprecated by multiple template paths).
@
text
@d7 1
a7 2
 #if $loginUser.hasRoleGrantPermission($project)
 {
d10 1
a10 2
 #if $loginUser.canRevokeRole($currentUser, $project) 
 {
@


1.1
log
@Adding Velocity templates.
@
text
@d1 1
a1 1
#parse( "$BRAND_TEMPLATE_ROOT/Admin_Nav.vm" )
@

