Code: Select all
<dl>
{foreach from=$items item="item"}
{* Počátek události *}
<div class="vevent">
{* Pokud jsou události již minulostí, nezobrazovat je *}
<dt{if $item.past eq "true"} style="display:none"{/if} class="summary">{$item.short}</dt>
<dd{if $item.past eq "true"} style="display:none"{/if}>
{* Pokud je datum počátku shodné s datem konce akce a neshoduje se čas *}
{if $item.start|date_format:"%Y-%m-%d" == $item.end|date_format:"%Y-%m-%d"} <p>{$item.start|date_format:"%d.%m %Y"}
{* Pokud se shoduje datum začátku a konce akce *}
{if $item.start|date_format:"%H:%M" == $item.end|date_format:"%H:%M"}
<abbr class="dtstart" title="{$item.hcstart}">{$item.start|date_format:"%H:%M"}</abbr></p>
{else}
{* Obecná událost *}
od <abbr class="dtstart" title="{$item.hcstart}">{$item.start|date_format:"%H:%M"}</abbr> do
<abbr class="dtend" title="{$item.hcend}">{$item.end|date_format:"%H:%M"}</abbr></p>
{/if}
{else}
<abbr class="dtstart" title="{$item.hcstart}">{$item.start|date_format:"%d.%m.%Y %H:%M"}</abbr>
do
<abbr class="dtend" title="{$item.hcend}">{$item.end|date_format:"%d.%m. %Y %H:%M"}</abbr></p>
{/if}
<div class="summary">{$item.long}</div>
</dd>
</div>
{/foreach}
</dl>