{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content}

{if $cid} {capture assign="customerlink"}{$customername}{/capture} {/if} {if $uid} {capture assign="userlink"}{$username}{/capture} {/if} {if $cid && $uid} {t a=$customerlink b=$userlink}Call List: $a / $b{/t} {elseif $cid && !$uid} {t a=$customerlink}Customer Call List: $a{/t} {elseif $uid & !$cid} {t a=$userlink}User Call List: $a{/t} {else} {trans("Call List")} {/if}

{block name="customer-call-list-header-pagination"} {if $pagination->getTotal() != 0} {/if} {/block} {block name="customer-call-list-footer-pagination"} {if $pagination->getTotal() != 0} {/if} {/block}
{icon name="phone-call" class="fa-fw"} {trans("Customer Phone Calls")}  
{icon name="filter"} {if !empty($users)} {/if} {date_period_preset from="[name=\"datefrom\"]" to="[name=\"dateto\"]" time=true} {icon name="clear" id="clear-filter"}
{include file="pagination.html"}
{include file="pagination.html"}
{foreach $customercalls as $call} {foreachelse} {/foreach}
{trans("Date")} {trans("User")} {trans("Duration")} {trans("Type")} {trans("Phone number")} {trans("Notes")}
{$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_call_management')} {button type="link" icon="delete" tip="Delete" href="?m=customercall&id={$call.id}&cid={$customerinfo.id}&delete"} {/if}

{trans("That customer hasn't got any phone calls.")}

{/block}