<table>
    <thead>
        <tr>
            <th scope="col">{$i.filter_type}</th>
            <th scope="col">{$i.personalapp_date}</th>
            <th scope="col">{$i.personalapp_from_date} - {$i.personalapp_to_date}</th>
            <th scope="col">{$i.personalapp_summary}</th>
            <th scope="col">{$i.personalapp_comment}</th>
            <th scope="col">{$i.personalapp_location}</th>
            <th scope="col">{$i.basic_url}</th>
            <th scope="col" colspan="2">{$i.personalapp_project}</th>
            <th scope="col"><small>UID</small></th>
        </tr>
    </thead>
    <tbody>

    {foreach from=$events item=event key=count_id}
        {if $event->type eq 'personalapp'}
            <tr>
                <td>{$i.personalapp_appointment}</td>
                <td>
                    {$event->date_obj->us_date()}
                    {if $event->several_days_day_yn}
                        - {$event->several_days_last_date_obj->us_date()}
                    {else if isset($event->date_to_obj)}
                        - {$event->date_to_obj->us_date()}
                    {/if}
                </td>
                <td>
                    {if $event->from_yn}
                        {$event->time_from_obj->us_ltime()} - {$event->time_to_obj->us_ltime()}
                    {else}
                        {boolview value=false}
                    {/if}
                </td>
                <td>
                    {$event->summary|truncate:80}
                </td>
                <td>
                    {$event->comment|truncate:120|nl2br}
                </td>
                <td>{$event->location}</td>
                <td>{if $event->url}{link_if_url val=$event->url}{else}-{/if}</td>
                <td>
                    {include file='r/table_select.tpl' name="personalapp_opta_upload_project_`$count_id`" class="is_project required"
                        list=$projects_list id="id" text="project"
                        add_icons_file="project" filter_favourite_list=$projects_favourite_list}
                </td>
                <td title="iCalendar {$i.personalapp_project}: {if isset($event->project_id)}{$event->project_id}{/if}"></td>
                <td>{if isset($event->sabre_uid)}<small>{$event->sabre_uid}</small>{/if}</td>
            </tr>
        {/if}
    {foreachelse}
        <tr>
            <td colspan="9">
                <span class="warningsmall ui-corner-all">{$i.personalapp_nothing}</span>
            </td>
        </tr>
    {/foreach}

    </tbody>
</table>