{$title|escape}

{if $context.type === 'segment' || $context.type === 'search'} {/if}
{function get_sortable_link txt='' id=''} {$_asc = null} {if $sort == $id} {if !$asc}{$_asc = '1'}{else}{$_asc = '0'}{/if} {/if} {$_url = crmHelper::getUrl(['sort' => $id, 'asc' => $_asc])} {$txt|escape} {if $sort == $id}{/if} {/function} {function name="_renderWidthToggle" column=[]} {strip}
{/strip} {/function} {$_column_width_classes = [ 's' => 'is-small', 'm' => 'is-middle', 'l' => 'is-large' ]} {if !empty($contacts)}
{* BODY *}
{foreach $contacts as $_contact} {$_user_uri = "`$wa_app_url`contact/`$_contact.id`/"} {$_col_number = 5} {foreach $columns_order as $_order} {$_column_width = $_order.width} {$_is_composite = $_order.is_composite} {$_column_id = $_order.column_id} {$_full_column_id = $_order.full_column_id} {$_width_class = $_column_width_classes[$_column_width]|default:'m'} {if $_is_composite} {$_sub_column_id = $_order.sub_column_id} {$_col_number = $_col_number + 1} {else} {$_col_number = $_col_number + 1} {/if} {/foreach} {/foreach}
{if !empty($_contact.photo_url_32)}
{/if}
{if !empty($_contact._online_status) && $_contact._online_status == 'online'} {$title = sprintf(_ws('%s is now online'), $_contact.name|escape)} {/if}
{if !empty($_contact.tags)} {/if}
{$values = $_contact['columns'][$_column_id][$_sub_column_id]} {if !is_array($values)} {$values = [$values]} {/if}
{foreach $values as $value} {$value|escape} {/foreach}
{$values = $_contact['columns'][$_column_id]} {if !is_array($values)} {$values = [$values]} {/if}
{foreach $values as $value} {$value|escape} {/foreach}
{* HEADER *}
{$_col_number = 5} {foreach $columns_order as $_order} {$_column_width = $_order.width} {$_is_composite = $_order.is_composite} {$_column_id = $_order.column_id} {$_full_column_id = $_order.full_column_id} {$_width_class = $_column_width_classes[$_column_width]|default:'m'} {$_column = $columns[$_column_id]} {if $_is_composite} {$_sub_column_id = $_order.sub_column_id} {$_sub_column = $columns[$_column_id]['sub_columns'][$_sub_column_id]} {$_col_number = $_col_number + 1} {else} {$is_sortable = $_column.is_sortable|default:false} {$_col_number = $_col_number + 1} {/if} {/foreach}
{get_sortable_link txt='[`Contact`]' id='name'}
{$_column.name|escape} — {$_sub_column.name|escape} {_renderWidthToggle column=$_order}
{if $is_sortable}{get_sortable_link txt=$_column.name id=$_column.id}{else}{$_column.name|escape}{/if} {_renderWidthToggle column=$_order}
{*need to render after table (z-index)*} {include file="./Contact.list.operations.inc.html" inline} {strip} {/strip}
{$wa->crm->pager($total_count|default:0, $page, '', $limit)} {/if}

[`No contacts.`]