<!-- chef_resources_select.vm, version: Id:  $, use with org.sakaiproject.tool.content.ResourcesAction.java -->
<script language="JavaScript" type="text/JavaScript">
	<!--
		function openCopyrightWindow(theURL,winName,winSettings) 
		{ 
		  window.open(theURL,winName,winSettings);
		  return false;
		}
		function submitform(id)
		{
			var theForm = document.getElementById(id);
			if(theForm && theForm.onsubmit)
			{
				theForm.onsubmit();
			}
			if(theForm && theForm.submit)
			{
				theForm.submit();
			}
		}
	//-->
</script>
<div class="portletBody">
	#if ($alertMessage)
		<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div style="display:block;clear:both" ></div>
	#end
	<h3>
		#if($helper_title)
			$helper_title
		#else
			$tlang.getString("att.add")
		#end
	</h3>
	<div class="instruction">
		#if($helper_instruction)
			$helper_instruction
		#else
			$tlang.getString("att.instr")
		#end
		#if($attached.isEmpty())
		#else
			$tlang.getString("att.fin")
		#end	
	</div>

	<form name="attachForm" id="attachForm" action="#toolForm("ResourcesAction")" method="post">
		<input type="hidden" name="source" value="0" />
		<input type="hidden" name="collectionId" value="$validator.escapeHtml($collectionId)" />
		<input type="hidden" name="from" value="list" />
		<input type="hidden" name="sakai_action" id="sakai_action" value="" />
		#if($attached.isEmpty())
		#else
			<table class="listHier lines" cellspacing="0" cellpadding="0" summary="$tlang.getString("att.sellistsum")">
				<caption class="skip" style="display:none">$tlang.getString("att.sellistcap")</caption>
				<tr>
					<th id="item">
						$tlang.getString("att.items")
					</th>
					<th  id="action">
						$tlang.getString("att.rmv")
					</th>
				</tr>	
					#foreach($att_item in $attached)
						<tr>
							<td headers="item">
								<h4>
									<img src="#imageLink($contentTypeImageService.getContentTypeImage($att_item.contentType))" border= "0" alt ="$contentTypeImageService.getContentTypeDisplayName($att_item.contentType) icon" hspace="0" />
									<a href="$att_item.accessUrl" target="_blank" title="$tlang.getString('gen.type'): $contentTypeImageService.getContentTypeDisplayName($att_item.contentType)  [$tlang.getString('gen.newwin')]">$att_item.displayName</a>
								</h4>	
							</td>
							<td  headers="action">
								<div class="itemAction">
									<a href="#toolLinkParam("ResourcesAction" "doRemoveitem" "itemId=$validator.escapeUrl($att_item.id)")" title="$tlang.getString('att.remove')">$tlang.getString("att.remove")</a>
								</div>	
							</td>
						</tr>
					#end
			</table>
		#end	
		######################  Page Title / Breadcrumbs  ##############
		<h3>
			<span class ="chefBreadCrumb">
				$tlang.getString("gen.location")
				<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="$tlang.getString('gen.folder1')" />
				#foreach ($item in $collectionPath)
					#if($item.isLast())
						$validator.escapeHtml("$item.name")
						#if($upOneLevel)
							<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=$validator.escapeUrl($upOneLevel.id)&navRoot=$validator.escapeUrl($upOneLevel.root)&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="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=$validator.escapeUrl($item.id)&navRoot=$validator.escapeUrl($item.root)&navRoot=$validator.escapeUrl($item.root)")" title ="$tlang.getString('sh.go')">
							$validator.escapeHtml("$item.name")
						</a> /
						#set($upOneLevel = $item)
					#end
				#end
			</span>		
		</h3>
		######################  Heirarchical list of resource folders/items  ##############
		<table class="listHier lines" cellspacing="0" border="0" summary="$tlang.getString("att.listsum")">
			######################  Column labels, sort controls, expand/collapse all  ##############
			<caption class="skip" " style="display:none">$tlang.getString("att.listcap")</caption>
			<tr>
				<th id="title">
					#if ($expandallflag && "$expandallflag" == "$TRUE")
						<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="#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
					## <img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" alt="%%%" />
					<a href="#toolLinkParam("ResourcesAction" "doSort" "criteria=title&collectionId=$validator.escapeUrl($collectionId)")" title ="$tlang.getString('sh.sorttit')"> 
						$tlang.getString("gen.title1")
						#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 
					</a>
				</th>
				<th id="actions">
					$tlang.getString("gen.actions")
				</th>
			</tr>
			#foreach($root in $this_site)
				############################### Show top level folder #################
				<tr>
					<td headers="title">
						<h3>
							#if ($root.isFolder())
								#if ($root.isEmpty())
									<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="$tlang.getString('gen.folder1')" />
									$validator.escapeHtml(${root.name})
								#elseif ($root.canRead())
									#if (!$expandedCollections.containsKey($root.Id))
										<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>
									#else
										<a href="#toolLinkParam("ResourcesAction" "doCollapse_collection" "collectionId=$validator.escapeUrl($root.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>
									#end
									<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="$tlang.getString('gen.folder1')" />
									$validator.escapeHtml(${root.name})
								#end
							#end					
						</h3>
					</td>
					<td headers="actions">
						######################  Add Action Links at Top Level  ##############
						#if($root && ($root.canAddItem() || $root.canAddFolder()))
							<div class="itemAction">
								#set ($itemsOnLine = 0)
								####### deal with adding item/folder
								#if($root.canAddItem())
									#if ($itemsOnLine > 0)
										|
									#end
									#set ($itemsOnLine = $itemsOnLine + 1)
									#if($disable_attach_links)
									#else
										<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${root.id})")" title ="$tlang.getString('att.addnewtitle')">$tlang.getString("att.addnew").trim()</a>
									#end
								#end
							</div>
						#end
						######################  End of Add Items/Folders at Top Level  ##############
					</td>
				</tr>	
				#set($collectionMembers = $root.Members)
				######################  No items message  ##############
				#if ($root.isLocal() && $collectionMembers.isEmpty())
					<tr>
						<td  colspan="4">
							<h3 style="margin-left:1em">
								<p class="instruction">
									$tlang.getString("sh.no")
									#if($dropboxMode)$tlang.getString("sh.drop")#else$tlang.getString("sh.reso")#end
									$tlang.getString("sh.item")
								</p>
							</h3>	
						</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>
							######################  Item title and action links  ##############
							<td headers="title" style="text-indent:$width">
								<h$headerDepth title="$validator.escapeHtml(${member.name})">
								#if ($member.isFolder())
									#if ($member.isEmpty())
										<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="$tlang.getString('gen.folder1')" />
										$validator.escapeHtml(${member.name})
									#elseif ($member.canRead())
										#if (!$expandedCollections.containsKey($member.Id))
											<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>
										#else
											<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>
										#end
										<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="$tlang.getString('gen.folder1')" />
										$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.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" />
										$validator.escapeHtml($member.name)
										#if ($member.hasCopyrightAlert())
											&#169;
										#end
									#end
								#end
								</h$headerDepth>
							</td>
							<td headers="actions">
								<div class="itemAction">
									#if($member.isFolder())
										#set ($itemsOnLine = 0)
										####### deal with adding item/folder
										#if($member.canAddItem())
											#if($disable_attach_links)
											#else
												#if ($itemsOnLine > 0)
													|
												#end
												#set ($itemsOnLine = $itemsOnLine + 1)
												<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${member.id})")" title="$tlang.getString('att.addnewtitle')">$tlang.getString("att.addnew").trim()</a>
											#end
										#end
									#else
										#set ($itemsOnLine = 0)
										####### deal with attaching item
										#if ($member.canRead() && $member.canSelect())
											#if($disable_attach_links)
											#else
												#if ($itemsOnLine > 0)
													|
												#end
												#set ($itemsOnLine = $itemsOnLine + 1)
												<a href="#toolLinkParam("ResourcesAction" "doAttachitem" "itemId=$validator.escapeUrl(${member.id})")" title ="$tlang.getString('att.select')">$tlang.getString("att.select").trim()</a>
											#end
										#end
										####### deal with duplicating item
										#if($member.canRead() && $member.canAddItem())
											#if($disable_attach_links)
											#else
												#if ($itemsOnLine > 0)
													|
												#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')">$tlang.getString("list.dup").trim()</a>
											#end
										#end
									#end
								</div>
								#if($copyFlag && "${member.id}" == "$copiedItem")
									<div class="inlineAlert">
										$tlang.getString("list.copied")
									</div>
								#end
							</td>
						</tr>
					#end
				#end
			#end ## foreach $root in $this_site
			
			############################################# Begin "Other sites" section
			#if($allowed_to_see_other_sites)
				#if("$!show_other_sites" == "true")
					<tr>
						<th colspan="3">
						<h4>
							<a href="#"
								onclick="javascript:document.getElementById('attachForm').action='#toolLink("ResourcesAction" "doHideOtherSites")';submitform('attachForm');" 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>
						</h4>
						</th>
					</tr>
					################################################################ Begin Paging widgets
					#if($!allMsgNumber && $allMsgNumberInt && $allMsgNumberInt > 5)
						<tr class="exclude">
							<td colspan="7">
								<div class="rightNav">
									<span class="instruction" style="margin-bottom:.3em;">Viewing $topMsgPos - $btmMsgPos of $allMsgNumber items</span>
									#if ("$pagesize" != "0")
										#if ($goPPButton == "true")
											<input type="button" name="List_first" value="|&lt;" title="First" onclick="javascript: document.getElementById('attachForm').action='#toolLink("ResourcesAction" "doList_first")'; submitform('attachForm');" />
										#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('attachForm').action='#toolLink("ResourcesAction" "doList_prev")'; submitform('attachForm');" />
										#else
											<input type="button" name="List_prev" value="&lt;" disabled="disabled" />
										#end
									#end
									<!-- $pagesize  "$pagesize" -->
									<select name="selectPageSize" onchange="javascript:blur(); document.getElementById('attachForm').action='#toolLink("ResourcesAction" "doChange_pagesize")';submitform('attachForm');">
										<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('attachForm').action='#toolLink("ResourcesAction" "doList_next")'; submitform('attachForm');" />
										#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('attachForm').action='#toolLink("ResourcesAction" "doList_last")'; submitform('attachForm');" />
										#else
											<input type="button" name="List_last" value="&gt;|" disabled="disabled" />
										#end
									#end
								</div>
							</td>
						</tr>
					#end
					################################################################ End Paging widgets
					#foreach($root in $other_sites)
						############################### Show top level folder #################
						<tr>
							<td headers="title">
								#if ($root.isFolder())
									<h3>
										#if ($root.isEmpty())
											<img src = "#imageLink("sakai/dir_closed.gif")" border="0"  alt="$tlang.getString('gen.folder1')"  />
											$validator.escapeHtml(${root.name})
										#elseif ($root.canRead())
											#if (!$expandedCollections.containsKey($root.Id))
												<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>
											#else
												<a href="#toolLinkParam("ResourcesAction" "doCollapse_collection" "collectionId=$validator.escapeUrl($root.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>
											#end
											<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="$tlang.getString('gen.folder1')" />
											$validator.escapeHtml(${root.name})
										#end
									</h3>	
								#end	
							</td>
							<td headers="actions">
								######################  Add Action Links at Top Level  ##############
								#if($root && ($root.canAddItem() || $root.canAddFolder()))
									<div class="itemAction">
										#set ($itemsOnLine = 0)
										####### deal with adding item/folder
										#if($root.canAddItem())
											#if($disable_attach_links)
											#else
												#if ($itemsOnLine > 0)
													|
												#end
												#set ($itemsOnLine = $itemsOnLine + 1)
												<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${root.id})")" title ="$tlang.getString('att.addnewtitle')">$tlang.getString("att.addnew").trim()</a>
											#end
										#end
									</div>
								#end
								######################  End of Add Items/Folders at Top Level  ##############
							</td>
						</tr>	
						#set($collectionMembers = $root.Members)
						######################  No items message  ##############
						#if ($root.isLocal() && $collectionMembers.isEmpty())
							<tr>
								<td  colspan="4">
									<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>
									######################  Item title and action links  ##############
									<td headers="title" style="text-indent:$width">
										<h$headerDepth>
											#if ($member.isFolder())
												#if ($member.isEmpty())
													<img src = "#imageLink("sakai/dir_closed.gif")" border="0" alt="$tlang.getString('gen.folder1')" />
													$validator.escapeHtml(${member.name})
												#elseif ($member.canRead())
													#if (!$expandedCollections.containsKey($member.Id))
														<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>
													#else
														<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>
													#end
													<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="$tlang.getString('gen.folder1')" />
													$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.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" />
													$validator.escapeHtml($member.name)
													#if ($member.hasCopyrightAlert())
														&#169;
													#end
												#end
											#end
										</h$headerDepth>
									</td>
									<td headers="actions">
										<div class="itemAction">
											#if($member.isFolder())
												#set ($itemsOnLine = 0)
												####### deal with adding item/folder
												#if($member.canAddItem())
													#if($disable_attach_links)
													#else
														#if ($itemsOnLine > 0)
															|
														#end
														#set ($itemsOnLine = $itemsOnLine + 1)
														<a href="#toolLinkParam("ResourcesAction" "doCreate" "itemType=${TYPE_UPLOAD}&collectionId=$validator.escapeUrl(${member.id})")" title="$tlang.getString('att.addnewtitle')">$tlang.getString("att.addnew").trim()</a>
													#end
												#end
											#else
												#set ($itemsOnLine = 0)
												####### deal with attaching item
												#if ($member.canRead() && $member.canSelect())
													#if($disable_attach_links)
													#else
														#if ($itemsOnLine > 0)
															|
														#end
														#set ($itemsOnLine = $itemsOnLine + 1)
														<a href="#toolLinkParam("ResourcesAction" "doAttachitem" "itemId=$validator.escapeUrl(${member.id})")" title ="$tlang.getString('att.select')">$tlang.getString("att.select").trim()</a>
													#end
												#end
												####### deal with duplicating item
												#if($member.canRead() && $member.canAddItem())
													#if($disable_attach_links)
													#else
														#if ($itemsOnLine > 0)
															|
														#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')">$tlang.getString("list.dup").trim()</a>
													#end
												#end
											#end
										</div>
										#if($copyFlag && "${member.id}" == "$copiedItem")
											<div class="inlineAlert">
												$tlang.getString("list.copied")
											</div>
										#end
									</td>
								</tr>
							#end
						#end
					#end ## foreach $root in $other_sites
	
				#else
					<tr>
						<th colspan="3">
						<h4>
							<a href="#toolLink("ResourcesAction" "doShowOtherSites")" 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>
						</h4>
						</th>
					</tr>
				#end
			#end
			############################################# end of "Other sites" section 

			</table>
		
		<p class="act" >
			<input type="button" name="attachButton" id="attachButton" accesskey="s"
				onclick="javascript: document.getElementById('attachForm').action='#toolLink("ResourcesAction" "doAddattachments")'; submitform('attachForm');" 
				value="$tlang.getString("att.finish")" #if($list_has_changed) class="active" #else disabled="disabled" #end />
			<input type="button" name="cancelButton" id="cancelButton" accesskey="x"
				onclick="javascript: document.getElementById('attachForm').action='#toolLink("ResourcesAction" "doCancel")'; submitform('attachForm');" 
				value="$tlang.getString("att.cancel")"  />
		</p>
	</form>						
</div>
