<ul>
    {include file="r_basic/functionmenuitem.tpl" title=$i.basic_download
            icon="open_download" action="email_allocation.download_eml('{$email->id}')"}
    
    {if isset($email->inbox_id) && $email->inbox_id !== null && is_string($email->inbox_id)}
        {include file="r_basic/functionmenuitem.tpl" title=$i.basic_mailinbox
                icon="inoutbox" action="usComm.windowOpen(ussettings.base_url+'start/open/mailinboxandoutbox/index/'+ussettings.xsrf+'/viewin/'+{$email->inbox_id})"}
    {/if}
    {if isset($email->outbox_id) && $email->outbox_id !== null && is_string($email->outbox_id)}
        {include file="r_basic/functionmenuitem.tpl" title=$i.basic_mailoutbox
                icon="inoutbox" action="usComm.windowOpen(ussettings.base_url+'start/open/mailinboxandoutbox/index/'+ussettings.xsrf+'/viewout/'+{$email->outbox_id})"}
    {/if}
    
{*}        
<ul class="functionmenu">
    <li class="ui-corner-all"><span class="ui-widget-header ui-corner-all">{$i.basic_functions}</span>
        <ul>
            {include file="r_basic/functionmenuitem.tpl" title=$i.basic_download
                     icon="open_download" action="email_allocation.download_eml('{$email->id}');"}
        </ul>
    </li>
</ul>
{*} 
</ul>