<commit_before>{strip}
	{title admpage="calendar"}{tr}Calendar event : {/tr}{$calitem.name}{/title}
	
	<div class="navbar">
		{if $tiki_p_view_calendar eq 'y'}
			{button href="tiki-calendar.php" _text="{tr}View Calendars{/tr}"}
		{/if}
		{if $tiki_p_admin_calendar eq 'y'}
			{button href="tiki-admin_calendars.php?calendarId=$calendarId" _text="{tr}Edit Calendar{/tr}"}
		{/if}
		{if $tiki_p_add_events eq 'y' and $id}
			{button href="tiki-calendar_edit_item.php" _text="{tr}New event{/tr}"}
		{/if}
		{if $id}
			{if $edit}
				{button href="tiki-calendar_edit_item.php?viewcalitemId=$id" _text="{tr}View event{/tr}"}
			{elseif $tiki_p_change_events eq 'y'}
				{button href="tiki-calendar_edit_item.php?calitemId=$id" _text="{tr}Edit/Delete event{/tr}"}
			{/if}
		{/if}
		{if $tiki_p_admin_calendar eq 'y'}
			{button href="tiki-admin_calendars.php" _text="{tr}Admin Calendars{/tr}"}
		{/if}
	</div>
	
	<div class="wikitext">
		{if $edit}
			{if $preview}
				<h2>
					{tr}Preview{/tr}
				</h2>
				{$calitem.parsedName}
				<div class="wikitext">
					{$calitem.parsed}
				</div>
				<h2>
					{if $id}
						{tr}Edit Calendar Item{/tr}
					{else}
						{tr}New Calendar Item{/tr}
					{/if}
				</h2>
			{/if}
			<form action="{$myurl}" method="post" name="f" id="editcalitem">
				<input type="hidden" name="save[user]" value="{$calitem.user}" />
				{if $id}
					<input type="hidden" name="save[calitemId]" value="{$id}" />
				{/if}
		{/if}
		{if $prefs.calendar_addtogooglecal == 'y'}
			{wikiplugin _name="addtogooglecal" calitemid=$id}{/wikiplugin}
		{/if}
		<table class="formcolor{if !$edit} vevent{/if}">
			<tr>
				<td>
					{tr}Calendar{/tr}
				</td>
				<td style="background-color:#{$calendar.custombgcolor};color:#{$calendar.customfgcolor};">
					{if $edit}
						{if $prefs.javascript_enabled eq 'n'}
							{$calendar.name|escape}<br />{tr}or{/tr}&nbsp;
							<input type="submit" name="changeCal" value="{tr}Go to{/tr}" />
						{/if}
						<select name="save[calendarId]" id="calid" onchange="javascript:needToConfirm=false;document.getElementById('editcalitem').submit();">
							{foreach item=it key=itid from=$listcals}
								{if $it.tiki_p_add_events eq 'y'}
									<option value="{$it.calendarId}" style="background-color:#{$it.custombgcolor};color:#{$it.customfgcolor};"
										{if isset($calitem.calendarId)}
											{if $calitem.calendarId eq $itid}
												 selected="selected"
											{/if}
										{else}
											{if $calendarView}
												{if $calendarView eq $itid}
													 selected="selected"
												{/if}
											{else}
												{if $calendarId}
													{if $calendarId eq $itid}
														 selected="selected"
													{/if}
												{/if}
											{/if}
										{/if}
									>
										{$it.name|escape}
									</option>
								{/if}
							{/foreach}
						</select>
					{else}
						{$listcals[$calitem.calendarId].name|escape}
					{/if}
				</td>
			</tr>
			
			<tr>
				<td>
					{tr}Title{/tr}
				</td>
				<td>
					{if $edit}
						<input type="text" name="save[name]" value="{$calitem.name|escape}" size="32" style="width:90%;"/>
					{else}
						<span class="summary">
							{$calitem.name|escape}
						</span>
					{/if}
				</td>
			</tr>
			{if $edit or $recurrence.id gt 0}
				<tr>
					<td>
						{tr}Recurrence{/tr}
					</td>
					<td>
						{if $edit}
							{if $recurrence.id gt 0}
								<input type="hidden" name="recurrent" value="1"/>
								{tr}This event depends on a recurrence rule{/tr}
							{else}
								<input type="checkbox" id="id_recurrent" name="recurrent" value="1" onclick="toggle('recurrenceRules');toggle('startdate');toggle('enddate');togglereminderforrecurrence();"
									{if $calitem.recurrenceId gt 0 or $recurrent eq 1}
										checked="checked"
									{/if}
								/>
								<label for="id_recurrent">
									{tr}This event depends on a recurrence rule{/tr}
								</label>
							{/if}
						{else}
							<span class="summary">
								{if $calitem.recurrenceId gt 0}
									{tr}This event depends on a recurrence rule{/tr}
								{else}
									{tr}This event is not recurrent{/tr}
								{/if}
							</span>
						{/if}
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
					<td style="padding:5px 10px">
						{if $edit}
							<div id="recurrenceRules" style="width:100%;
								{if ( !($calitem.recurrenceId gt 0) and $recurrent neq 1 ) && $prefs.javascript_enabled eq 'y'}
									display:none;
								{/if}"
							>
								{if $calitem.recurrenceId gt 0}
									<input type="hidden" name="recurrenceId" value="{$recurrence.id}" />
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.weekly}
										<input type="hidden" name="recurrenceType" value="weekly" />{tr}On a weekly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeW" name="recurrenceType" value="weekly"
										{if $recurrence.weekly or $calitem.calitemId eq 0}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeW">
										{tr}On a weekly basis{/tr}
									</label>
									<br />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.weekly}
									{tr}Each{/tr}&nbsp;
									<select name="weekday">
										<option value="0"
											{if $recurrence.weekday eq '0'}
												selected="selected"
											{/if}
										>
											{tr}Sunday{/tr}
										</option>
										<option value="1"
											{if $recurrence.weekday eq '1'}
												selected="selected"
											{/if}
										>
											{tr}Monday{/tr}
										</option>
										<option value="2"
											{if $recurrence.weekday eq '2'}
												selected="selected"
											{/if}
										>
											{tr}Tuesday{/tr}
										</option>
										<option value="3"
											{if $recurrence.weekday eq '3'}
												selected="selected"
											{/if}
										>
											{tr}Wednesday{/tr}
										</option>
										<option value="4"
											{if $recurrence.weekday eq '4'}
												selected="selected"
											{/if}
										>
											{tr}Thursday{/tr}
										</option>
										<option value="5"
											{if $recurrence.weekday eq '5'}
												selected="selected"
											{/if}
										>
											{tr}Friday{/tr}
										</option>
										<option value="6"
											{if $recurrence.weekday eq '6'}
												selected="selected"
											{/if}
										>
											{tr}Saturday{/tr}
										</option>
									</select>
									&nbsp;{tr}of the week{/tr}
									<br />
									<hr style="width:75%"/>
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.monthly}
										<input type="hidden" name="recurrenceType" value="monthly" />{tr}On a monthly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeM" name="recurrenceType" value="monthly"
										{if $recurrence.monthly}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeM">
										{tr}On a monthly basis{/tr}
									</label>
									<br />
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.monthly}
									{tr}Each{/tr}&nbsp;
									<select name="dayOfMonth">
										{section name=k start=1 loop=32}
											<option value="{$smarty.section.k.index}"
												{if $recurrence.dayOfMonth eq $smarty.section.k.index}
													selected="selected"
												{/if}
											>
												{if $smarty.section.k.index lt 10}
													0
												{/if}
												{$smarty.section.k.index}
											</option>
										{/section}
									</select>
									&nbsp;{tr}of the month{/tr}
									<br /><hr style="width:75%"/>
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.yearly}
									  <input type="hidden" name="recurrenceType" value="yearly" />{tr}On a yearly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeY" name="recurrenceType" value="yearly"
										{if $recurrence.yearly}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeY">
										{tr}On a yearly basis{/tr}
									</label>
									<br />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.yearly}
									{tr}Each{/tr}&nbsp;
									<select name="dateOfYear_day" onChange="checkDateOfYear(this.options[this.selectedIndex].value,document.forms['f'].elements['dateOfYear_month'].options[document.forms['f'].elements['dateOfYear_month'].selectedIndex].value);">
										{section name=k start=1 loop=32}
											<option value="{$smarty.section.k.index}"
												{if $recurrence.dateOfYear_day eq $smarty.section.k.index}
													selected="selected"
												{/if}
											>
												{if $smarty.section.k.index lt 10}
													0
												{/if}
												{$smarty.section.k.index}
											</option>
										{/section}
									</select>
									&nbsp;{tr}of{/tr}&nbsp;
									<select name="dateOfYear_month" onChange="checkDateOfYear(document.forms['f'].elements['dateOfYear_day'].options[document.forms['f'].elements['dateOfYear_day'].selectedIndex].value,this.options[this.selectedIndex].value);">
										<option value="1"
											{if $recurrence.dateOfYear_month eq '1'}
												selected="selected"
											{/if}
										>
											{tr}January{/tr}
										</option>
										<option value="2"
											{if $recurrence.dateOfYear_month eq '2'}
												selected="selected"
											{/if}
										>
											{tr}February{/tr}
										</option>
										<option value="3"
											{if $recurrence.dateOfYear_month eq '3'}
												selected="selected"
											{/if}
										>
											{tr}March{/tr}
										</option>
										<option value="4"
											{if $recurrence.dateOfYear_month eq '4'}
												selected="selected"
											{/if}
										>
											{tr}April{/tr}
										</option>
										<option value="5"
											{if $recurrence.dateOfYear_month eq '5'}
												selected="selected"
											{/if}
										>
											{tr}May{/tr}
										</option>
										<option value="6"
											{if $recurrence.dateOfYear_month eq '6'}
												selected="selected"
											{/if}
										>
											{tr}June{/tr}
										</option>
										<option value="7"
											{if $recurrence.dateOfYear_month eq '7'}
												selected="selected"
											{/if}
										>
											{tr}July{/tr}
										</option>
										<option value="8"
											{if $recurrence.dateOfYear_month eq '8'}
												selected="selected"
											{/if}
										>
											{tr}August{/tr}
										</option>
										<option value="9"
											{if $recurrence.dateOfYear_month eq '9'}
												selected="selected"
											{/if}
										>
											{tr}September{/tr}
										</option>
										<option value="10"
											{if $recurrence.dateOfYear_month eq '10'}
												selected="selected"
											{/if}
										>
											{tr}October{/tr}</option>
										<option value="11"
											{if $recurrence.dateOfYear_month eq '11'}
												selected="selected"
											{/if}
										>
											{tr}November{/tr}
										</option>
										<option value="12"
											{if $recurrence.dateOfYear_month eq '12'}
												selected="selected"
											{/if}
										>
											{tr}December{/tr}
										</option>
									</select>
									&nbsp;&nbsp;
									<span id="errorDateOfYear" style="color:#900;"></span>
									<br /><br /><hr />
								{/if}
								<br />
								{if $recurrence.id gt 0}
									<input type="hidden" name="startPeriod" value="{$recurrence.startPeriod}"/>
									<input type="hidden" name="nbRecurrences" value="{$recurrence.nbRecurrences}"/>
									<input type="hidden" name="endPeriod" value="{$recurrence.endPeriod}"/>
									{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date},&nbsp;
									{if $recurrence.endPeriod gt 0}
										{tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}
									{else}
										{tr}ending after{/tr} {$recurrence.nbRecurrences} {tr}events{/tr}
									{/if}.
								{else}
									{tr}Start period{/tr}&nbsp;
									{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
										{jscalendar id="startPeriod" date=$recurrence.startPeriod fieldname="startPeriod" align="Bc" showtime='n'}
									{else}
										{html_select_date prefix="startPeriod_" time=$recurrence.startPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
									{/if}
									<br /><hr style="width:75%"/>
									<input type="radio" id="id_endTypeNb" name="endType" value="nb"
										{if $recurrence.nbRecurrences or $calitem.calitemId eq 0}
											checked="checked"
										{/if}
									/>
									&nbsp;
									<label for="id_endTypeNb">
										{tr}End after{/tr}&nbsp;
									</label>
									<input type="text" name="nbRecurrences" size="3" style="text-align:right" value="
										{if $recurrence.nbRecurrences gt 0}
											{$recurrence.nbRecurrences}
											{assign var='occurnumber' value="{tr}occurrences{/tr}"}
										{elseif $calitem.calitemId eq 0 or $recurrence.nbRecurrences eq 0}
											1
											{assign var='occurnumber' value="{tr}occurrence{/tr}"}
										{else}
											{assign var='occurnumber' value="{tr}occurrences{/tr}"}
										{/if}
									"/>&nbsp;
									<label for="id_endTypeNb">
										{$occurnumber}
									</label>
									<br />
									<input type="radio" id="id_endTypeDt" name="endType" value="dt"
										{if $recurrence.endPeriod gt 0}
											checked="checked"
										{/if}
									/>
									&nbsp;
									<label for="id_endTypeDt">
										{tr}End before{/tr}&nbsp;
									</label>
									{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
										{jscalendar id="endPeriod" date=$recurrence.endPeriod fieldname="endPeriod" align="Bc" showtime='n'}
									{else}
										{html_select_date prefix="endPeriod_" time=$recurrence.endPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
									{/if}
								{/if}
								<br />&nbsp;
							</div>
						{else}
							{if $recurrence.id > 0}
								{if $recurrence.nbRecurrences eq 1}
									{tr}Event occurs once on{/tr}&nbsp;{$recurrence.startPeriod|tiki_long_date}
								{/if}
								{if $recurrence.nbRecurrences gt 1 or $recurrence.endPeriod gt 0}
									{tr}Event is repeated{/tr}&nbsp;
									{if $recurrence.nbRecurrences gt 1}
										{$recurrence.nbRecurrences} {tr}times{/tr},&nbsp;
									{/if}
									{if $recurrence.weekly}
										{tr}on{/tr}&nbsp;{tr}{$daysnames[$recurrence.weekday]}s{/tr},
									{elseif $recurrence.monthly}
										{tr}on{/tr}&nbsp;{$recurrence.dayOfMonth} {tr}of every month{/tr}
									{else}
										{tr}on each{/tr}&nbsp;{$recurrence.dateOfYear_day} {tr}of{/tr} {tr}{$monthnames[$recurrence.dateOfYear_month]}{/tr}
									{/if}
									<br />
									{tr}starting{/tr} {$recurrence.startPeriod|tiki_long_date}
									{if $recurrence.endPeriod gt 0}
										, {tr}ending{/tr}&nbsp;{$recurrence.endPeriod|tiki_long_date}
									{/if}.
								{/if}
							{/if}
						{/if}
					</td>
				</tr>
			{/if}{* end recurrence *}
			<tr>
				<td>
					{tr}Start{/tr}
				</td>
				<td>
					{if $edit}
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
										<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									{/if}
								</td>
								<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
									<div id="startdate">
										{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
											{jscalendar id="start" date=$calitem.start fieldname="save[date_start]" align="Bc" showtime='n'}
										{else}
											{html_select_date prefix="start_date_" time=$calitem.start field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
										{/if}
									</div>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									<span id="starttimehourplus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
									<span id="starttime"{$hidden_if_all_day}>
										{html_select_time prefix="start_" display_seconds=false time=$calitem.start minute_interval=$prefs.calendar_timespan 
											hour_minmax=$hour_minmax use_24_hours=$use_24hr_clock}
									</span>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									<span id="starttimeminplus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle;" rowspan="2">
									<label for="alldayid">
										<input type="checkbox" id="alldayid" name="allday" 
											onclick="toggleSpan('starttimehourplus');
												toggleSpan('starttimehourminus');
												toggleSpan('starttime');
												toggleSpan('starttimeminplus');
												toggleSpan('starttimeminminus');
												toggleSpan('endtimehourplus');
												toggleSpan('endtimehourminus');
												toggleSpan('endtime');
												toggleSpan('endtimeminplus');
												toggleSpan('endtimeminminus');
												toggleSpan('durhourplus');
												toggleSpan('durhourminus');
												toggleSpan('duration');
												toggleSpan('duratione');
												toggleSpan('durminplus');
												toggleSpan('durminminus');"
											value="true" 
											{if $calitem.allday}
												 checked="checked" 
											{/if}
										 />
										{tr}All day{/tr}
									</label>
								</td>
							</tr>
							<tr>
								<td style="border:0;vertical-align:middle">
									{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
										<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									{/if}
								</td>
								<td style="border:0;vertical-align:middle">
									<span id="starttimehourminus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td style="border:0;vertical-align:middle">
									<span id="starttimeminminus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
							</tr>
						</table>
					{else}
						{if $calitem.allday}
							<abbr class="dtstart" title="{$calitem.start|tiki_short_date}">
								{$calitem.start|tiki_long_date}
							</abbr>
						{else}
							<abbr class="dtstart" title="{$calitem.start|isodate}">
								{$calitem.start|tiki_long_datetime}
							</abbr>
						{/if}
					{/if}
				</td>
			</tr>
			<tr>
				<td>
					{tr}End{/tr}
				</td>
				<td>
					{if $edit}
						<input type="hidden" name="save[end_or_duration]" value="end" id="end_or_duration" />
						<div id="end_date">
							 {* the display:block inline style used here is needed to make toggle() function work properly *}
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
											<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										{/if}
									</td>
									<td rowspan="2" style="border:0;vertical-align:middle">
										<div id="enddate">
											{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
												{jscalendar id="end" date=$calitem.end fieldname="save[date_end]" align="Bc" showtime='n'}
											{else}
												{html_select_date prefix="end_date_" time=$calitem.end field_order=$prefs.display_field_order  start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
											{/if}
										</div>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="endtimehourplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Hour.selectedIndex=(document.f.end_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
										<span id="endtime"{$hidden_if_all_day}>
											{html_select_time prefix="end_" display_seconds=false time=$calitem.end minute_interval=$prefs.calendar_timespan 
												hour_minmax=$hour_minmax use_24_hours=$use_24hr_clock}
										</span>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="endtimeminplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Minute.selectedIndex=(document.f.end_Minute.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
										<span id="duration"{$hidden_if_all_day}>
											<a href="#" onclick="document.getElementById('end_or_duration').value='duration';flip('end_duration');flip('end_date');return false;return false;">
												{tr}Show duration{/tr}
											</a>
										</span>
									</td>
								</tr>
								<tr>
									<td style="border:0;vertical-align:middle">
										{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
											<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										{/if}
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="endtimehourminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Hour.selectedIndex=(document.f.end_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="endtimeminminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Minute.selectedIndex=(document.f.end_Minute.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
								</tr>
							</table>
						</div>
						<div id="end_duration" style="display:none;">
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="durhourplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Hour.selectedIndex=(document.f.duration_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle" rowspan="2" class="html_select_time">
										<span id="duratione"{$hidden_if_all_day}>
											{html_select_time prefix="duration_" display_seconds=false time=$calitem.duration|default:'01:00' minute_interval=$prefs.calendar_timespan}
										</span>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="durminplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Minute.selectedIndex=(document.f.duration_Minute.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
										<a href="#" onclick="document.getElementById('end_or_duration').value='end';flip('end_date');flip('end_duration');return false;">
											{tr}Show end date and time{/tr}
										</a>
									</td>
								</tr>
								<tr>
									<td style="border:0;vertical-align:middle">
										<span id="durhourminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Hour.selectedIndex=(document.f.duration_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="durminminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Minute.selectedIndex=(document.f.duration_Minute.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
								</tr>
							</table>
						</div>
					{else}
						{if $calitem.allday}
							{if $calitem.end}
								<abbr class="dtend" title="{$calitem.end|tiki_short_date}">
							{/if}
							{$calitem.end|tiki_long_date}
							{if $calitem.end}
								</abbr>
							{/if}
						{else}
							{if $calitem.end}
								<abbr class="dtend" title="{$calitem.end|isodate}">
							{/if}
							{$calitem.end|tiki_long_datetime}
							{if $calitem.end}
								</abbr>
							{/if}
						{/if}
					{/if}
					{if $impossibleDates}
						<br />
						<span style="color:#900;">
							{tr}Events cannot end before they start{/tr}
						</span>
					{/if}
				</td>
			</tr>
			{if !empty($calitem.parsed)}
				<tr>
					<td>
						{tr}Description{/tr}
					</td>
					<td>
						{if $edit}
							{textarea name="save[description]" id="editwiki" cols=40 rows=10}
								{$calitem.description}
							{/textarea}
						{else}
							<span{if $prefs.calendar_description_is_html neq "y"} class="description"{/if}>
								{$calitem.parsed|default:"<i>{tr}No description{/tr}</i>"}
							</span>
						{/if}
					</td>
				</tr>
			{/if}<commit_msg>[FIX] calendars: Always show description in edit mode (oops)<commit_after>{strip}
	{title admpage="calendar"}{tr}Calendar event : {/tr}{$calitem.name}{/title}
	
	<div class="navbar">
		{if $tiki_p_view_calendar eq 'y'}
			{button href="tiki-calendar.php" _text="{tr}View Calendars{/tr}"}
		{/if}
		{if $tiki_p_admin_calendar eq 'y'}
			{button href="tiki-admin_calendars.php?calendarId=$calendarId" _text="{tr}Edit Calendar{/tr}"}
		{/if}
		{if $tiki_p_add_events eq 'y' and $id}
			{button href="tiki-calendar_edit_item.php" _text="{tr}New event{/tr}"}
		{/if}
		{if $id}
			{if $edit}
				{button href="tiki-calendar_edit_item.php?viewcalitemId=$id" _text="{tr}View event{/tr}"}
			{elseif $tiki_p_change_events eq 'y'}
				{button href="tiki-calendar_edit_item.php?calitemId=$id" _text="{tr}Edit/Delete event{/tr}"}
			{/if}
		{/if}
		{if $tiki_p_admin_calendar eq 'y'}
			{button href="tiki-admin_calendars.php" _text="{tr}Admin Calendars{/tr}"}
		{/if}
	</div>
	
	<div class="wikitext">
		{if $edit}
			{if $preview}
				<h2>
					{tr}Preview{/tr}
				</h2>
				{$calitem.parsedName}
				<div class="wikitext">
					{$calitem.parsed}
				</div>
				<h2>
					{if $id}
						{tr}Edit Calendar Item{/tr}
					{else}
						{tr}New Calendar Item{/tr}
					{/if}
				</h2>
			{/if}
			<form action="{$myurl}" method="post" name="f" id="editcalitem">
				<input type="hidden" name="save[user]" value="{$calitem.user}" />
				{if $id}
					<input type="hidden" name="save[calitemId]" value="{$id}" />
				{/if}
		{/if}
		{if $prefs.calendar_addtogooglecal == 'y'}
			{wikiplugin _name="addtogooglecal" calitemid=$id}{/wikiplugin}
		{/if}
		<table class="formcolor{if !$edit} vevent{/if}">
			<tr>
				<td>
					{tr}Calendar{/tr}
				</td>
				<td style="background-color:#{$calendar.custombgcolor};color:#{$calendar.customfgcolor};">
					{if $edit}
						{if $prefs.javascript_enabled eq 'n'}
							{$calendar.name|escape}<br />{tr}or{/tr}&nbsp;
							<input type="submit" name="changeCal" value="{tr}Go to{/tr}" />
						{/if}
						<select name="save[calendarId]" id="calid" onchange="javascript:needToConfirm=false;document.getElementById('editcalitem').submit();">
							{foreach item=it key=itid from=$listcals}
								{if $it.tiki_p_add_events eq 'y'}
									<option value="{$it.calendarId}" style="background-color:#{$it.custombgcolor};color:#{$it.customfgcolor};"
										{if isset($calitem.calendarId)}
											{if $calitem.calendarId eq $itid}
												 selected="selected"
											{/if}
										{else}
											{if $calendarView}
												{if $calendarView eq $itid}
													 selected="selected"
												{/if}
											{else}
												{if $calendarId}
													{if $calendarId eq $itid}
														 selected="selected"
													{/if}
												{/if}
											{/if}
										{/if}
									>
										{$it.name|escape}
									</option>
								{/if}
							{/foreach}
						</select>
					{else}
						{$listcals[$calitem.calendarId].name|escape}
					{/if}
				</td>
			</tr>
			
			<tr>
				<td>
					{tr}Title{/tr}
				</td>
				<td>
					{if $edit}
						<input type="text" name="save[name]" value="{$calitem.name|escape}" size="32" style="width:90%;"/>
					{else}
						<span class="summary">
							{$calitem.name|escape}
						</span>
					{/if}
				</td>
			</tr>
			{if $edit or $recurrence.id gt 0}
				<tr>
					<td>
						{tr}Recurrence{/tr}
					</td>
					<td>
						{if $edit}
							{if $recurrence.id gt 0}
								<input type="hidden" name="recurrent" value="1"/>
								{tr}This event depends on a recurrence rule{/tr}
							{else}
								<input type="checkbox" id="id_recurrent" name="recurrent" value="1" onclick="toggle('recurrenceRules');toggle('startdate');toggle('enddate');togglereminderforrecurrence();"
									{if $calitem.recurrenceId gt 0 or $recurrent eq 1}
										checked="checked"
									{/if}
								/>
								<label for="id_recurrent">
									{tr}This event depends on a recurrence rule{/tr}
								</label>
							{/if}
						{else}
							<span class="summary">
								{if $calitem.recurrenceId gt 0}
									{tr}This event depends on a recurrence rule{/tr}
								{else}
									{tr}This event is not recurrent{/tr}
								{/if}
							</span>
						{/if}
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
					<td style="padding:5px 10px">
						{if $edit}
							<div id="recurrenceRules" style="width:100%;
								{if ( !($calitem.recurrenceId gt 0) and $recurrent neq 1 ) && $prefs.javascript_enabled eq 'y'}
									display:none;
								{/if}"
							>
								{if $calitem.recurrenceId gt 0}
									<input type="hidden" name="recurrenceId" value="{$recurrence.id}" />
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.weekly}
										<input type="hidden" name="recurrenceType" value="weekly" />{tr}On a weekly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeW" name="recurrenceType" value="weekly"
										{if $recurrence.weekly or $calitem.calitemId eq 0}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeW">
										{tr}On a weekly basis{/tr}
									</label>
									<br />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.weekly}
									{tr}Each{/tr}&nbsp;
									<select name="weekday">
										<option value="0"
											{if $recurrence.weekday eq '0'}
												selected="selected"
											{/if}
										>
											{tr}Sunday{/tr}
										</option>
										<option value="1"
											{if $recurrence.weekday eq '1'}
												selected="selected"
											{/if}
										>
											{tr}Monday{/tr}
										</option>
										<option value="2"
											{if $recurrence.weekday eq '2'}
												selected="selected"
											{/if}
										>
											{tr}Tuesday{/tr}
										</option>
										<option value="3"
											{if $recurrence.weekday eq '3'}
												selected="selected"
											{/if}
										>
											{tr}Wednesday{/tr}
										</option>
										<option value="4"
											{if $recurrence.weekday eq '4'}
												selected="selected"
											{/if}
										>
											{tr}Thursday{/tr}
										</option>
										<option value="5"
											{if $recurrence.weekday eq '5'}
												selected="selected"
											{/if}
										>
											{tr}Friday{/tr}
										</option>
										<option value="6"
											{if $recurrence.weekday eq '6'}
												selected="selected"
											{/if}
										>
											{tr}Saturday{/tr}
										</option>
									</select>
									&nbsp;{tr}of the week{/tr}
									<br />
									<hr style="width:75%"/>
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.monthly}
										<input type="hidden" name="recurrenceType" value="monthly" />{tr}On a monthly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeM" name="recurrenceType" value="monthly"
										{if $recurrence.monthly}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeM">
										{tr}On a monthly basis{/tr}
									</label>
									<br />
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.monthly}
									{tr}Each{/tr}&nbsp;
									<select name="dayOfMonth">
										{section name=k start=1 loop=32}
											<option value="{$smarty.section.k.index}"
												{if $recurrence.dayOfMonth eq $smarty.section.k.index}
													selected="selected"
												{/if}
											>
												{if $smarty.section.k.index lt 10}
													0
												{/if}
												{$smarty.section.k.index}
											</option>
										{/section}
									</select>
									&nbsp;{tr}of the month{/tr}
									<br /><hr style="width:75%"/>
								{/if}
								{if $recurrence.id gt 0}
									{if $recurrence.yearly}
									  <input type="hidden" name="recurrenceType" value="yearly" />{tr}On a yearly basis{/tr}<br />
									{/if}
								{else}
									<input type="radio" id="id_recurrenceTypeY" name="recurrenceType" value="yearly"
										{if $recurrence.yearly}
											checked="checked"
										{/if}
									/>
									<label for="id_recurrenceTypeY">
										{tr}On a yearly basis{/tr}
									</label>
									<br />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								{/if}
								{if $recurrence.id eq 0 or $recurrence.yearly}
									{tr}Each{/tr}&nbsp;
									<select name="dateOfYear_day" onChange="checkDateOfYear(this.options[this.selectedIndex].value,document.forms['f'].elements['dateOfYear_month'].options[document.forms['f'].elements['dateOfYear_month'].selectedIndex].value);">
										{section name=k start=1 loop=32}
											<option value="{$smarty.section.k.index}"
												{if $recurrence.dateOfYear_day eq $smarty.section.k.index}
													selected="selected"
												{/if}
											>
												{if $smarty.section.k.index lt 10}
													0
												{/if}
												{$smarty.section.k.index}
											</option>
										{/section}
									</select>
									&nbsp;{tr}of{/tr}&nbsp;
									<select name="dateOfYear_month" onChange="checkDateOfYear(document.forms['f'].elements['dateOfYear_day'].options[document.forms['f'].elements['dateOfYear_day'].selectedIndex].value,this.options[this.selectedIndex].value);">
										<option value="1"
											{if $recurrence.dateOfYear_month eq '1'}
												selected="selected"
											{/if}
										>
											{tr}January{/tr}
										</option>
										<option value="2"
											{if $recurrence.dateOfYear_month eq '2'}
												selected="selected"
											{/if}
										>
											{tr}February{/tr}
										</option>
										<option value="3"
											{if $recurrence.dateOfYear_month eq '3'}
												selected="selected"
											{/if}
										>
											{tr}March{/tr}
										</option>
										<option value="4"
											{if $recurrence.dateOfYear_month eq '4'}
												selected="selected"
											{/if}
										>
											{tr}April{/tr}
										</option>
										<option value="5"
											{if $recurrence.dateOfYear_month eq '5'}
												selected="selected"
											{/if}
										>
											{tr}May{/tr}
										</option>
										<option value="6"
											{if $recurrence.dateOfYear_month eq '6'}
												selected="selected"
											{/if}
										>
											{tr}June{/tr}
										</option>
										<option value="7"
											{if $recurrence.dateOfYear_month eq '7'}
												selected="selected"
											{/if}
										>
											{tr}July{/tr}
										</option>
										<option value="8"
											{if $recurrence.dateOfYear_month eq '8'}
												selected="selected"
											{/if}
										>
											{tr}August{/tr}
										</option>
										<option value="9"
											{if $recurrence.dateOfYear_month eq '9'}
												selected="selected"
											{/if}
										>
											{tr}September{/tr}
										</option>
										<option value="10"
											{if $recurrence.dateOfYear_month eq '10'}
												selected="selected"
											{/if}
										>
											{tr}October{/tr}</option>
										<option value="11"
											{if $recurrence.dateOfYear_month eq '11'}
												selected="selected"
											{/if}
										>
											{tr}November{/tr}
										</option>
										<option value="12"
											{if $recurrence.dateOfYear_month eq '12'}
												selected="selected"
											{/if}
										>
											{tr}December{/tr}
										</option>
									</select>
									&nbsp;&nbsp;
									<span id="errorDateOfYear" style="color:#900;"></span>
									<br /><br /><hr />
								{/if}
								<br />
								{if $recurrence.id gt 0}
									<input type="hidden" name="startPeriod" value="{$recurrence.startPeriod}"/>
									<input type="hidden" name="nbRecurrences" value="{$recurrence.nbRecurrences}"/>
									<input type="hidden" name="endPeriod" value="{$recurrence.endPeriod}"/>
									{tr}Starting on{/tr} {$recurrence.startPeriod|tiki_long_date},&nbsp;
									{if $recurrence.endPeriod gt 0}
										{tr}ending by{/tr} {$recurrence.endPeriod|tiki_long_date}
									{else}
										{tr}ending after{/tr} {$recurrence.nbRecurrences} {tr}events{/tr}
									{/if}.
								{else}
									{tr}Start period{/tr}&nbsp;
									{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
										{jscalendar id="startPeriod" date=$recurrence.startPeriod fieldname="startPeriod" align="Bc" showtime='n'}
									{else}
										{html_select_date prefix="startPeriod_" time=$recurrence.startPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
									{/if}
									<br /><hr style="width:75%"/>
									<input type="radio" id="id_endTypeNb" name="endType" value="nb"
										{if $recurrence.nbRecurrences or $calitem.calitemId eq 0}
											checked="checked"
										{/if}
									/>
									&nbsp;
									<label for="id_endTypeNb">
										{tr}End after{/tr}&nbsp;
									</label>
									<input type="text" name="nbRecurrences" size="3" style="text-align:right" value="
										{if $recurrence.nbRecurrences gt 0}
											{$recurrence.nbRecurrences}
											{assign var='occurnumber' value="{tr}occurrences{/tr}"}
										{elseif $calitem.calitemId eq 0 or $recurrence.nbRecurrences eq 0}
											1
											{assign var='occurnumber' value="{tr}occurrence{/tr}"}
										{else}
											{assign var='occurnumber' value="{tr}occurrences{/tr}"}
										{/if}
									"/>&nbsp;
									<label for="id_endTypeNb">
										{$occurnumber}
									</label>
									<br />
									<input type="radio" id="id_endTypeDt" name="endType" value="dt"
										{if $recurrence.endPeriod gt 0}
											checked="checked"
										{/if}
									/>
									&nbsp;
									<label for="id_endTypeDt">
										{tr}End before{/tr}&nbsp;
									</label>
									{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
										{jscalendar id="endPeriod" date=$recurrence.endPeriod fieldname="endPeriod" align="Bc" showtime='n'}
									{else}
										{html_select_date prefix="endPeriod_" time=$recurrence.endPeriod field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
									{/if}
								{/if}
								<br />&nbsp;
							</div>
						{else}
							{if $recurrence.id > 0}
								{if $recurrence.nbRecurrences eq 1}
									{tr}Event occurs once on{/tr}&nbsp;{$recurrence.startPeriod|tiki_long_date}
								{/if}
								{if $recurrence.nbRecurrences gt 1 or $recurrence.endPeriod gt 0}
									{tr}Event is repeated{/tr}&nbsp;
									{if $recurrence.nbRecurrences gt 1}
										{$recurrence.nbRecurrences} {tr}times{/tr},&nbsp;
									{/if}
									{if $recurrence.weekly}
										{tr}on{/tr}&nbsp;{tr}{$daysnames[$recurrence.weekday]}s{/tr},
									{elseif $recurrence.monthly}
										{tr}on{/tr}&nbsp;{$recurrence.dayOfMonth} {tr}of every month{/tr}
									{else}
										{tr}on each{/tr}&nbsp;{$recurrence.dateOfYear_day} {tr}of{/tr} {tr}{$monthnames[$recurrence.dateOfYear_month]}{/tr}
									{/if}
									<br />
									{tr}starting{/tr} {$recurrence.startPeriod|tiki_long_date}
									{if $recurrence.endPeriod gt 0}
										, {tr}ending{/tr}&nbsp;{$recurrence.endPeriod|tiki_long_date}
									{/if}.
								{/if}
							{/if}
						{/if}
					</td>
				</tr>
			{/if}{* end recurrence *}
			<tr>
				<td>
					{tr}Start{/tr}
				</td>
				<td>
					{if $edit}
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
										<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									{/if}
								</td>
								<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
									<div id="startdate">
										{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
											{jscalendar id="start" date=$calitem.start fieldname="save[date_start]" align="Bc" showtime='n'}
										{else}
											{html_select_date prefix="start_date_" time=$calitem.start field_order=$prefs.display_field_order start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
										{/if}
									</div>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									<span id="starttimehourplus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
									<span id="starttime"{$hidden_if_all_day}>
										{html_select_time prefix="start_" display_seconds=false time=$calitem.start minute_interval=$prefs.calendar_timespan 
											hour_minmax=$hour_minmax use_24_hours=$use_24hr_clock}
									</span>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle">
									<span id="starttimeminplus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex+1);return false;">
											{icon _id='plus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td style="border:0;padding-top:2px;vertical-align:middle;" rowspan="2">
									<label for="alldayid">
										<input type="checkbox" id="alldayid" name="allday" 
											onclick="toggleSpan('starttimehourplus');
												toggleSpan('starttimehourminus');
												toggleSpan('starttime');
												toggleSpan('starttimeminplus');
												toggleSpan('starttimeminminus');
												toggleSpan('endtimehourplus');
												toggleSpan('endtimehourminus');
												toggleSpan('endtime');
												toggleSpan('endtimeminplus');
												toggleSpan('endtimeminminus');
												toggleSpan('durhourplus');
												toggleSpan('durhourminus');
												toggleSpan('duration');
												toggleSpan('duratione');
												toggleSpan('durminplus');
												toggleSpan('durminminus');"
											value="true" 
											{if $calitem.allday}
												 checked="checked" 
											{/if}
										 />
										{tr}All day{/tr}
									</label>
								</td>
							</tr>
							<tr>
								<td style="border:0;vertical-align:middle">
									{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
										<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									{/if}
								</td>
								<td style="border:0;vertical-align:middle">
									<span id="starttimehourminus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Hour.selectedIndex=(document.f.start_Hour.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
								<td style="border:0;vertical-align:middle">
									<span id="starttimeminminus"{$hidden_if_all_day}>
										<a href="#" onclick="document.f.start_Minute.selectedIndex=(document.f.start_Minute.selectedIndex-1);return false;">
											{icon _id='minus_small' align='left' width='11' height='8'}
										</a>
									</span>
								</td>
							</tr>
						</table>
					{else}
						{if $calitem.allday}
							<abbr class="dtstart" title="{$calitem.start|tiki_short_date}">
								{$calitem.start|tiki_long_date}
							</abbr>
						{else}
							<abbr class="dtstart" title="{$calitem.start|isodate}">
								{$calitem.start|tiki_long_datetime}
							</abbr>
						{/if}
					{/if}
				</td>
			</tr>
			<tr>
				<td>
					{tr}End{/tr}
				</td>
				<td>
					{if $edit}
						<input type="hidden" name="save[end_or_duration]" value="end" id="end_or_duration" />
						<div id="end_date">
							 {* the display:block inline style used here is needed to make toggle() function work properly *}
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
											<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										{/if}
									</td>
									<td rowspan="2" style="border:0;vertical-align:middle">
										<div id="enddate">
											{if $prefs.feature_jscalendar eq 'y' and $prefs.javascript_enabled eq 'y'}
												{jscalendar id="end" date=$calitem.end fieldname="save[date_end]" align="Bc" showtime='n'}
											{else}
												{html_select_date prefix="end_date_" time=$calitem.end field_order=$prefs.display_field_order  start_year=$prefs.calendar_start_year end_year=$prefs.calendar_end_year}
											{/if}
										</div>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="endtimehourplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Hour.selectedIndex=(document.f.end_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;vertical-align:middle" class="html_select_time">
										<span id="endtime"{$hidden_if_all_day}>
											{html_select_time prefix="end_" display_seconds=false time=$calitem.end minute_interval=$prefs.calendar_timespan 
												hour_minmax=$hour_minmax use_24_hours=$use_24hr_clock}
										</span>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="endtimeminplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Minute.selectedIndex=(document.f.end_Minute.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
										<span id="duration"{$hidden_if_all_day}>
											<a href="#" onclick="document.getElementById('end_or_duration').value='duration';flip('end_duration');flip('end_date');return false;return false;">
												{tr}Show duration{/tr}
											</a>
										</span>
									</td>
								</tr>
								<tr>
									<td style="border:0;vertical-align:middle">
										{if $prefs.feature_jscalendar neq 'y' or $prefs.javascript_enabled neq 'y'}
											<a href="#" onclick="document.f.Time_Hour.selectedIndex=(document.f.Time_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										{/if}
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="endtimehourminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Hour.selectedIndex=(document.f.end_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="endtimeminminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.end_Minute.selectedIndex=(document.f.end_Minute.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
								</tr>
							</table>
						</div>
						<div id="end_duration" style="display:none;">
							<table cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="durhourplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Hour.selectedIndex=(document.f.duration_Hour.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle" rowspan="2" class="html_select_time">
										<span id="duratione"{$hidden_if_all_day}>
											{html_select_time prefix="duration_" display_seconds=false time=$calitem.duration|default:'01:00' minute_interval=$prefs.calendar_timespan}
										</span>
									</td>
									<td style="border:0;padding-top:2px;vertical-align:middle">
										<span id="durminplus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Minute.selectedIndex=(document.f.duration_Minute.selectedIndex+1);return false;">
												{icon _id='plus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td rowspan="2" style="border:0;padding-top:2px;vertical-align:middle">
										<a href="#" onclick="document.getElementById('end_or_duration').value='end';flip('end_date');flip('end_duration');return false;">
											{tr}Show end date and time{/tr}
										</a>
									</td>
								</tr>
								<tr>
									<td style="border:0;vertical-align:middle">
										<span id="durhourminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Hour.selectedIndex=(document.f.duration_Hour.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
									<td style="border:0;vertical-align:middle">
										<span id="durminminus"{$hidden_if_all_day}>
											<a href="#" onclick="document.f.duration_Minute.selectedIndex=(document.f.duration_Minute.selectedIndex-1);return false;">
												{icon _id='minus_small' align='left' width='11' height='8'}
											</a>
										</span>
									</td>
								</tr>
							</table>
						</div>
					{else}
						{if $calitem.allday}
							{if $calitem.end}
								<abbr class="dtend" title="{$calitem.end|tiki_short_date}">
							{/if}
							{$calitem.end|tiki_long_date}
							{if $calitem.end}
								</abbr>
							{/if}
						{else}
							{if $calitem.end}
								<abbr class="dtend" title="{$calitem.end|isodate}">
							{/if}
							{$calitem.end|tiki_long_datetime}
							{if $calitem.end}
								</abbr>
							{/if}
						{/if}
					{/if}
					{if $impossibleDates}
						<br />
						<span style="color:#900;">
							{tr}Events cannot end before they start{/tr}
						</span>
					{/if}
				</td>
			</tr>
			{if $edit or !empty($calitem.parsed)}
				<tr>
					<td>
						{tr}Description{/tr}
					</td>
					<td>
						{if $edit}
							{textarea name="save[description]" id="editwiki" cols=40 rows=10}
								{$calitem.description}
							{/textarea}
						{else}
							<span{if $prefs.calendar_description_is_html neq "y"} class="description"{/if}>
								{$calitem.parsed|default:"<i>{tr}No description{/tr}</i>"}
							</span>
						{/if}
					</td>
				</tr>
			{/if}
{'fraction_non_alphanumeric': 0.16255678131083712, 'fraction_numerical': 0.008904751604297354, 'mean_word_length': 2.1319934511375824, 'pattern_counts': {'":': 0, '<': 661, '<?xml version=': 0, '>': 663, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5613347', 'n_tokens_mistral': 30326, 'n_tokens_neox': 18800, 'n_words': 3113}