<div id="inforightbtns">
    {if $personalapp->editable}
        <span class="dialog_make_btn16 edit mobile_big24 smallbtns ui-corner-all"
        onclick="personalapp.open({$personalapp->id}, false, '');"
        title="{$i.basic_edit}"></span>
    {/if}
    {if $personalapp->deletable}
        <span class="dialog_make_btn16 delete smallbtns ui-corner-all"
            onclick="personalapp.delete_entry({$personalapp->id}, {$personalapp->app_type});"
            title="{$i.basic_delete}"></span>
        &nbsp;
    {/if}
    
    {if !$personalapp->is_private || $curr_user_id==$personalapp->staff_to_id || $curr_user_id==$personalapp->staff_to_id}
    <ul class="functionmenu">
        <li class="ui-corner-all"><span class="ui-widget-header ui-corner-all">{$i.basic_functions}</span>
            <ul>
            {if $curr_user_id==$personalapp->staff_to_id}
                {if $personalapp->is_new}
                    {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_confirm_read
                        icon="not_read" action="personalapp.set_read({$personalapp->id}, 1);"}
                {else}
                    {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_set_unread
                        icon="read" action="personalapp.set_read({$personalapp->id}, 0);"}
                    {if !$mode_o365}
                        {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_curr_ical_download
                            icon="ics" action="usComm.windowOpen('{site_url url="/start/open/personalappointmentplaner/ical/`$right_xjxcookie`/{$personalapp->id}"}');"}
                    {/if}
                {/if}
            {/if}         
            
            {if !$personalapp->is_private || $curr_user_id==$personalapp->staff_to_id}
                {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_copy
                    action="personalapp.copy_entry({$personalapp->id});"}
            {/if}
            
            {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_emailpartic icon="email"
                action="{emailgroup emails=$personalapp_emails_partic
                    personalapp=$personalapp type='to'}"}
            {include file="r_basic/functionmenuitem.tpl" title="CC `$i.personalapp_emailpartic`" icon="email"
                action="{emailgroup emails=$personalapp_emails_partic
                    personalapp=$personalapp}"}
            {include file="r_basic/functionmenuitem.tpl" title="BCC `$i.personalapp_emailpartic`" icon="email"
                action="{emailgroup emails=$personalapp_emails_partic 
                    personalapp=$personalapp type='bcc'}"}
            
            {if !$personalapp->fullday && $curr_user_id==$personalapp->staff_to_id}
                {if count($created_times) > 0}
                    <li>
                        <span onclick="alert('{$i.personalapp_add_to_workinput_already}');" title="{$i.personalapp_add_to_workinput_already}"
                              class="dialog_make_btn16 already_imported ui-corner-all">{$i.personalapp_add_to_workinput}</span>
                    </li>
                {else}
                    {include file="r_basic/functionmenuitem.tpl" title=$i.personalapp_add_to_workinput icon="add_vac_to_hours"
                        action="personalapp.add_to_workinput({$personalapp->id});"}
                {/if}
            {/if}
            </ul>
        </li>
    </ul>    
    {/if}
    
</div>
<div id="inforight" class="below">
    {include file="Calendar/info_right_table.tpl"}
</div>