{% from 'macros.twig' import avatar %} {% from '_layout/input.twig' import input_checkbox_raw %}
{% if profile_is_editing and perms.edit_avatar %}
{{ input_checkbox_raw('avatar[delete]', false, 'profile__header__avatar__check', '', false, {'id':'avatar-delete'}) }}
{% else %}
{{ avatar(profile_user.user_id|default(0), 120, profile_user.username|default('')) }}
{% endif %}
{% if profile_user is defined %}
{{ profile_user.username }}
{% if profile_user.user_title is not empty %}
{{ profile_user.user_title }}
{% endif %}
{{ profile_user.user_country|country_name }}{% if profile_user.user_age > 0 %}, {{ profile_user.user_age }} year{{ profile_user.user_age != 's' ? 's' : '' }} old{% endif %}
{% else %}
User not found!
Check the link and try again.
{% endif %}
{% if profile_user is defined and profile_relation_info|length > 0 and (profile_relation_info.subject_relation is not null or profile_relation_info.user_relation is not null) %}
{% if profile_relation_info.subject_relation and profile_relation_info.user_relation %} Mutual Friends {% elseif profile_relation_info.user_relation %} You Follow {% elseif profile_relation_info.subject_relation %} Follows You {% endif %}
{% endif %}
{% if profile_user is defined %}
{% if profile_mode is empty %} {% if profile_is_editing %} Discard Settings {% elseif profile_can_edit %} Edit Profile {% endif %} {% if current_user is defined and current_user.user_id != profile_user.user_id and not profile_is_editing %} {% if profile_relation_info.user_relation == constant('MSZ_USER_RELATION_FOLLOW') %} Unfollow {% else %} Follow {% endif %} {% endif %} {% else %} Return {% endif %}
{% endif %} {% if stats is defined %}
{% for stat in stats %} {% if stat.value|default(false) %} {% set is_date = stat.is_date|default(false) %} {% set is_url = stat.url is defined %} {% set active_class = stat.active|default(false) ? ' profile__header__stat--active' : '' %} {% if is_url %} {% else %} {% endif %} {% endif %} {% endfor %}
{% endif %}