<!-- $Header: /cvs/sakai2/legacy/tools/src/webapp/vm/announcement/chef_announcements-metadata.vm,v 1.7 2005/05/15 17:02:52 gsilver.umich.edu Exp $ -->
<div class="portletBody">
	#if($menu && $EnabledMenuItemExists)
		#toolbar($menu)
	#end
	
	#if ($toolId == "sakai.announcements")
	<form name="formII" action="#toolForm("$action")" method="post">
		<div class="navPanel">
			<div class="itemNav">
				#if ($!goPTButton)
					<input type="submit" name="eventSubmit_doPrev_message" class="prev" accesskey="p" value="&lt; $tlang.getString("meta.prev")" />
				#else
					<input type="submit" name="eventSubmit_doPrev_message" 
						value="&lt;  $tlang.getString("meta.prev")" class="prevDis"
						disabled="disabled" />
				#end
				<input type="submit" name="eventSubmit_doLinkcancel" value="$tlang.getString("meta.retlis")" class="toList" accesskey="l" />
				#if ($!goNTButton)
					<input type="submit" name="eventSubmit_doNext_message" value="$tlang.getString("meta.next") &gt;"  class="next" accesskey="n" />
				#else
					<input type="submit" name="eventSubmit_doNext_message" 
						value="$tlang.getString("meta.next")  &gt;"
						disabled="disabled" class="nextDis" />
				#end
			</div>
		</div>
	</form>
	#end
	<h3>
		$tlang.getString("meta.title")
	</h3>	
	#if ($alertMessage)<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div class="clear"></div>#end
	<table cellspacing="0" class="itemSummary">
		<tr>
			<th>$tlang.getString("gen.subject")</th>
			<td>$validator.escapeHtml($message.Header.subject)</td>
		</tr>
		<tr>
			<th>$tlang.getString("gen.from")</th>
			<td>$validator.escapeHtml($message.Header.From.DisplayName)</td>
		</tr>
		<tr>
			<th>$tlang.getString("gen.date")</th>
			<td>$message.Header.Date.toStringLocalFull()</td>
		</tr>
		#if ($!range)
			<tr>
				<th>$tlang.getString("meta.groups")</th>
				<td>$!range</td>
			</tr>
		#end
	</table>
	<h4>
		$tlang.getString("meta.message")
	</h4>
	<p>$validator.escapeHtmlFormattedText($message.body)</p>
	#set ($size = 0)
	#if (!$message.Header.Attachments.isEmpty())
		<h4>$tlang.getString("meta.attach")</h4>
		#set ($props = false)
		#set ($size = $message.Header.Attachments.size())
		<ul class="attachList">
			#foreach ($attachment in $message.Header.Attachments)
				#set ($props = $attachment.Properties)
				#if (!$props)
					#if ($size > 0) #set ($size = $size - 1) #end
				#else
					<li>
						#if ($props.getBooleanProperty($props.NamePropIsCollection))
							<img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" />
						#else
							<img src = "#imageLink($contentTypeImageService.getContentTypeImage($props.getProperty($props.NamePropContentType)))" border="0" alt ="$props.getProperty($props.NamePropContentType)" />
						#end
						<a href="$attachment.Url" target="_blank" title="$tlang.getString("gen.newwindow")">
							$validator.escapeHtml($attachment.Properties.getPropertyFormatted("DAV:displayname"))</a>
						#if (!$props.getBooleanProperty($props.NamePropIsCollection))
							($props.getPropertyFormatted($props.NamePropContentLength))
						#end
					</li>
				#end
			#end
		</ul>
	#end
	
#if ($toolId == "sakai.announcements")
	<form name="formII" action="#toolForm("$action")" method="post">
		<div class="navPanel">
			<div class="itemNav">
				#if ($!goPTButton)
					<input type="submit" name="eventSubmit_doPrev_message" value="&lt; $tlang.getString("meta.prev")" />
				#else
					<input type="submit" name="eventSubmit_doPrev_message" 
						value="&lt;  $tlang.getString("meta.prev")"
						disabled="disabled" />
				#end
				<input type="submit" name="eventSubmit_doLinkcancel" value="$tlang.getString("meta.retlis")" />
				#if ($!goNTButton)
					<input type="submit" name="eventSubmit_doNext_message" value=" $tlang.getString("meta.next") &gt;" />
				#else
					<input type="submit" name="eventSubmit_doNext_message" 
						value="$tlang.getString("meta.next") &gt;"
						disabled="disabled" />
				#end
			</div>
		</div>	
	</form>
#else
	<form name="formII" action="#toolForm("$action")" method="post">
		<p class="act">
			<input class="active" type="submit" name="eventSubmit_doLinkcancel" value="$tlang.getString("meta.retlis")"  accesskey="x" />
		</p>	
	</form>
#end

</div>

