{if $events}
{foreach from=$events item=event}
<a name="{$event->Id}"></a>
<div class="box_innerhead">
{$event->Titel|koobispecialchars}
</div>


<div class="box_data">{$event->descr|sslash}</div>
<div class="infobox">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="120"><strong>{#Calendar_addedfrom#}: </strong></td>
    <td><a href="index.php?p=user&amp;id={$event->Benutzer}&amp;area={$area}">{$event->UserName}</a></td>
  </tr>
  <tr>
    <td width="120"><strong>{#Calendar_addedon#}: </strong></td>
    <td>{$event->Datum}</td>
  </tr>
  <tr>
    <td><strong>{#Calendar_timespan#}:</strong></td>
    <td>
	{if $event->wd==1}
  {#Calendar_wholeDay#}
  {if $event->Erledigt==1} ({#Calendar_done#}){/if}
 {else}
  {$event->Start|date_format:$config_vars.DateFomat} - {$event->Ende|date_format:$config_vars.DateFomat}
  {if $event->Erledigt==1} ({#Calendar_done#}){/if}
  {/if}
	</td>
  </tr>
  <tr>
    <td><strong>{#Calendar_weight#}:</strong></td>
    <td>{$event->weight}</td>
  </tr>
</table>
</div>

<div>
<br />
{if $smarty.session.benutzer_id==$event->Benutzer || permission('edit_all_events')}
<a href="index.php?p=calendar&amp;action=editevent&amp;show={$smarty.request.show}&amp;koobi_monat={$smarty.request.koobi_monat}&amp;koobi_jahr={$smarty.request.koobi_jahr}&amp;koobi_tag={$smarty.request.koobi_tag}&amp;id={$event->Id}&amp;area={$area}">{#Calendar_eventEdit#}</a>&nbsp;|&nbsp;
<a onclick="return confirm('{#Calendar_delC#}');" href="index.php?p=calendar&amp;action=delevent&amp;show={$smarty.request.show}&amp;koobi_monat={$smarty.request.koobi_monat}&amp;koobi_jahr={$smarty.request.koobi_jahr}&amp;koobi_tag={$smarty.request.koobi_tag}&amp;id={$event->Id}&amp;area={$area}">{#Calendar_eventDel#}</a>
{/if}
</div>
<br />
<br />
{/foreach}
{else} <br />
<h2>{#Calendar_noEvents#}</h2>
{/if}