{strip} {$_user_id = $wa->user("id")} {$_is_admin = $wa->user()->isAdmin($wa->app())} {$_is_my_profile= ( !empty($user.id) && $user.id == $_user_id )} {$_can_edit = ($_is_admin || $_is_my_profile)}
{* HEADER *}
{if $can_edit} {/if} {* @event backend_customer.%plugin_id%.photo *} {foreach $backend_profile as $_}{ifset($_.photo)}{/foreach}
{* @event backend_customer.%plugin_id%.before_header *} {foreach $backend_profile as $_}{ifset($_.before_header)}{/foreach}

{if !empty($user.title)} {$user.title|escape} {/if} {$user_name_formatted|escape} {if !empty($user.login)} @{$user.login|escape} {/if} {* @event backend_customer.%plugin_id%.header *} {foreach $backend_profile as $_}{ifset($_.header)}{/foreach}

{* @event backend_customer.%plugin_id%.after_header *} {foreach $backend_profile as $_}{ifset($_.after_header)}{/foreach} {if !$user.is_company}

{if $user.jobtitle} {$user.jobtitle|escape} {/if} {if $user.jobtitle && $user.company} [`@`] {/if} {if $user.company} {$user.company|escape} {/if}

{/if} {if $user.is_user > 0}

{if $groups} {$_g = []} {foreach $groups as $_id=>$_name} {$_g[] = "`$_name|escape`"} {/foreach} {join(', ', $_g)} {else} [`This user does not belong to any group.`] {if $wa->user()->isAdmin()}  [`Edit groups`] {/if} {/if}

{else if $user.is_user < 0}

[`Access is switched off`]

{else if $invite}

[`User invitation was sent.`]

{/if} {* Used for trigger event in ProfileAccess.html *} {* @event backend_customer.%plugin_id%.before_top *} {foreach $backend_profile as $_}{ifset($_.before_top)}{/foreach} {if $user_events}
{$user_events[0].summary|escape} {if $user_events[0].calendar_id == 'birthday'}  — {waDateTime::format('shortdate', date('Y')|cat:"-`$user.birth_month`-`$user.birth_day`")} {/if}
{/if} {if !empty($is_own_profile)} {if $webasyst_id_auth_url} {elseif $customer_center_auth_url} {* Auth into customer center *} {/if} {/if} {* @event backend_customer.%plugin_id%.after_top *} {foreach $backend_profile as $_}{ifset($_.after_top)}{/foreach}
{* CALENDAR *}
{include file='../schedule/Schedule.inc.html' context='profile' inline} {$_show_text = sprintf_wp("show %s weeks", 5)}
{if $can_view_external_calendars_info} [`Personal calendar settings`] {/if}
{* TABS *} {$wa->contactProfileTabs($user.id, [ 'selected_tab' => waRequest::param('tab', 'activity', 'string') ])} {* JS INIT *}
{/strip}