{$_title = "[`Calls`]"} {$_is_admin = $wa->user()->isAdmin('crm')}
| [`Date`] | [`Phone`] | [`State`] | [`Client`] | [`Deal`] | [`User`] | ||||
| {if $_call.plugin_icon} {/if} | {if !empty($_call.create_datetime)} {$_call.create_datetime|wa_datetime} {/if} | {$_call.user_number|escape|default:"[`unknown`]"} {if !empty($_client) && !$contacts[$_call.client_contact_id]['is_visible']} [`hidden phone number`] {else} {$_call.client_number|escape|default:"[`unknown`]"} {/if} | {if !empty($_state)} {strip} {sprintf_wp($_state.name)|escape} {if $_state.id == "CONNECTED"} {/if} {/strip} {/if} | {crmHelper::formatSeconds($_call.duration)} {crmHelper::getCallRecordLinkHtml($_call)} |
{if !empty($_client)}
{_renderContact _contact=$_client}
{else}
[`Create or update contact`]
{/if}
|
{if !empty($_deal) && $_deal.is_visible}
{$_funnel = $funnels[$_deal.funnel_id]|default:null}
{if $_funnel}
{$_stage = $_funnel.stages[$_deal.stage_id]|default:null}
{if $_stage}
{$_deal.name|escape}
{else}
{$_deal.name|escape} [`Stage deleted`]
{/if}
{else}
{$_deal.name|escape} [`Funnel deleted`]
{/if}
{elseif !empty($availble_funnels) && !empty($_client) && $contacts[$_call.client_contact_id]['is_visible'] && empty($_deal)}
[`Associate with a deal`]
{elseif !empty($_deal) && !$_deal.is_visible}
[`deal is hidden`]
{/if}
|
{if !empty($_user)}{_renderContact _contact=$_user}{/if}
|
{if ifempty($_call.redirect_allowed)} {/if} |
{if !empty($_is_admin)}
{$_status_name = ""}{if !empty($_state)}{$_status_name = "{$_state.name}"}{/if}
{$_direction = "[`to`]"}{if $_call.direction === "IN"}{$_direction = "[`from`]"}{/if}
{$_number = $_call.plugin_client_number|default:"[`unknown`]"}
{$_delete_confirm_title = sprintf("Delete %s call %s %s", $_status_name, $_direction, $_number)}
{/if}
|
{if $pbx_plugins}
[`No phone calls.`]
{else}
[`No PBX plugins installed.`]
{sprintf_wp(
'To handle phone calls in CRM, install and set up IP telephony integration plugins.',
"`$wa_app_url`plugins/"
)}
{/if}