## version: $Id:  $
<!-- chef_resources_list.vm, use with org.sakaiproject.tool.content.ResourcesAction.java -->
<!-- this is the list template -->
#set($num = 0)
#set($removeCount = 0)
#set($moveCount = 0)
#set($copyCount = 0)
#set($rCount = 0)
#set($mCount = 0)
#set($cCount = 0)
<div class="portletBody">
	#set($itemsOnLine = 0)
	#if(!$dropboxMode)
		#if ($atHome && $atHome == $TRUE)
			#if($site.canRevise() || $showPermissions)
				<div class="navIntraTool">
					$tlang.getString("list.site")
					| <a href="#toolLink("ResourcesAction" "doShow_webdav")" title="$tlang.getString('dav.webdav')">$tlang.getString("dav.webdav").trim()</a> 
					#if($showPermissions)
					| <a href="#toolLinkParam("ResourcesAction" "doPermissions" "collectionId=$validator.escapeUrl(${site.id})")" title="$tlang.getString('list.sPerm')">$tlang.getString("list.sPerm").trim()</a>
					#end
				</div>
			#end
		#end 
	#end
	#if ($alertMessage)
		<br /><div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div class="clear" ></div>
	#end
	<form name="showForm" id="showForm" action="#toolForm("ResourcesAction")" method="post">
		<input type="hidden" name="source" id="source" value="0" />
		<input type="hidden" name="collectionId" id="collectionId" value="$validator.escapeHtml($collectionId)" />
		<input type="hidden" name="navRoot" id="navRoot" value="" />
		<input type="hidden" name="criteria" id="criteria" value="title" />
		<input type="hidden" name="sakai_action" id="sakai_action" value="" />
		######################  Page Title / Breadcrumbs  ##############

			<div class ="breadCrumb specialLink">
				<h3>
				$tlang.getString("gen.location")
				<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0"  alt="folder" />
				#foreach ($item in $collectionPath)
					#if($item.isLast())
						#if ($dropboxMode && $velocityCount == 1)
							$siteTitle $tlang.getString("gen.drop")
						#elseif($velocityCount == 1)
							$siteTitle $tlang.getString("gen.reso")
						#else
							$validator.escapeHtml("$item.name")
						#end
						#if($upOneLevel)
							<a href="#"
								onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$upOneLevel.id';document.getElementById('navRoot').value='$upOneLevel.root';document.getElementById('showForm').submit();"
								onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$upOneLevel.id';document.getElementById('navRoot').value='$upOneLevel.root';document.getElementById('showForm').submit();"
								title= "$tlang.getString('sh.one')">
							##<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=$validator.escapeUrl($upOneLevel.id)&navRoot=$validator.escapeUrl($upOneLevel.root)")" title= "$tlang.getString('sh.one')">
								<img src="/library/image/sakai/onelevelup.gif" border="0" alt ="$tlang.getString('sh.one')"/>
							</a>
						#end
					#else
						<a href="#" 
							onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$item.id';document.getElementById('navRoot').value='$item.root';document.getElementById('showForm').submit();"
							onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$item.id';document.getElementById('navRoot').value='$item.root';document.getElementById('showForm').submit();"
							title= "$tlang.getString('sh.go')">
						##<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=$validator.escapeUrl($item.id)&navRoot=$validator.escapeUrl($item.root)")" title ="$tlang.getString('sh.go')">
							#if ($dropboxMode && $velocityCount == 1)
								$siteTitle $tlang.getString("gen.drop")
							#elseif($velocityCount == 1)
								$siteTitle $tlang.getString("gen.reso")
							#else
								$validator.escapeHtml("$item.name")
							#end
						</a> /
						#set($upOneLevel = $item)
					#end
				#end
			</h3>
			</div>		

		#if($showRemoveAction || $showMoveAction || $showCopyAction)
			<div class="navIntraToolLink" >
				#set ($itemsOnLine = 0)
				#if($showRemoveAction)
					#if($itemsOnLine > 0)|#end
					<input id="removeButton" type="button" value="$tlang.getString("list.remove")"
						onclick="javascript:document.getElementById('sakai_action').value='doDeleteconfirm';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doDeleteconfirm';document.getElementById('showForm').submit();"
						disabled="disabled" alt="$tlang.getString("list.remove")" />
					#set ($itemsOnLine = $itemsOnLine + 1)
				#end
				#if($showMoveAction)
					#if($itemsOnLine > 0)|#end
					<input id="moveButton" type="button" value="$tlang.getString("list.move")"
						onclick="javascript:document.getElementById('sakai_action').value='doMove';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doMove';document.getElementById('showForm').submit();"
						disabled="disabled" alt="$tlang.getString("list.move")" />
					#set ($itemsOnLine = $itemsOnLine + 1)
				#end
				#if($showCopyAction)
					#if($itemsOnLine > 0)|#end
					<input id="copyButton" type="button" value="$tlang.getString("list.copyall")"
						onclick="javascript:document.getElementById('sakai_action').value='doCopy';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doCopy';document.getElementById('showForm').submit();"
						disabled="disabled" alt="$tlang.getString("list.copyall")" />
					#set ($itemsOnLine = $itemsOnLine + 1)
				#end
			</div>
		#end
		######################  Heirarchical list of resource folders/items  ##############
		<table class="listHier lines" cellspacing="0" border="0"  summary="$tlang.getString("sh.listsum")">
			######################  Column labels, sort controls, expand/collapse all  ##############
			<caption class="skip"  style="display:none">$tlang.getString("sh.listcap")</caption>
			<tr>
				<th id="expansion">
					#if ($expandallflag && "$expandallflag" == "$TRUE")
						<a href="#" onclick="javascript:document.getElementById('sakai_action').value='doUnexpandall';document.getElementById('collectionId').value='$collectionId';document.getElementById('showForm').submit();"
							onkeypress="javascript:document.getElementById('sakai_action').value='doUnexpandall';document.getElementById('collectionId').value='$collectionId';document.getElementById('showForm').submit();"
							title= "$tlang.getString('collapseall')">
						##<a href="#toolLinkParam("ResourcesAction" "doUnexpandall" "collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('collapseall')">
							<img src = "#imageLink("sakai/collapse-expand.gif")" border="0" title="$tlang.getString('collapseall')" alt="$tlang.getString('collapseall')" hspace="0" />
						</a>								 
					#else
						<a href="#"
							onclick="javascript:document.getElementById('sakai_action').value='doExpandall';document.getElementById('collectionId').value='$collectionId';document.getElementById('showForm').submit();"
							onkeypress="javascript:document.getElementById('sakai_action').value='doExpandall';document.getElementById('collectionId').value='$collectionId';document.getElementById('showForm').submit();"
							title= "$tlang.getString('expandall')">
						##<a href="#toolLinkParam("ResourcesAction" "doExpandall" "collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('expandall')">
							<img src = "#imageLink("sakai/expand-collapse.gif")" border="0" title="$tlang.getString('expandall')" alt="$tlang.getString('expandall')" hspace="0" />
						</a>								 
					#end
				</th>
				<th id="checkboxes">
					#if($showRemoveAction || $showMoveAction || $showCopyAction)
							##(gsilver) need a value atttribute for xhtml...
						<input type="checkbox" name="selectall" id="selectall" disabled="disabled" title="$tlang.getString("list.select")"
							onclick="javascript:toggleSelectAll(this, 'selectedMembers')"
							onkeypress="javascript:toggleSelectAll(this, 'selectedMembers')" />
					#end
				</th>
				<th id="title">
					<a href="#"
						onclick="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='title';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='title';document.getElementById('showForm').submit();"
						title= "$tlang.getString('sh.sorttit')">
					##<a href="#toolLinkParam("ResourcesAction" "doSort" "criteria=title&collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('sh.sorttit')"> 
						$tlang.getString("gen.title1")
						#if ($currentSortedBy.equals($resourceProperties.NamePropDisplayName)) 
							#if ($currentSortAsc.equals("true")) 
								<img src = "#imageLink("sakai/sortascending.gif")" border="0" title ="$tlang.getString('sh.sorttitas')" alt ="$tlang.getString('sh.sorttitas')" /> 
							#else 
								<img src = "#imageLink("sakai/sortdescending.gif")" border="0" title ="$tlang.getString('sh.sorttitdesc')" alt ="$tlang.getString('sh.sorttitdesc')" /> 
							#end 
						#end 
					</a>
				</th>
				<th id="actions">
					$tlang.getString("gen.actions")
				</th>
				<th id="access">
					$tlang.getString("gen.access")
				</th>
				<th id="creator">
					##<a href="#toolLinkParam("ResourcesAction" "doSort" "criteria=created%20by&collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('sh.sortcrea')"> 
					<a href="#"
						onclick="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='created by';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='created by';document.getElementById('showForm').submit();"
						title= "$tlang.getString('sh.sortaut')">
						$tlang.getString("gen.created")
						#if ($currentSortedBy.equals($resourceProperties.NamePropCreator)) 
							#if ($currentSortAsc.equals("true")) 
								<img src = "#imageLink("sakai/sortascending.gif")" border="0"  title ="$tlang.getString('sh.sortautas')"  alt ="$tlang.getString('sh.sortautas')" /> 
							#else 
								<img src = "#imageLink("sakai/sortdescending.gif")" border="0" title ="$tlang.getString('sh.sortautdesc')"  alt ="$tlang.getString('sh.sortautdesc')" /> 
							#end 
						#end 
					</a>
				</th>
				<th id="modified">
					<a href="#"
						onclick="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='last modified';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='last modified';document.getElementById('showForm').submit();"
						title= "$tlang.getString('sh.sortdate')">
					##<a href="#toolLinkParam("ResourcesAction" "doSort" "criteria=last%20modified&collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('sh.sortdate')"> 
						$tlang.getString("gen.last1")
						#if ($currentSortedBy.equals($resourceProperties.NamePropModifiedDate)) 
							#if ($currentSortAsc.equals("true")) 
								<img src = "#imageLink("sakai/sortascending.gif")" border="0"  title ="$tlang.getString('sh.sortdateas')"  alt ="$tlang.getString('sh.sortdateas')" /> 
							#else 
								<img src = "#imageLink("sakai/sortdescending.gif")" border="0" title ="$tlang.getString('sh.sortdatedesc')"  alt ="$tlang.getString('sh.sortdatedesc')" /> 
							#end 
						#end 
					</a>
				</th>
				<th id="size">
					##<a href="#toolLinkParam("ResourcesAction" "doSort" "criteria=size&collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('sh.sortsize')"> 
					<a href="#"
						onclick="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='size';document.getElementById('showForm').submit();"
						onkeypress="javascript:document.getElementById('sakai_action').value='doSort';document.getElementById('collectionId').value='$collectionId';document.getElementById('criteria').value='size';document.getElementById('showForm').submit();"
						title= "$tlang.getString('sh.sortsize')">
						$tlang.getString("gen.size")
						#if ($currentSortedBy.equals($resourceProperties.NamePropContentLength)) 
							#if ($currentSortAsc.equals("true")) 
								<img src = "#imageLink("sakai/sortascending.gif")" border="0"  title ="$tlang.getString('sh.sortsizeas')"  alt ="$tlang.getString('sh.sortsizeas')" /> 
							#else 
								<img src = "#imageLink("sakai/sortdescending.gif")" border="0" title ="$tlang.getString('sh.sortsizedesc')"  alt ="$tlang.getString('sh.sortsizedesc')" /> 
							#end 
						#end 
					</a>
				</th>
			</tr>
			#foreach($root in $this_site)
				############################### Show top level folder #################
				<tr>
					<td headers="expansion">
					</td>
					<td headers="checkboxes">
					</td>
					<td headers="title" class="specialLink">
						<h3> 
							#if ($root.isFolder())
								#if ($root.canRead())
									#if ($root.isEmpty())
										<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
									#elseif ($expandedCollections.contains($root.Id))
											<img src = "#imageLink("sakai/dir_openroot.gif")" border="0" alt="$tlang.getString('sh.close')" />
											<a href="#"
											onclick="javascript:document.getElementById('sakai_action').value='doCollapse_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
											title= "$tlang.getString('sh.close')">
										##<a href="#toolLinkParam("ResourcesAction" "doCollapse_collection" "collectionId=$validator.escapeUrl($root.Id)")" title="$tlang.getString('sh.close')">
										</a>
									#elseif($root.isTooBig())
										<img src = "#imageLink("sakai/dir_unexpand.gif")" border="0" title="$tlang.getString('list.toobig')" alt="$tlang.getString('list.toobig')" />
									#else
										<a href="#"
											onclick="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
											onkeypress="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
											title= "$tlang.getString('sh.open')">
										##<a href="#toolLinkParam("ResourcesAction" "doExpand_collection" "collectionId=$validator.escapeUrl($root.Id)")" title="$tlang.getString('sh.open')">
											<img src = "#imageLink("sakai/dir_closedplus.gif")" border="0" title="$tlang.getString('sh.open')" alt="$tlang.getString('sh.open')" />
										</a>
									#end
									<a href="#"
										onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$root.id';document.getElementById('navRoot').value='$validator.escapeUrl($root.root)';document.getElementById('showForm').submit();"
										onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$root.id';document.getElementById('navRoot').value='$validator.escapeUrl($root.root)';document.getElementById('showForm').submit();"
										title= "$tlang.getString('sh.go')">
									##<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=${validator.escapeUrl(${root.id})}&navRoot=$validator.escapeUrl($root.root)")" title="$tlang.getString('sh.go')">
										$validator.escapeHtml(${root.name})
									</a>
								#else
									<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
									$validator.escapeHtml(${root.name})
								#end
							#end
						</h3>	
					</td>
					<td headers="actions">
						#set($actionLinkString = " ")
						######################  Add Action Links at Top Level  ##############
						#if($root && ($root.canAddItem() || $root.canAddFolder()))
							<div name="enabledActionLinks" class="itemAction">
								#set ($itemsOnLine = 0)
								####### deal with adding item/folder
								#if($root.canAddItem())
									#if ($itemsOnLine > 0)
										|
										#set($actionLinkString = "$actionLinkString | ")
									#end
									#set ($itemsOnLine = $itemsOnLine + 1)
									<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${root.id})")" title ="$tlang.getString('list.add.title')">$tlang.getString("list.add").trim()</a>
									#set($actionLinkString = "$actionLinkString$tlang.getString('list.add')")
								#end
								####### deal with editing/viewing file/folder information
								##if ($atHome && !$atHome == $TRUE)
									#if($root.canRevise())
										#if ($itemsOnLine > 0)
											|
											#set($actionLinkString = "$actionLinkString | ")
										#end
										#set ($itemsOnLine = $itemsOnLine + 1)
										<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($root.id)&collectionId=$validator.escapeUrl($root.container)")" title="$tlang.getString('list.edit.title')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.edit").trim()</a>
										#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
									#elseif ($root.canRead())
										#if ($itemsOnLine > 0)
											|
											#set($actionLinkString = "$actionLinkString | ")
										#end
										#set ($itemsOnLine = $itemsOnLine + 1)
										<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($root.id)&collectionId=$validator.escapeUrl($root.container)")" title="$tlang.getString('list.props.title')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.props").trim()</a>
										#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
									#end
								##end
								####### deal with reordering contents of folders
								#if($root.canRevise() && $root.isSortable())
									#if ($itemsOnLine > 0)
										|
										#set($actionLinkString = "$actionLinkString | ")
									#end
									#set ($itemsOnLine = $itemsOnLine + 1)
									<a href="#toolLinkParam("ResourcesAction" "doReorder" "folderId=$validator.escapeUrl(${root.id})")" title ="$tlang.getString('list.reorder')">$tlang.getString("list.reorder").trim()</a>
									#set($actionLinkString = "$actionLinkString$tlang.getString('list.reorder')")
								#end
								####### deal with site/folder permissions
								#if($showPermissions && "$!inMyWorkspace" == "false")
								##if($root.canUpdate() && "$!inMyWorkspace" == "false")
									#if ("$!atHome" != "$!TRUE")
										#if ($itemsOnLine > 0)
											|
											#set($actionLinkString = "$actionLinkString | ")
										#end
										#set ($itemsOnLine = $itemsOnLine + 1)
										<a href="#toolLinkParam("ResourcesAction" "doFolder_permissions" "collectionId=$validator.escapeUrl(${root.id})")" title="$tlang.getString('list.fPerm.title')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.fPerm").trim()</a>
										#set($actionLinkString = "$actionLinkString$tlang.getString('list.fPerm')")
									#end
								#end
								####### deal with Pasting copied items 
								#if($copyFlag && $copyFlag.equals($TRUE) && $root.canAddItem() && ! $root.isHighlighted())
									#if ($itemsOnLine > 0)
										|
										#set($actionLinkString = "${actionLinkString} | ")
									#end
									#set ($itemsOnLine = $itemsOnLine + 1)
									<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doPasteitems" "collectionId=${validator.escapeUrl(${root.id})}")" title="$tlang.getString('list.paste1')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();">$tlang.getString("list.paste1").trim()</a>
									#set($actionLinkString = "${actionLinkString}$tlang.getString('list.paste1')")
								#end
								####### deal with Pasting moved items 
								#if($moveFlag && $moveFlag.equals($TRUE) && $root.canAddItem() && ! $root.isHighlighted())
									#if ($itemsOnLine > 0)
										|
										#set($actionLinkString = "${actionLinkString} | ")
									#end
									#set ($itemsOnLine = $itemsOnLine + 1)
									<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doMoveitems" "collectionId=${validator.escapeUrl(${root.id})}")" title="$tlang.getString("list.paste3")" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste3").trim()</a>
									#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste3')")
								#end
							</div>
							<div name="disabledActionLinks" class="itemAction"  style="display:none">
								$actionLinkString
							</div>
						#end
						######################  End of Add Items/Folders at Top Level  ##############
					</td>
					<td colspan="4">
					</td>
					#*
					<td headers="access" title="$root.effectiveGroups">
						#if($root.isPubviewInherited() || $root.isPubview())
							$tlang.getString("access.public")
						#elseif($root.effectiveAccess == $INHERITED_ACCESS || $root.effectiveAccess == $SITE_ACCESS)
							$tlang.getString("access.site")
						#elseif($root.effectiveAccess == $GROUP_ACCESS)
							$tlang.getString("access.group")
						#end
					</td>
					*#
				</tr>	
				#set($collectionMembers = $root.Members)
				######################  No items message  ##############
				#if ($root.isLocal() && $collectionMembers.isEmpty())
					<tr>
						<td colspan="2"></td>
						<td colspan="5">
							<p class="instruction">
								$tlang.getString("sh.no")
								#if($dropboxMode)$tlang.getString("sh.drop")#else$tlang.getString("sh.reso")#end
								$tlang.getString("sh.item")
							</p>
						</td>
					</tr>		
				#else
					######################  Display individual items/folders  ##############
					#set ($unit ="em")
					#foreach ($member in $collectionMembers)
						#set ($width = "$!{member.depth}$unit")
						#set ($widthSp = (${member.depth} + 1) )
						#set ($widthSpDo = "$widthSp$unit")
						#if ($member.depth==1)	
							#set ($margin="margin-left:0")
						#else
							#set ($margin="margin-left:2em")
							#set ($marginAction="margin-left:4.7em")
						#end
						#if ($member.depth > 3)
							#set($headerDepth = 6)
						#else
							#set($headerDepth =$member.depth + 3)
						#end
						<tr
							#set ($copy="false")
							#set ($move="false")
							#if($copyFlag && $member.isHighlighted())
								class="selectedCopy#if(!$member.isAvailable()) inactive#end"
								title ="$tlang.getString("list.copied")"
								#set ($copy="true")
							#elseif($moveFlag && $member.isHighlighted())
								class="selectedMove#if(!$member.isAvailable()) inactive#end" 
								title ="$tlang.getString("list.moved")"
								#set ($move="true")
							#elseif(!$member.isAvailable())
								class="inactive"
							#end
							>
							######################  Item title and action links  ##############
							#if($member.inheritsHighlighted())
								<td headers="expansion">
								</td>
							#elseif($copy=="true")
								<td headers="expansion"
									class="selected">
									<span class="skip">
										$tlang.getString("list.copied")
									</span>
									<img src="/library/image/sakai/arrowhere.gif" border="0" alt ="" style="margin-top:.2em" />
								</td>	
							#elseif($move=="true")
								<td headers="expansion"
									class="selected">
									<span class="skip">
										$tlang.getString("list.moved")
									</span>
									<img src="/library/image/sakai/arrowhere.gif" border="0" alt ="" style="margin-top:.2em" />
								</td>	
							#else
								<td headers="expansion">
								</td>
							#end	
							
							<td headers="checkboxes">
								#if($member.canDelete() || $member.canRead())
									<input type="checkbox" name="selectedMembers" id="list$num" 
										#if($selectedItems.contains("$member.id"))checked="checked"#end
										onclick="#if($member.canDelete())adjustCount(this, 'removeCount', 'removeButton');adjustCount(this, 'moveCount', 'moveButton');#end#if($member.canRead())adjustCount(this, 'copyCount', 'copyButton');#end"
										onkeypress="#if($member.canDelete())adjustCount(this, 'removeCount', 'removeButton');adjustCount(this, 'moveCount', 'moveButton');#end#if($member.canRead())adjustCount(this, 'copyCount', 'copyButton');#end"
										value="$member.id" /><label for="list$num" class="skip">Select</label>
									#set($num = $num + 1)
									#if($member.canDelete())
										#set($removeCount = $removeCount + 1)
										#set($moveCount = $moveCount + 1)
										#if($selectedItems.contains($member.id))
											#set($rCount = $rCount + 1)
											#set($mCount = $mCount + 1)
										#end
									#end
									#if($member.canRead())
										#set($copyCount = $copyCount + 1)
										#if($selectedItems.contains($member.id))
											#set($cCount = $cCount + 1)
										#end
									#end
								#end
							</td>
							<td headers="title" style="text-indent:$width" class="specialLink">
								<h$headerDepth>
									#if ($member.isFolder())
										#if ($member.canRead())
											#if ($member.isEmpty())
												<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
											#elseif ($expandedCollections.contains($member.Id))
												<a href="#"
													onclick="javascript:document.getElementById('sakai_action').value='doCollapse_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
													title= "$tlang.getString('sh.close')">
													<img src = "#imageLink("sakai/dir_openminus.gif")" border="0" title="$tlang.getString('sh.close')" alt="$tlang.getString('sh.close')" />
												</a>
											#elseif($member.isTooBig())
												<img src = "#imageLink("sakai/dir_unexpand.gif")" border="0" title="$tlang.getString('list.toobig')" alt="$tlang.getString('list.toobig')" />
											#else
												<a href="#"
													onclick="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
													onkeypress="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
													title= "$tlang.getString('sh.open')">
													<img src = "#imageLink("sakai/dir_closedplus.gif")" border="0" title="$tlang.getString('sh.open')" alt="$tlang.getString('sh.open')" />
												</a>
											#end
											<a href="#"
												onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$member.id';document.getElementById('navRoot').value='$member.root';document.getElementById('showForm').submit();"
												onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$member.id';document.getElementById('navRoot').value='$member.root';document.getElementById('showForm').submit();"
												title= "$tlang.getString('sh.go')">
												$validator.escapeHtml(${member.name})
											</a>
										#else
											<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
											$validator.escapeHtml(${member.name})
										#end
									#else
										#if ($member.canRead())
											#if ($member.hasCopyrightAlert())
												## if there is a copyright alert, show the alert page first
												<a href="#"
													title="$tlang.getString('gen.copycomf') $tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
													onclick="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false"
													onkeypress="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false"
												>
												#else
												<a href="${member.url}" target="${member.target}"
													title="$tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
												>
											#end
											<img src = "#imageLink($contentTypeImageService.getContentTypeImage($member.type))" border= "0" alt ="" hspace="0" />
											</a>
											#if($member.isLocked())
												<img src="#imageLink("sakai/lock.gif")" border="0"  alt="locked" />
											#end
											#if ($member.hasCopyrightAlert())
												## if there is a copyright alert, show the alert page first
												<a href="#"
													title="$tlang.getString('gen.copycomf') $tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
													onclick="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false;"
													onkeypress="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false;"
												>
													$validator.escapeHtml($member.name)
												</a>
												&#169;
											#else
												<a href="$member.url" target="$member.target"
													title="$tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
												>
													$validator.escapeHtml($member.name)
												</a>
											#end
										#else
											 <img src = "#imageLink($contentTypeImageService.getContentTypeImage($member.type))" border="0" alt ="" hspace="0" />
											 #if($member.isLocked())
												<img src = "#imageLink("sakai/lock.gif")" border="0"  alt="locked" />
											#end
											$validator.escapeHtml($member.name)
											#if ($member.hasCopyrightAlert())
												&#169;
											#end
										#end
									#end
								</h$headerDepth>	
							</td>
							<td headers="actions">
								#set($actionLinkString = " ")
								<div name="enabledActionLinks" class="itemAction">
									#if($member.isFolder())
										#set ($itemsOnLine = 0)
										####### deal with adding item/folder
										#if($member.canAddItem())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${member.id})")" title="$tlang.getString('list.add.title')">$tlang.getString("list.add").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.add')")
										#end
										####### deal with viewing/editing file/folder information
										#if ($member.canRevise())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.edit.title')">$tlang.getString("list.edit").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
										#elseif ($member.canRead())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.props.title')">$tlang.getString("list.props").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
										#end
										####### deal with reordering contents of folders
										#if($member.canRevise() && $member.isSortable())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doReorder" "folderId=$validator.escapeUrl(${member.id})")" title ="$tlang.getString('list.reorder')">$tlang.getString("list.reorder").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.reorder')")
										#end
										####### deal with folder permissions
										#if($showPermissions && "$!inMyWorkspace" == "false")
										##if($member.canUpdate() && "$!inMyWorkspace" == "false")
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doFolder_permissions" "collectionId=$validator.escapeUrl(${member.id})")" title="$tlang.getString('list.fPerm.title')">$tlang.getString("list.fPerm").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.fPerm')")
										#end
										####### deal with Pasting copied items  3
										#if($copyFlag && $copyFlag.equals($TRUE) && $member.canAddItem() && ! $member.isHighlighted())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doPasteitems" "collectionId=${validator.escapeUrl(${member.id})}")" title="$tlang.getString('list.paste1')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste1").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste1')")
										#end
										####### deal with Pasting moved items  3
										#if($moveFlag && $moveFlag.equals($TRUE) && $member.canAddItem() && ! $member.isHighlighted())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doMoveitems" "collectionId=${validator.escapeUrl(${member.id})}")" title="$tlang.getString("list.paste3")" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste3").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste3')")
										#end
									#else
										#set ($itemsOnLine = 0)
										####### deal with duplicating item
										#if($member.canRead() && $member.canAddItem())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doPasteitem" "itemId=${validator.escapeUrl(${member.id})}&collectionId=${validator.escapeUrl(${member.container})}")" title="$tlang.getString('list.dup')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.dup").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.dup')")
										#end
										####### deal with viewing/editing file/folder information
										#if ($member.canRevise())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.edit.title')">$tlang.getString("list.edit").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
										#elseif ($member.canRead())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.props.title')">$tlang.getString("list.props").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
										#end
									#end
								</div>
								<div name="disabledActionLinks" class="itemAction"  style="display:none">
									$actionLinkString
								</div>
							</td>
							######################  Item/folder properties  ##############
							#set($effectiveAccess = $member.effectiveAccess)
							<td headers="access" title="$member.effectiveGroups">
								#if($member.isPubviewInherited() || $member.isPubview())
									$tlang.getString("access.public")
								#elseif($member.isInDropbox())
									$tlang.getString("access.dropbox")
								#elseif("$effectiveAccess" == "$INHERITED_ACCESS" || "$effectiveAccess" == "$SITE_ACCESS")
									$tlang.getString("access.site")
								#elseif("$effectiveAccess" == "$GROUP_ACCESS")
									$tlang.getString("access.group")
								#end
							</td>
							<td headers="creator">
								$member.createdBy
							</td>
							<td headers="modified">
								$member.ModifiedTime
							</td>
							<td headers="size">
								$member.size
							</td>
						</tr>
					#end
				#end
			#end ## foreach $root in $this_site
		
			############################################# Begin "Other sites" section
			#if ("$!atHome" == "$!TRUE")
			#if($allowed_to_see_other_sites)
				#if("$!show_other_sites" == "true")
					<tr>
						<th colspan="8">
						<h3>
							<a href="#"
								onclick="javascript:document.getElementById('sakai_action').value='doHideOtherSites';document.getElementById('showForm').submit();"
								onkeypress="javascript:document.getElementById('sakai_action').value='doHideOtherSites';document.getElementById('showForm').submit();"
								title= "$tlang.getString('list.hide')">
							##<a href="#toolLink("ResourcesAction" "doHideOtherSites")" title= "$tlang.getString('list.hide')">
								<img src="#imageLink("sakai/collapse.gif")" alt="$tlang.getString('list.hide')" border="0" align="top" />
								$validator.escapeHtml("$tlang.getString('list.hide')")
							</a>
						</h3>
						</th>
					</tr>
					################################################################ Begin Paging widgets
					#if($!allMsgNumber && $allMsgNumberInt && $allMsgNumberInt > 5)
						<tr class="exclude">
							<td colspan="8">
								<div class="navPanel">
								<div class="listNav">
									<div class="instruction" style="margin-bottom:.3em;">Viewing $topMsgPos - $btmMsgPos of $allMsgNumber items</div>
									#if ("$pagesize" != "0")
										#if ($goPPButton == "true")
											<input type="button" name="List_first" value="|&lt;" title="First" onclick="javascript: document.getElementById('sakai_action').value='doList_first';document.getElementById('showForm').submit();" />
										#else
											<input type="button" name="List_first" value="|&lt;" disabled="disabled" />
										#end
										#if ($goPPButton == "true")
											<input type="button" name="List_prev" value="&lt;" title="Previous $pagesize" onclick="javascript: document.getElementById('sakai_action').value='doList_prev';document.getElementById('showForm').submit();" />
										#else
											<input type="button" name="List_prev" value="&lt;" disabled="disabled" />
										#end
									#end
									<!-- $pagesize  "$pagesize" -->
									<select name="selectPageSize" onchange="javascript:blur(); document.getElementById('sakai_action').value='doChange_pagesize';document.getElementById('showForm').submit();">
										<option value="5"#if("$pagesize" == "5") selected="selected"#end>$tlang.getString("lis.show5")</option>
										<option value="10"#if("$pagesize" == "10") selected="selected"#end>$tlang.getString("lis.show10")</option>
										<option value="20"#if("$pagesize" == "20") selected="selected"#end>$tlang.getString("lis.show20")</option>
										<option value="50"#if("$pagesize" == "50") selected="selected"#end>$tlang.getString("lis.show50")</option>
										<option value="100"#if("$pagesize" == "100") selected="selected"#end>$tlang.getString("lis.show100")</option>
										<option value="200"#if("$pagesize" == "200") selected="selected"#end>$tlang.getString("lis.show200")</option>
									</select>
									#if ("$pagesize" != "0")
										#if ($goNPButton == "true")
											<input type="button" name="List_next" value="&gt;" title="Next $pagesize" onclick="javascript: document.getElementById('sakai_action').value='doList_next';document.getElementById('showForm').submit();" />
										#else
											<input type="button" name="List_next" value="&gt;" disabled="disabled" />
										#end
										#if ($goNPButton == "true")
											<input type="button" name="List_last" value="&gt;|" title="Last" onclick="javascript: document.getElementById('sakai_action').value='doList_last';document.getElementById('showForm').submit();" />
										#else
											<input type="button" name="List_last" value="&gt;|" disabled="disabled" />
										#end
									#end
								</div></div>
							</td>
						</tr>
					#end
					################################################################ Eng Paging widgets
					#foreach($root in $other_sites)
						############################### Show top level folder #################
						<tr>
							<td headers="expansion">
							</td>
							<td headers="checkboxes">
							</td>
							<td headers="title" class="specialLink">
								<h3>
									#if ($root.isFolder())
										#if ($root.canRead())
											#if ($root.isEmpty())
												<img src = "#imageLink("sakai/dir_closed.gif")" border="0"  alt="folder" />
											#elseif ($expandedCollections.contains($root.Id))
												<a href="#"
													onclick="javascript:document.getElementById('sakai_action').value='doCollapse_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
													title= "$tlang.getString('sh.close')">
													<img src = "#imageLink("sakai/dir_openminus.gif")" border="0" title="$tlang.getString('sh.close')" alt="$tlang.getString('sh.close')" />
												</a>
											#elseif($root.isTooBig())
												<img src = "#imageLink("sakai/dir_unexpand.gif")" border="0" title="$tlang.getString('list.toobig')" alt="$tlang.getString('list.toobig')" />
											#else
												<a href="#"
													onclick="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
													onkeypress="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$root.Id';document.getElementById('showForm').submit();"
													title= "$tlang.getString('sh.open')">
													<img src = "#imageLink("sakai/dir_closedplus.gif")" border="0" title="$tlang.getString('sh.open')" alt="$tlang.getString('sh.open')" />
												</a>
											#end
											<a href="#"
												onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$root.id';document.getElementById('navRoot').value='$root.root';document.getElementById('showForm').submit();"
												onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$root.id';document.getElementById('navRoot').value='$root.root';document.getElementById('showForm').submit();"
												title= "$tlang.getString('sh.go')">
												$validator.escapeHtml(${root.name})
											</a>
										#else
											<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
											$validator.escapeHtml(${root.name})
										#end
									#end
								</h3>	
							</td>
							<td headers="actions">
								#set($actionLinkString = " ")
								######################  Add Action Links at Top Level  ##############
								#if($root && ($root.canAddItem() || $root.canAddFolder()))
									<div name="enabledActionLinks" class="itemAction">
										#set ($itemsOnLine = 0)
										####### deal with adding item/folder
										#if($root.canAddItem())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${root.id})")" title ="$tlang.getString('list.add.title')">$tlang.getString("list.add").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.add')")
										#end
										####### deal with editing/viewing file/folder information
										##if ($atHome && !$atHome == $TRUE)
											#if($root.canRevise())
												#if ($itemsOnLine > 0)
													|
													#set($actionLinkString = "$actionLinkString | ")
												#end
												#set ($itemsOnLine = $itemsOnLine + 1)
												<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($root.id)&collectionId=$validator.escapeUrl($root.container)")" title="$tlang.getString('list.edit.title')">$tlang.getString("list.edit").trim()</a>
												#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
											#elseif ($root.canRead())
												#if ($itemsOnLine > 0)
													|
													#set($actionLinkString = "$actionLinkString | ")
												#end
												#set ($itemsOnLine = $itemsOnLine + 1)
												<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($root.id)&collectionId=$validator.escapeUrl($root.container)")" title="$tlang.getString('list.props.title')">$tlang.getString("list.props").trim()</a>
												#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
											#end
										##end
										####### deal with Pasting copied items 
										#if($copyFlag && $copyFlag.equals($TRUE) && $root.canAddItem() && ! $root.isHighlighted())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doPasteitems" "collectionId=${validator.escapeUrl(${root.id})}")" title="$tlang.getString('list.paste1')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste1").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste1')")
										#end
										####### deal with Pasting moved items 
										#if($moveFlag && $moveFlag.equals($TRUE) && $root.canAddItem() && ! $root.isHighlighted())
											#if ($itemsOnLine > 0)
												|
												#set($actionLinkString = "$actionLinkString | ")
											#end
											#set ($itemsOnLine = $itemsOnLine + 1)
											<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doMoveitems" "collectionId=${validator.escapeUrl(${root.id})}")" title="$tlang.getString("list.paste3")" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste3").trim()</a>
											#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste3')")
										#end
									</div>
									<div name="disabledActionLinks" class="itemAction"  style="display:none">
										$actionLinkString
									</div>
								#end
								######################  End of Add Items/Folders at Top Level  ##############
							</td>
							<td colspan="4">
							</td>
							#*
							<td headers="access" title="$root.effectiveGroups">
								#if($root.isPubviewInherited() || $root.isPubview())
									$tlang.getString("access.public")
								#elseif("$root.effectiveAccess" == "$INHERITED_ACCESS" || "$root.effectiveAccess" == "$SITE_ACCESS")
									$tlang.getString("access.site")
								#elseif("$root.effectiveAccess" == "$GROUP_ACCESS")
									$tlang.getString("access.group")
								#end
							</td>
							*#
						</tr>	
						#set($collectionMembers = $root.Members)
						######################  No items message  ##############
						#if ($root.isLocal() && $collectionMembers.isEmpty())
							<tr>
								<td></td>
								<td></td>
								<td  colspan="5">
									<p class="instruction">
										$tlang.getString("sh.no")
										#if($dropboxMode)$tlang.getString("sh.drop")#else$tlang.getString("sh.reso")#end
										$tlang.getString("sh.item")
									</p>
								</td>
							</tr>		
						#else
							######################  Display individual items/folders  ##############
							#set ($unit ="em")
							#foreach ($member in $collectionMembers)
								#set ($width = "$!{member.depth}$unit")
								#set ($widthSp = (${member.depth} + 1) )
								#set ($widthSpDo = "$widthSp$unit")
								#if ($member.depth==1)	
									#set ($margin="margin-left:0")
								#else
									#set ($margin="margin-left:2em")
									#set ($marginAction="margin-left:4.7em")
								#end
								#if ($member.depth > 3)
									#set($headerDepth = 6)
								#else
									#set($headerDepth =$member.depth + 3)
								#end
								<tr
									#set ($copy="false")
									#set ($move="false")
									#if($copyFlag && $member.isHighlighted())
										class="selectedCopy#if(!$member.isAvailable()) inactive#end"
										title ="$tlang.getString("list.copied")"
										#set ($copy="true")
									#elseif($moveFlag && $member.isHighlighted())
										class="selectedMove#if(!$member.isAvailable()) inactive#end" 
										title ="$tlang.getString("list.moved")"
										#set ($move="true")
									#elseif(!$member.isAvailable())
										class="inactive"
									#end
									>
									######################  Item title and action links  ##############
									#if($member.inheritsHighlighted())
										<td headers="expansion">
										</td>
									#elseif($copy=="true")
										<td headers="expansion"
											class="selected">
											<span class="skip">
												$tlang.getString("list.copied")
											</span>
											<img src="/library/image/sakai/arrowhere.gif" border="0" alt ="" style="margin-top:.2em" />
										</td>	
									#elseif($move=="true")
										<td headers="expansion"
											class="selected">
											<span class="skip">
												$tlang.getString("list.moved")
											</span>
											<img src="/library/image/sakai/arrowhere.gif" border="0" alt ="" style="margin-top:.2em" />
										</td>	
									#else
										<td headers="expansion">
										</td>
									#end	

									<td headers="checkboxes">
										#if($member.canDelete() || $member.canRead())
											<input type="checkbox" name="selectedMembers" id="list$num" 
												#if($selectedItems.contains("$member.id"))checked="checked"#end
												onclick="#if($member.canDelete())adjustCount(this, 'removeCount', 'removeButton');adjustCount(this, 'moveCount', 'moveButton');#end#if($member.canRead())adjustCount(this, 'copyCount', 'copyButton');#end"
												onkeypress="#if($member.canDelete())adjustCount(this, 'removeCount', 'removeButton');adjustCount(this, 'moveCount', 'moveButton');#end#if($member.canRead())adjustCount(this, 'copyCount', 'copyButton');#end"
												value="$member.id" /><label for="list$num" class="skip">Select</label>
											#set($num = $num + 1)
											#if($member.canDelete())
												#set($removeCount = $removeCount + 1)
												#set($moveCount = $moveCount + 1)
												#if($selectedItems.contains($member.id))
													#set($rCount = $rCount + 1)
													#set($mCount = $mCount + 1)
												#end
											#end
											#if($member.canRead())
												#set($copyCount = $copyCount + 1)
												#if($selectedItems.contains($member.id))
													#set($cCount = $rCount + 1)
												#end
											#end
										#end
									</td>
									<td headers="title" style="text-indent:$width" class="specialLink">
										<h$headerDepth>
										#if ($member.isFolder())
												#if ($member.canRead())
													#if ($member.isEmpty())
														<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
													#elseif($expandedCollections.contains($member.Id))
														<a href="#"
															onclick="javascript:document.getElementById('sakai_action').value='doCollapse_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
															title= "$tlang.getString('sh.close')">
														##<a href="#toolLinkParam("ResourcesAction" "doCollapse_collection" "collectionId=$validator.escapeUrl($member.Id)")" title="$tlang.getString('sh.close')">
															<img src = "#imageLink("sakai/dir_openminus.gif")" border="0" title="$tlang.getString('sh.close')" alt="$tlang.getString('sh.close')" />
														</a>
													#elseif($member.isTooBig())
														<img src = "#imageLink("sakai/dir_unexpand.gif")" border="0" title="$tlang.getString('list.toobig')" alt="$tlang.getString('list.toobig')" />
													#else
														<a href="#"
															onclick="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
															onkeypress="javascript:document.getElementById('sakai_action').value='doExpand_collection';document.getElementById('collectionId').value='$member.Id';document.getElementById('showForm').submit();"
															title= "$tlang.getString('sh.open')">
														##<a href="#toolLinkParam("ResourcesAction" "doExpand_collection" "collectionId=$validator.escapeUrl($member.Id)")" title="$tlang.getString('sh.open')">
															<img src = "#imageLink("sakai/dir_closedplus.gif")" border="0" title="$tlang.getString('sh.open')" alt="$tlang.getString('sh.open')" />
														</a>
													#end
													<a href="#"
														onclick="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$member.id';document.getElementById('navRoot').value='$member.root';document.getElementById('showForm').submit();"
														onkeypress="javascript:document.getElementById('sakai_action').value='doNavigate';document.getElementById('collectionId').value='$member.id';document.getElementById('navRoot').value='$member.root';document.getElementById('showForm').submit();"
														title= "$tlang.getString('sh.go')">
													##<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=${validator.escapeUrl(${member.id})}&navRoot=$validator.escapeUrl($member.root)")" title="$tlang.getString('sh.go')">
														$validator.escapeHtml(${member.name})
													</a>
												#else
													<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="folder" />
													$validator.escapeHtml(${member.name})
												#end
											#else
												#if ($member.canRead())
													#if ($member.hasCopyrightAlert())
														## if there is a copyright alert, show the alert page first
														<a href="#" 
															title="$tlang.getString('gen.copycomf') $tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"	
															onclick="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false"
															onkeypress="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false"
														>
														#else
														<a href="${member.url}" target="${member.target}">
													#end
													<img src = "#imageLink($contentTypeImageService.getContentTypeImage($member.type))" border= "0" alt ="" hspace="0" />
													</a>
													#if($member.isLocked())
														<img src = "#imageLink("sakai/lock.gif")" border="0"  alt="locked" />
													#end
													#if ($member.hasCopyrightAlert())
														## if there is a copyright alert, show the alert page first
														<a href="#" 
															title="$tlang.getString('gen.copycomf') $tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
															onclick="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false;"
															onkeypress="openCopyrightWindow('${member.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false;"
														>
															$validator.escapeHtml($member.name)
														</a>
														&#169;
													#else
														<a href="$member.url" target="$member.target"
															title="$tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($member.type)  [$tlang.getString('gen.newwin')]"
														>
															$validator.escapeHtml($member.name)
														</a>
													#end
												#else
													 <img src = "#imageLink($contentTypeImageService.getContentTypeImage($member.type))" border="0" alt ="" hspace="0" />
													#if($member.isLocked())
														<img src = "#imageLink("sakai/lock.gif")" border="0"  alt="locked" />
													#end
													$validator.escapeHtml($member.name)
													#if ($member.hasCopyrightAlert())
														&#169;
													#end
												#end
											#end
										</h$headerDepth>	
									</td>
									<td headers="actions">
										#set($actionLinkString = " ")
										<div name="enabledActionLinks" class="itemAction">
											#if($member.isFolder())
												#set ($itemsOnLine = 0)
												####### deal with adding item/folder
												#if($member.canAddItem())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${member.id})")" title="$tlang.getString('list.add.title')">$tlang.getString("list.add").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.add')")
												#end
												####### deal with viewing/editing file/folder information
												#if ($member.canRevise())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.edit')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.edit.title").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
												#elseif ($member.canRead())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.props.title')">$tlang.getString("list.props").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
												#end
												####### deal with Pasting copied items  3
												#if($copyFlag && $copyFlag.equals($TRUE) && $member.canAddItem() && ! $member.isHighlighted())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doPasteitems" "collectionId=${validator.escapeUrl(${member.id})}")" title="$tlang.getString('list.paste1')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste1").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste1')")
												#end
												####### deal with Pasting moved items 
												#if($moveFlag && $moveFlag.equals($TRUE) && $member.canAddItem() && ! $member.isHighlighted())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a class="highlightlink" href="#toolLinkParam("ResourcesAction" "doMoveitems" "collectionId=${validator.escapeUrl(${member.id})}")" title="$tlang.getString("list.paste3")" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.paste3").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.paste3')")
												#end
											#else
												#set ($itemsOnLine = 0)
												####### deal with duplicating item
												#if($member.canRead() && $member.canAddItem())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doPasteitem" "itemId=${validator.escapeUrl(${member.id})}&collectionId=${validator.escapeUrl(${member.container})}")" title="$tlang.getString('list.dup')" onclick="javascript:disableLinks();" onkeypress="javascript:disableLinks();" >$tlang.getString("list.dup").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.dup')")
												#end
												####### deal with viewing/editing file/folder information
												#if ($member.canRevise())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doEdit" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.edit.title')">$tlang.getString("list.edit").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.edit')")
												#elseif ($member.canRead())
													#if ($itemsOnLine > 0)
														|
														#set($actionLinkString = "$actionLinkString | ")
													#end
													#set ($itemsOnLine = $itemsOnLine + 1)
													<a href="#toolLinkParam("ResourcesAction" "doMore" "from=list&id=$validator.escapeUrl($member.id)&collectionId=$validator.escapeUrl($member.container)")" title="$tlang.getString('list.props.title')">$tlang.getString("list.props").trim()</a>
													#set($actionLinkString = "$actionLinkString$tlang.getString('list.props')")
												#end
											#end
										</div>
										<div name="disabledActionLinks" class="itemAction"  style="display:none">
											$actionLinkString
										</div>
									</td>
									######################  Item/folder properties  ##############
									#set($effectiveAccess = $member.effectiveAccess)
									<td headers="access" title="$member.effectiveGroups">
										#if($member.isPubviewInherited() || $member.isPubview())
											$tlang.getString("access.public")
										#elseif($member.isInDropbox())
											$tlang.getString("access.dropbox")
										#elseif("$effectiveAccess" == "$INHERITED_ACCESS" || "$effectiveAccess" == "$SITE_ACCESS")
											$tlang.getString("access.site")
										#elseif("$effectiveAccess" == "$GROUP_ACCESS")
											$tlang.getString("access.group")
										#end
									</td>
									<td headers="creator">
										$member.createdBy
									</td>
									<td headers="modified">
										$member.ModifiedTime
									</td>
									<td headers="size">
										$member.size
									</td>
								</tr>
							#end
						#end
					#end ## foreach $root in $other_sites
	
				#else
					<tr>
						<th colspan="8">
						<h3>
							##<a href="#toolLink("ResourcesAction" "doShowOtherSites")" title= "$tlang.getString('list.show')">
							<a href="#" onclick="javascript:document.getElementById('sakai_action').value='doShowOtherSites';document.getElementById('showForm').submit();"
								onclick="javascript:document.getElementById('sakai_action').value='doShowOtherSites';document.getElementById('showForm').submit();"
								title= "$tlang.getString('list.show')">
								<img src="#imageLink("sakai/expand.gif")" alt="$tlang.getString('list.show')" border="0" align="top" />
								$validator.escapeHtml("$tlang.getString('list.show')")
							</a>
						</h3>
						</th>
					</tr>
				#end
			#end
			#end
			############################################# end of "Other sites" section 
		
		</table>
		<input type="hidden" id="removeCount" value="$rCount" />
		<input type="hidden" id="moveCount" value="$mCount" />
		<input type="hidden" id="copyCount" value="$cCount" />
	</form>						
</div>
<script language="JavaScript" type="text/JavaScript">
	<!--
		#if($rCount > 0)
			document.getElementById("removeButton").disabled = false;
		#end
		#if($mCount > 0)
			document.getElementById("moveButton").disabled = false;
		#end
		#if($cCount > 0)
			document.getElementById("copyButton").disabled = false;
		#end
		#if($removeCount > 0 || $moveCount > 0 || $copyCount > 0)
			document.getElementById("selectall").disabled = false;			
		#end
		function openCopyrightWindow(theURL,winName,winSettings) 
		{ 
		  window.open(theURL,winName,winSettings);
		  return false;
		}
		function toggleSelectAll(caller, elementName)
		{
			var newValue = caller.checked;
			var elements = document.getElementsByName(elementName);
			
			if(elements)
			{
				for(var i = 0; i < elements.length; i++)
				{
					elements[i].checked = newValue;
				}
			}
			
			if(newValue == true)
			{
				caller.title = "$tlang.getString("list.unselect")";
				var copyButton = document.getElementById("copyButton");
				if(copyButton)
				{
					copyButton.disabled = false;
					copyButton.className='enabled';
				}
				var moveButton = document.getElementById("moveButton");
				if(moveButton)
				{
					moveButton.disabled = false;
					moveButton.className = 'enabled';
				}
				var removeButton = document.getElementById("removeButton");
				if(removeButton)
				{
					removeButton.disabled = false;
					removeButton.className = 'enabled';
				}
				document.getElementById("copyCount").value = "$copyCount";
				document.getElementById("moveCount").value = "$moveCount";
				document.getElementById("removeCount").value = "$removeCount";
			}
			else
			{
				caller.title = "$tlang.getString("list.select")";
				var copyButton = document.getElementById("copyButton");
				if(copyButton)
				{
					copyButton.disabled = true;
					copyButton.className='disabled';
				}
				var moveButton = document.getElementById("moveButton");
				if(moveButton)
				{
					moveButton.disabled = true;
					moveButton.className = 'disabled';
				}
				var removeButton = document.getElementById("removeButton");
				if(removeButton)
				{
					removeButton.disabled = true;
					removeButton.className = 'disabled';
				}
				document.getElementById("removeCount").value = "0";
				document.getElementById("moveCount").value = "0";
				document.getElementById("copyCount").value = "0";
			}
		}
		
		function adjustCount(caller, countName, buttonName)
		{
			var counter = document.getElementById(countName);
			var button = document.getElementById(buttonName);
			
			if(caller && caller.checked && caller.checked == true)
			{
				counter.value = parseInt(counter.value) + 1;
			}
			else
			{
				counter.value = parseInt(counter.value) - 1;
			}
	
			if(button)
			{
				if(counter.value > 0)
				{
					button.disabled = false;
					button.className='enabled';
				}
				else
				{
					button.disabled = true;
					button.className='disabled';
				}
			}
		}
		
		function disableLinks()
		{
			if(document.getElementsByName)
			{
				var enabledLinks = document.getElementsByName("enabledActionLinks");
				var disabledLinks = document.getElementsByName("disabledActionLinks");
				if(enabledLinks)
				{
					for(var i = 0; i < enabledLinks.length; i++)
					{
						//enabledLinks[i].innerHTML = disabledLinks[i].innerHTML;
						enabledLinks[i].style.display="none";
						disabledLinks[i].style.display="block";
					}
				}			
			}
		}
	//-->
</script>

	
