{% load avatar_tags %}
{% load profile_tags %}
{% load profile_filters %}
{% load perm_tags %}
{% load base_filters %}
{% load i18n %}

{% if profile.user_id %}
<div class="wrap-search-item">
<div class="profile-wrap">
    <h2>
        <a href="{{ profile.get_absolute_url }}">
        {% if profile.display_name %}
            {{ profile.display_name }}
        {% else %}
            {{ profile.user.last_name }}{% if profile.user.first_name %}, {{ profile.user.first_name }} {% endif %}
        {% endif %}({{ profile.user.username }})</a> 	
        {% if profile.is_member %}
        <span style="font-size: 12px;">Member</span> <!-- replace with Icon -->
        {% endif %}
    </h2>
    
    <div class="clear-right"></div>

    <div class="profile-avatar-left" style="float: left; padding-right:1em;">
        {% avatar profile.user 56 %}
    </div>


    <div class="content" style="float: left; margin-left:5px;">
        {% if profile.user.email %}
        {% if request.user.profile.is_superuser or not profile.hide_email %}
        <b>{% trans "Email:" %}</b> {{ profile.user.email|obfuscate_email }}<br />
        {% endif %}
        {% endif %}
        {% if profile.phone %}
        {% if request.user.profile.is_superuser or not profile.hide_phone %}
        <b>{% trans "Phone:" %}</b> {{ profile.phone|phonenumber }}<br />
        {% endif %}
        {% endif %}
        {% if profile.company %}
        <b>{% trans "Company:" %}</b> {{ profile.company }}<br />
        {% endif %}
    </div>
		{% if profile.is_member %}
        	{% if profile|allow_edit_by:user %}
            	<div style="float: right;">
            	<span class="member-icon">Member ID: {{ profile.member_number }}</span>
            	</div>
        	{% endif %}
            
    	{% endif %}
    	
    <div class="clear"></div>

</div>
{% profile_meta %}
</div>
{% endif %}
