<!-- chef_resources_more.vm, version: $Revision:  $, use with org.sakaiproject.tool.content.ResourcesAction.java -->
<script type="text/javascript">
	function openCopyrightWindow(theURL,winName,winSettings) 
	{ 
		window.open(theURL,winName,winSettings);
		return false;
	}
</script>

<div class="portletBody">

	<h3>
		$tlang.getString("more.view")
	</h3>

	#if ($alertMessage)
		<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div>
		<div style="display:block;clear:both"></div>
	#end
	<div class ="chefBreadCrumb">
		$tlang.getString("gen.location")
		<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" />
		#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
			#else
				##<a href="#toolLinkParam("ResourcesAction" "doNavigate" "collectionId=$validator.escapeUrl($item.id)&navRoot=$validator.escapeUrl($navRoot)")" 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>
				/
			#end
		#end
	</div>		

	#if (!$notExistFlag)
	<table class="itemSummary" cellspacing="0">
		<tr> 
			<th> 
				$tlang.getString("gen.title")
			</th>
			<td>
				#if ($dropboxMode && $homeCollectionId.equals($id))
					$siteTitle Drop Box
				#elseif ($item.isFolder())
					#if ($item.hasCopyrightAlert()) ## if there is a copyright alert, show the alert page first
						<a href="" onclick="openCopyrightWindow('$item.url','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false;">
							$validator.escapeHtml($item.name))
						</a>
						&#169;
					#else
						<a href="$item.url" target="_blank">$validator.escapeHtml($item.name)</a>
					#end
				#else
					$validator.escapeHtml($item.name)
				#end
			</td>
		</tr>
		<tr> 
			<th> 
				$tlang.getString("gen.description")
			</th>
			<td>
				<span class="chefPre">$validator.escapeHtml($item.description)</span>
			</td>
		</tr>
		#if (! $item.isFolder() && $!copyrightTypes)
			## don't show copyright info for collection
			<tr> 
				<th> 
					$tlang.getString("gen.cpr")
				</th>
				<td>
## special escape to fix the &#169; copyright symbol placed by ResourcesAction before 1.1.05 -ggolden
					<span class="chefPre">$validator.escapeHtmlFixCopyright($item.copyrightInfo)</span>
				</td>
			</tr>
		#end
		#if (!$dropboxMode)
			## do not show the access in dropbox 
			<tr> 
				<th> 
					$tlang.getString("edit.access1")
				</th>
				<td>
					<span class="chefPre">
						#if($pubview) 
							$tlang.getString("more.yes") 
						#else
							$item.effectiveGroups
						#end
					</span>
				</td>
			</tr>
		#end
#if($hasQuota)
		<tr> 
			<th> 
				$tlang.getString("gen.quota") <br \>(KBytes):
			</th>
			<td>
				<span class="chefPre">$quota</span>
			</td>
		</tr>
#end
	#if (!($dropboxMode && $collectionId==$homeCollection))
		<tr> 
			<th> 
				$tlang.getString("gen.created")
			</th>
			<td> 
				$validator.escapeHtml($item.createdBy)
			</td>
		</tr>
	#end
		<tr> 
			<th> 
				$tlang.getString("gen.creatime")
			</th>
			<td>
				$item.createdTime
			</td>
		</tr>
		<tr> 
			<th> 
				$tlang.getString("gen.last")
			</th>
			<td>
				$item.modifiedTime
			</td>
		</tr>
	#if (!($dropboxMode && $collectionId==$homeCollection))
		<tr> 
			<th> 
				$tlang.getString("gen.lastby")
			</th>
			<td>
				$item.modifiedBy
			</td>
		</tr>
	#end
		#if (! $item.isFolder())
			<tr> 
				<th> 
					$tlang.getString("gen.type")
				</th>
				<td>
					$item.mimeType
				</td>
			</tr>
			<tr> 
				<th> 
					$tlang.getString("gen.size")
				</th>
				<td>
					$item.size ##$properties.getPropertyFormatted($properties.NamePropContentLength) ($validator.getFileSizeWithDividor($properties.getProperty($properties.NamePropContentLength)) bytes)
				</td>
			</tr>
			#* only allow open in new window for 2003 fall release
			<tr>
				<th> 
					$tlang.getString("gen.open")
				</td>
				<td>
					#set ($openIn=$properties.getPropertyFormatted($properties.NamePropOpenNewWindow))
					#if (($openIn == "false") || ( $openIn == "_self"))
						$tlang.getString("gen.thiswin")
					#else 
						$tlang.getString("gen.newwin")
					#end
				</td>
			</tr>
			*#
				#if ($item.isUrl())
					<tr> 
						<th> 
							$tlang.getString("gen.original")
						</t>
						<th>
							$item.contentString
						</td>
					</tr>
				#end
			#end
			<tr>
				<th> 
					$tlang.getString("gen.stored")
				</th>
				<td>
					$item.url
				</td>
			</tr>
############################################# this is the section to show ematadata  
#if($metadataGroups)
#foreach($group in $metadataGroups)				  
#if ($group.isShowing())
					<tr>
						<td colspan="2">
							&nbsp;
						</td>
					</tr>
					<tr> 
						<td colspan="2" class="discTria">
							<a href="#" onclick="location='#toolLinkParam("ResourcesAction" "doHide_metadata" "metadataGroup=$validator.escapeUrl($group.name)")'; return false;" title="$tlang.getString("edit.hide") $group.name">
								<img src="#imageLink("sakai/collapse.gif")" alt="$tlang.getString("edit.hide") group.name" border="0" width="15" height="15" align="top" />
							</a>
							$validator.escapeHtml($group.name)
						</td>
					</tr>
					<tr>
						<td colspan="2">
							&nbsp;
						</td>
					</tr>
#foreach($tag in $group)
			<tr>
				<td class="chefLabel" title="$tag.description"> 
					$tag.label
				</td>
				<td>
<!-- $tag.widget $STRING $TEXTAREA $DATE $DATETIME $TIME -->
#if("$!tag.widget" == "$!STRING")
					$!properties.getProperty("$tag.fullname") 
#elseif("$!tag.widget" == "$!TEXTAREA")
					$!properties.getProperty("$tag.fullname")							
#elseif("$!tag.widget" == "$!DATE")
#if($properties.getProperty("$tag.fullname"))
#set($value = $!properties.getTimeProperty("$tag.fullname"))
					$value.toStringLocalDate()
#end
#elseif("$!tag.widget" == "$!DATETIME")
#if($properties.getProperty("$tag.fullname"))
#set($value = $!properties.getTimeProperty("$tag.fullname"))
					$value.toStringLocalFull()
#end
#elseif("$!tag.widget" == "$!TIME")
#if($properties.getProperty("$tag.fullname"))
#set($value = $!properties.getTimeProperty("$tag.fullname"))
					$value.toStringLocalTime()
#end
#else
					$tag.fullname<br />
					$tag.widget<br />
					$!properties.getProperty("$tag.fullname")<br />
#end
				</td>
			</tr>
#end
					
#else
					<tr>
						<td colspan="2">
							&nbsp;
						</td>
					</tr>
					<tr> 
						<td colspan="2" class="discTria">
							<a href="#" onclick="location='#toolLinkParam("ResourcesAction" "doShow_metadata" "metadataGroup=$validator.escapeUrl($group.name)")'; return false;" title="$tlang.getString("edit.show") $group.name">	
								<img src="#imageLink("sakai/expand.gif")" alt="$tlang.getString("edit.show") $group.name" border="0" width="15" height="15" align="top" />
							</a>
							$validator.escapeHtml($group.name)
						</td>
					</tr>
#end
#end
#end
############################################# end of section to show metadata 
					<tr>
						<td colspan="2">
							&nbsp;
						</td>
					</tr>
		</table> 
	#end
	
		<form name="moreForm" action="#toolForm("ResourcesAction")" method="post" >
			<p class="act">
				<input type="hidden" name="collectionId" value="$validator.escapeHtml($collectionId)" />
				<input type="hidden" name="id" value="$id" />
				<input type="hidden" name="from" value = "list" />
				<input type="hidden" name="view" value="general" />
				<input type="submit" name="eventSubmit_doCancel" value="$tlang.getString("more.cancel")" accesskey="x" />
			</p>
		</form>
	
</div>
