{css}
{tab_container id="customercalls" label="Phone Calls"} {tab_header content_id="callpanel"} {tab_header_cell icon="lms-ui-icon-phone-call"} {trans("Phone Calls")}  ({t a=$limit}last $a phone calls{/t}) {/tab_header_cell} {tab_header_cell} {trans("All Phone Calls")} {icon name="next" class="fa-fw"} {/tab_header_cell} {/tab_header} {tab_contents id="callpanel"} {tab_table} {if $customercalls}
{trans("Date")}
{trans("User")}
{trans("Duration")}
{trans("Type")}
{trans("Phone number")}
{trans("Notes")}
 
{/if} {foreach $customercalls as $call}
{$call.dt|date_format:"%Y/%m/%d %H:%M:%S"}
{$call.username|default:"-"|escape}
{if $call.duration == -1} {trans("- unknown -")} {else} {$call.duration|duration_format} {/if}
{capture assign="direction"}{if $call.outgoing}{trans("outgoing")}{else}{trans("incoming")}{/if}{/capture} {$direction}
{$call.phone}
{if $call.notes} {$call.notes|trunescape:50|@nl2br} {else} - {/if}
{if ConfigHelper::checkPrivilege('customer_call_management')} {button type="link" icon="edit" tip="Edit" class="customer-call-view customer-call-edit-button"} {button type="link" icon="save" tip="Save" class="customer-call-edit customer-call-save-button"} {button type="link" icon="cancel" tip="Cancel" class="customer-call-edit customer-call-cancel-button"} {/if} {button type="link" icon="download" tip="Download" href="?m=customercall&id={$call.id}" download="{trans("phone-call")}-{$direction}-{$call.dt|date_format:"%Y_%m_%d_%H_%M_%S"}-{$call.phone}"} {if ConfigHelper::checkPrivilege('customer_phonecall_delete')} {button type="link" icon="delete" tip="Delete" href="?m=customercall&id={$call.id}&cid={$customerinfo.id}&delete"} {/if}
{foreachelse}
{trans("That customer hasn't got any phone calls.")}
{/foreach} {/tab_table} {/tab_contents} {/tab_container}