{tikimodule error=$module_params.error title=$tpl_module_title name="upcoming_events" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle} {* since the $smarty.section.ix.first makes classic indentation hard to read, we have non-standard indentation for better readability: html indentation and smarty indentation are independant. Please keep consistent with the general logic *} {if count($modUpcomingEvents)} {if isset($module_params.date_format)} {assign var=date_format value=$module_params.date_format} {else} {assign var=date_format value=$prefs.short_date_format|cat:' '|cat:$prefs.short_time_format} {/if} {section name=ix loop=$modUpcomingEvents} {assign var=date_value value=$modUpcomingEvents[ix].start|tiki_date_format:$date_format} {assign var=calendarId value=$modUpcomingEvents[ix].calendarId} {if !$smarty.section.ix.first} {/if} {if $nonums != 'y'} {/if} {/if} {/section}
{$smarty.section.ix.index_next})  {if $modUpcomingEvents[ix].allday} {$modUpcomingEvents[ix].start|tiki_short_date} {else} {$modUpcomingEvents[ix].start|tiki_date_format:$date_format} {if $showEnd eq 'y'} - {if $module_params.date_format}{$modUpcomingEvents[ix].end|tiki_date_format:$date_format}{elseif $modUpcomingEvents[ix].start|tiki_short_date ne $modUpcomingEvents[ix].end|tiki_short_date}{$modUpcomingEvents[ix].end|tiki_short_datetime}{else}{$modUpcomingEvents[ix].end|tiki_short_time}{/if} {/if} {/if}
{if $maxlen > 0}{* 0 is default value for maxlen eq to 'no truncate' *} {$modUpcomingEvents[ix].name|truncate:$maxlen:"...":true|escape} {else} {$modUpcomingEvents[ix].name|escape} {/if} {if $showDescription eq 'y'}
{$modUpcomingEvents[ix].parsed}
{/if} {if $smarty.section.ix.last}
{else} {tr}No records to display{/tr} {/if} {if $tiki_p_add_events eq 'y' && (empty($module_params.showaction) || $module_params.showaction ne 'n')}

{icon name="add"} {tr}Add Event{/tr}

{/if} {/tikimodule}