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


1.12
date	2001.08.29.00.06.31;	author dlr;	state Exp;
branches;
next	1.11;

1.11
date	2001.08.20.22.29.22;	author tfahrner;	state Exp;
branches;
next	1.10;

1.10
date	2001.08.03.05.45.07;	author tfahrner;	state Exp;
branches;
next	1.9;

1.9
date	2001.07.31.01.18.39;	author tfahrner;	state Exp;
branches;
next	1.8;

1.8
date	2001.07.31.00.01.56;	author tfahrner;	state Exp;
branches;
next	1.7;

1.7
date	2001.07.30.21.59.23;	author tfahrner;	state Exp;
branches;
next	1.6;

1.6
date	2001.07.30.18.40.43;	author leonardr;	state Exp;
branches;
next	1.5;

1.5
date	2001.07.09.17.21.44;	author leonardr;	state Exp;
branches;
next	1.4;

1.4
date	2001.06.29.00.57.50;	author leonardr;	state Exp;
branches;
next	1.3;

1.3
date	2001.06.15.17.37.26;	author jefflove;	state Exp;
branches;
next	1.2;

1.2
date	2001.05.23.17.49.02;	author susank;	state Exp;
branches;
next	1.1;

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


desc
@@


1.12
log
@Major optimization -- no longer hitting the database repeatedly for
the same list of Project objects.
@
text
@#if( $acl.hasPermission("Project - Approve", $currentDomain) )
 #set( $anyAdmin = 1 )
 #set( $hasProjectList = 1 )
#end
#if( $acl.hasPermission("User - List", $currentDomain) )
 #set( $anyAdmin = 1 )
 #set( $hasUserList = 1 )
#end
#if( $acl.hasPermission("UserGroup - List", $currentDomain) )
 #set( $anyAdmin = 1 )
 #set( $hasUserGroupList = 1 )
#end
#if( $acl.hasPermission("ProjectGroup - Add", $currentDomain) )
 #set( $anyAdmin = 1 )
 #set( $hasProjectGroupList = 1 )
#end
#if( $acl.hasPermission("Category - Add", $currentDomain) )
 #set( $anyAdmin = 1 )
 #set( $hasCategoryList = 1 )
#end

#if( $acl.hasPermission("Role - Add", $currentDomain) )
 ##set( $anyAdmin = 1 )
 #set( $hasRoleList = 1 )
#end

#set( $requestedProjects = $currentDomain.getUnapprovedProjects($acl) )
#if( $acl.hasPermission("Project - Approve", $currentDomain) && (!$requestedProjects.isEmpty()) )
  #set( $anyPending = 1 )
#end

#set ($projectsForUser = $loginUser.getProjectsForUser())

#foreach( $project in $projectsForUser )
  #set( $requestedProjects = $project.getNumberOfRequestedRoles() )
  #set( $requestedRoles = $project.getNumberOfRequestedRoles() )
  #set( $requestedNews = $project.getUnapprovedNews($acl) )
  #set( $requestedDocuments = $project.getUnapprovedDocuments() )
  #set( $requestedSections = $project.getUnapprovedSections() )
  #set( $requestedDownloads = $project.getUnapprovedDownloads() )

  #if( $acl.hasPermission("Role - Grant", $project) && (!$requestedRoles==0) ) 
    #set( $anyPending = 1 )
  #end
  #if( $acl.hasPermission("Project News - Approve", $project) && (!$requestedNews.isEmpty()) ) 
    #set( $anyPending = 1 )
  #end
  #if( $acl.hasPermission("Project Document - Approve", $project) && (!$requestedDocuments.isEmpty()) ) 
   #set( $anyPending = 1 )
  #end
  #if( $acl.hasPermission("Project Document - Approve", $project) && (!$requestedSections.isEmpty()) ) 
   #set( $anyPending = 1 )
  #end
  #if( $acl.hasPermission("Project Download - Approve", $project) && (!$requestedDownloads.isEmpty()) ) 
   #set( $anyPending = 1 )
  #end
  #if( $loginUser.isProjectOwner($project) && $project.isLocked() ) 
   #set( $anyPending = 1 )
  #end
#end

#if( $anyAdmin )
<div id="adminoptions" class="app">

<h3>Admin Options</h3>
<ul>
#if( $hasProjectList )
 <li><a href="/servlets/ProjectList">Administer Projects</a></li>
#end
#if( $hasProjectGroupList )
 <li><a href="/servlets/ProjectGroupList">Administer Project Groups</a></li>
#end
#if( $hasCategoryList )
 <li><a href="/servlets/CategoryList">Administer Categories</a></li>
#end
#if( $hasUserList )
 <li><a href="/servlets/UserList">Administer Users</a></li>
 #end
#if( $hasUserGroupList )
 <li><a href="/servlets/UserGroupList">Administer User Groups</a></li>
 #end
 <li><a href="/servlets/RoleList">Administer Roles</a></li>
 <li><a href="/servlets/AuditLogList">Administrative Audit Log</a></li>
 
#if( $acl.hasPermission("Session - List", $currentDomain) )
 <li><a href="/servlets/SessionList">Active User Sessions</a></li>
 #end
#if( $acl.hasPermission("Helm - Administer") )
 <li><a href="/servlets/AdminUtils">Administrative Utilities</a></li>
 #end
 <li><a href="/servlets/BroadcastMessage">Set Broadcast Message</a></li>
</ul>
</div>
#end ## anyAdmin

#if( $anyPending )
<div id="pendingactions">
 <h3>Pending Actions</h3>
<ul>
##LOCKED PROJECTS
#foreach( $project in $projectsForUser )
 #if( $loginUser.isProjectOwner($project) && ($project.isLocked()) )
 <li><a href="$project.getProjectHome()">Project $project.getName() is Locked</a></li>
 #end
#end
## PROJECT APPROVAL
#set( $unapprovedProjects = $currentDomain.getUnapprovedProjects($acl) )
#if( $acl.hasPermission("Project - Approve", $currentDomain) && !$unapprovedProjects.isEmpty() )
     #set( $projectWord = "Projects" )
     #if( $unapprovedProjects.size() == 1 )
     #set( $projectWord = "Project" )
     #end

<li><a href="/servlets/ProjectApproval">Proposed $projectWord</a> ($unapprovedProjects.size())</li>
#end
## PROPOSED USERS
#foreach( $project in $projectsForUser )
  #set( $requestedRoles = $project.getNumberOfRequestedRoles() )

  #if( $acl.hasPermission("Role - Grant", $project) && (!$requestedRoles==0) ) 
     #set( $roleWord = "Roles" )
     #if( $requestedRoles == 1 )
     #set( $roleWord = "Role" )
     #end
<li><a href="$project.getProjectPageURL(ProjectMemberList)">Proposed $roleWord in Project $project.getWordMark()</a> ($requestedRoles)</li>
  #end
#end
## PROPOSED NEWS
#foreach( $project in $projectsForUser )
#set( $allRequestedNews = $project.getUnapprovedNews($acl) )

#set( $requestedNews = $allRequestedNews.getPage($paginated_page) )

  #if( $acl.hasPermission("Project News - Approve", $project) && (!$requestedNews.isEmpty()) ) 
     #set( $newsWord = "news )items"
     #if( $requestedNews.size() == 1 )
     #set( $newsWord = "news )item"
     #end
 <li><a href="$project.getProjectPageURL(ProjectNewsApproval)">Proposed $newsWord in Project $project.getWordMark()</a> ($requestedNews.size())</li>
  #end
#end
## PROPOSED DOCUMENT SECTIONS
#foreach( $project in $projectsForUser )
 #set( $requestedSections = $project.getUnapprovedSections() )
  #if( $acl.hasPermission("Project Document - Approve", $project) && (!$requestedSections.isEmpty()) ) 
     #set( $secWord = "document )sections"
     #if( $requestedSections.size() == 1 )
     #set( $secWord = "document )section"
     #end

 <li><a href="$project.getProjectPageURL(ProjectSectionApproval)">Proposed $secWord in Project $project.getWordMark()</a> ($requestedSections.size())</li>
  #end
#end
## PROPOSED DOCUMENTS
#foreach( $project in $projectsForUser )
 #set( $requestedDocuments = $project.getUnapprovedDocuments() )
  #if( $acl.hasPermission("Project Document - Approve", $project) && (!$requestedDocuments.isEmpty()) ) 
     #set( $docWord = "documents" )
     #if( $requestedDocuments.size() == 1 )
     #set( $docWord = "document" )
     #end
 <li><a href="$project.getProjectPageURL(ProjectDocumentApproval")">Proposed $docWord in Project $project.getWordMark()</a> ($requestedDocuments.size())</li>
  #end
#end
## PROPOSED DOWNLOADS
#foreach( $project in $projectsForUser )
 #set( $requestedDownloads = $project.getUnapprovedDownloads() )
  #if( $acl.hasPermission("Project Download - Approve", $project) && (!$requestedDownloads.isEmpty()) ) 
     #set( $dlWord = "downloads" )
     #if( $requestedDownloads.size() == 1 )
     #set( $dlWord = "downloads" )
     #end
 <li><a href="$project.getProjectPageURL(ProjectDownloadApproval)">Proposed $dlWord in Project $project.getWordMark()</a> ($requestedDownloads.size())</li>
    #end
#end
</ul>
</div>
#end ## anyPending
@


1.11
log
@first wave of ui revisions. expect minor breakage. working on it.
@
text
@d31 4
a34 1
#foreach( $project in $loginUser.getProjectsForUser() )
d101 1
a101 1
#foreach( $project in $loginUser.getProjectsForUser() )
d117 1
a117 1
#foreach( $project in $loginUser.getProjectsForUser() )
d129 1
a129 1
#foreach( $project in $loginUser.getProjectsForUser() )
d143 1
a143 1
#foreach( $project in $loginUser.getProjectsForUser() )
d155 1
a155 1
#foreach( $project in $loginUser.getProjectsForUser() )
d166 1
a166 1
#foreach( $project in $loginUser.getProjectsForUser() )
@


1.10
log
@getting rid of "tasks" nav; backing out of earlier ill-considered commit
@
text
@a60 3
<h2>
 #parse( "Nomen.vm" )
</h2>
@


1.9
log
@included "task nav" below headlines
@
text
@a63 3
#if( !$loginUser.isAnonymous() && $servletTaskBar.available($servletName))
#parse("$servletTaskBar.getPath($servletName)")
#end
@


1.8
log
@pulled admin options, added headlines
@
text
@d64 4
@


1.7
log
@html usage revision to synch with scarab
@
text
@d61 3
d96 1
a96 1
<div id="pendingactions" class="app">
@


1.6
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
@d60 1
a60 1
<div id="adminoptions">
d93 1
a93 1
<div id="pendingactions">
@


1.5
log
@There is no Project - Add action.
@
text
@d22 1
a22 1
#if( $acl.hasPermission("Project Role - Add", $currentDomain) )
d39 1
a39 1
  #if( $acl.hasPermission("Project Role - Grant", $project) && (!$requestedRoles==0) ) 
d116 1
a116 1
  #if( $acl.hasPermission("Project Role - Grant", $project) && (!$requestedRoles==0) ) 
@


1.4
log
@Implemented basic project group and category nesting.
@
text
@d1 1
a1 1
#if( $acl.hasPermission("Project - Add", $currentDomain) )
@


1.3
log
@html revisions
@
text
@d1 1
a1 1
#if( $acl.hasPermission("Project - List", $currentDomain) )
d13 1
a13 1
#if( $acl.hasPermission("ProjectGroup - List", $currentDomain) )
d17 4
d65 1
a65 1
 #end
d68 4
a71 1
 #end
@


1.2
log
@added link in AdminOptions to BroadcastMessage, for anyAdmin
Issue number:  2027
Obtained from:
Submitted by:
Reviewed by:
@
text
@d57 1
a57 1
<h4>Admin Options</h4>
d87 1
a87 1
 <h4>Pending Actions</h4>
@


1.1
log
@Adding Velocity templates.
@
text
@d78 1
a78 1
 <li><a href="/servlets/AdminUtils">Administrative Utilities</a> </li>
d80 1
@

