## $Header: /cvs/sakai2/legacy/tools/src/webapp/vm/calendar/chef_calendar_delete.vm,v 1.5 2005/05/28 03:04:35 ggolden.umich.edu Exp $

<script language="JavaScript" type="text/JavaScript">
<!--
	function openCopyrightWindow(theURL,winName,winSettings) 
	{ 
	  window.open(theURL,winName,winSettings);
	  return false;
	}
//-->
</script>

<div class="portletBody">
	<h3>
		$tlang.getString("del.deleting")
	</h3>
	#if ($alertMessage)
		<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div style="display:block;clear:both"/>
	#end
	<div class="alertMessage">$tlang.getString("del.sure")</div><div style="display:block;clear:both"/>
	<form name="deleteTemplateForm" action="#toolForm("$action")" method="post">
		<table class="itemSummary" cellspacing="0" summary="layout">
			<tr>
				<th>$tlang.getString("gen.title")</th>
				<td>$validator.escapeHtml($event.getDisplayName())</td>
		</tr>
		<tr>
			<th>$tlang.getString("gen.date")</th> 
			<td>$event.getRange().firstTime().toStringLocalDate()</td>
		</tr>
		<tr>
			<th>$tlang.getString("gen.time")</th>
			<td>
				#set ($startTime = $event.getRange().firstTime().toStringLocalShort())
				#set ($endTime = $event.getRange().lastTime().toStringLocalShort())
				#if ($startTime == $endTime)
					$startTime
				#else
					$startTime - $endTime
				#end
				$timezone
			</td>
		</tr>
		#if ($!groupRange && !($!groupRange == ""))
		<tr>
			<th>$tlang.getString("groups")</th>
			<td>$!groupRange</td>
		</tr>
		#end
		<tr>
			<th>$tlang.getString("gen.freq")</th> 
			<td>
				#if ($rule)
					$tlang.getString("del.every") $rule.Interval $freq(s)
					#if (!($rule.Count == 0)) , $tlang.getString("del.number") $rule.Count $tlang.getString("del.times") <br/>#end
					#if ($rule.Until) , $tlang.getString("del.endson") $rule.Until.breakdownLocal().Month/$rule.Until.breakdownLocal().Day/$rule.Until.breakdownLocal().year <br/>#end
				#else
					$tlang.getString("del.one")
				#end
			</td>
		</tr>
		<tr>
			<th>$tlang.getString("del.item")</th>
				<td>
					#if($event.getType()=="Academic Calendar")
					<img src = "#imageLink("sakai/academic_calendar.gif")" border="0" alt="$tlang.getString("del.acad")" /> $tlang.getString("del.acad") 
					#elseif ($event.getType()=="Activity")
					<img src = "#imageLink("sakai/activity.gif")" border="0" alt="$tlang.getString("del.activ")" /> $tlang.getString("del.activ")
					#elseif($event.getType()=="Cancellation")
					<img src = "#imageLink("sakai/cancelled.gif")" border="0" alt="$tlang.getString("del.cancell")" /> $tlang.getString("del.cancell")
					#elseif ($event.getType()=="Class section - Discussion")
					<img src = "#imageLink("sakai/class_dis.gif")" border="0" alt=" $tlang.getString("del.class") - $tlang.getString("del.disc")" /> $tlang.getString("del.class") - $tlang.getString("del.disc")
					#elseif ($event.getType()=="Class section - Lab")
					<img src = "#imageLink("sakai/class_lab.gif")" border="0" alt="$tlang.getString("del.class") - $tlang.getString("del.lab")" /> $tlang.getString("del.class") - $tlang.getString("del.lab")
					#elseif ($event.getType()=="Class section - Lecture")
					<img src = "#imageLink("sakai/class_lec.gif")" border="0" alt="$tlang.getString("del.class") - $tlang.getString("del.lect")" /> $tlang.getString("del.class") - $tlang.getString("del.lect")
					#elseif ($event.getType()=="Class section - Small Group")
					<img src = "#imageLink("sakai/class_sma.gif")" border="0" alt="$tlang.getString("del.class") - $tlang.getSTring("del.small")" /> $tlang.getString("del.class") - $tlang.getSTring("del.small")
					#elseif ($event.getType()=="Class session")
					<img src = "#imageLink("sakai/class_session.gif")" border="0" alt="$tlang.getString("del.classsession")" /> $tlang.getString("del.classsession")
					#elseif($event.getType()=="Computer Session")
					<img src = "#imageLink("sakai/computersession.gif")" border="0" alt="$tlang.getString("del.computer")"/> $tlang.getString("del.computer")
					#elseif($event.getType()=="Deadline")
					<img src = "#imageLink("sakai/deadline.gif")" border="0" alt="$tlang.getString("del.dead")"/> $tlang.getString("del.dead")
					#elseif($event.getType()=="Exam")
					<img src = "#imageLink("sakai/exam.gif")" border="0" alt="$tlang.getString("del.exam")"/> $tlang.getString("del.exam")
					#elseif ($event.getType()=="Meeting")
					<img src = "#imageLink("sakai/meeting.gif")" border="0" alt="$tlang.getString("del.meet")"/> $tlang.getString("del.meet")
					#elseif($event.getType()=="Quiz")
					<img src = "#imageLink("sakai/quiz.gif")" border="0" alt="$tlang.getString("del.quiz")" /> $tlang.getString("del.quiz")
					#elseif($event.getType()=="Special event")
					<img src = "#imageLink("sakai/special_event.gif")" border="0" alt="$tlang.getString("del.special") " /> $tlang.getString("del.special") 
					#elseif($event.getType()=="Web Assignment")
					<img src = "#imageLink("sakai/webassignment.gif")" border="0" alt="$tlang.getString("del.web")" /> $tlang.getString("del.web")
					#elseif($event.getType()=="Multidisciplinary Conference")
					<img src = "#imageLink("sakai/multi-conference.gif")" border="0" alt="$tlang.getString("del.multi")" />$tlang.getString("del.multi")
					#end	 
				</td>
		</tr>
		#if (!$validator.escapeHtml($event.Location)=="")
			<tr> 
				<th>$tlang.getString("new.location"):</th>
				<td>$validator.escapeHtml($event.Location)</td>
			</tr>
		#end
	</table>
	#if (!$event.DescriptionFormatted.equals(""))
		<h4>$tlang.getString("gen.descr")</h4>
		$validator.escapeHtmlFormattedText($event.DescriptionFormatted)
	#end
	#set ($size = 0)
	#if (!$event.Attachments.isEmpty())
		<h4>$tlang.getString("gen.attach")</h4>
		#set ($props = false)
			#set ($size = $event.Attachments.size())
			<ul class="attachList">
			#foreach ($attachment in $event.Attachments)
				#set ($props = $attachment.Properties)
				#if (!$props)
					#if ($size >0) #set ($size = $size - 1) #end
				#else
					#if ($props.getBooleanProperty($props.NamePropIsCollection))
							<li><img src = "#imageLink($contentTypeImageService.getContentTypeImage("folder"))" border="0" />
					#else
							<li><img src = "#imageLink($contentTypeImageService.getContentTypeImage($props.getProperty($props.NamePropContentType)))" border="0" />
					#end
					
					#set ($copyflag = false)
					#if ($props.getProperty("CHEF:copyrightalert"))
						#if ($props.getBooleanProperty("CHEF:copyrightalert"))
							#set ($copyflag = true)
						#end
					#end

					#if ($copyflag)
						## if there is a copyright alert, show the alert page first
						<a href="" onclick="openCopyrightWindow('${attachment.url}','copyrightAlertWindow','scrollbars=yes,menubar=yes,height=600,width=800,resizable=yes,toolbar=yes,location=yes,status=yes');return false">
						$validator.escapeHtml($attachment.Properties.getPropertyFormatted("DAV:displayname"))</a>&#169;
					#else
						<a href="$attachment.Url" target="_blank">
						$validator.escapeHtml($attachment.Properties.getPropertyFormatted("DAV:displayname"))</a>
					#end

					#if (!$props.getBooleanProperty($props.NamePropIsCollection))
									($props.getPropertyFormatted($props.NamePropContentLength))
					#end
					</li>
				#end
				#set ($props = false)
			#end
		#end
		#if ($event.RecurrenceRule)
		<p class="shorttext">
			<select name="intention" id="intention">
				<option value="a" selected="selected">$tlang.getString("del.deleteall")</option>
				<option value="t">$tlang.getString("del.deleteonly")</option>
			</select>
		#end


<p class="act">
<input type="submit" class="active" accesskey="s"  name="eventSubmit_doConfirm" value="$tlang.getString('gen.delete')" />
<input type="submit" accesskey="x" name="eventSubmit_doBack" value="$tlang.getString('gen.cancel')" />
</p>

</form>
</div>

