{% extends 'layouts/base.html' %} {% load static i18n %} {% block title %}{% trans "Amigos" %}{% endblock title %} {% block extrahead %} {% endblock extrahead %} {% block content %}

{% trans "Amigos e Conexões" %}

{% trans "Gerencie suas conexões e descubra novos amigos" %}

{{ stats.total_friends }} {% trans "Amigos" %}
{{ stats.total_pending_requests }} {% trans "Pendentes" %}
{{ stats.total_sent_requests }} {% trans "Enviados" %}

{% trans "Meus Amigos" %}

{{ stats.total_friends }}
{% if accepted_friendships %}
{% for friendship in accepted_friendships %}
{% if friendship.friend.avatar %} {{ friendship.friend.username }} {% else %} {% trans 'default profile image' %} {% endif %}
{{ friendship.friend.username }}
{% if friendship.friend.first_name or friendship.friend.last_name %}
{{ friendship.friend.first_name }} {{ friendship.friend.last_name }}
{% endif %} {% if friendship.friend.bio %}
{{ friendship.friend.bio|truncatechars:50 }}
{% endif %}
{% if friendship.friend.is_email_verified %} {% trans 'Verificado' %} {% endif %} {{ friendship.friend.fichas }}
{% endfor %}
{% if accepted_friendships.has_other_pages %}
{% with page_param='friends_page' current_page=friends_current_page total_pages=friends_total_pages has_previous=friends_has_previous has_next=friends_has_next previous_page_number=friends_previous_page_number next_page_number=friends_next_page_number page_range=friends_page_range show_first=friends_show_first show_last=friends_show_last show_first_ellipsis=friends_show_first_ellipsis show_last_ellipsis=friends_show_last_ellipsis %} {% if stats.search_query %} {% with query_params='search='|add:stats.search_query %} {% include 'includes/pagination_custom.html' %} {% endwith %} {% else %} {% with query_params='' %} {% include 'includes/pagination_custom.html' %} {% endwith %} {% endif %} {% endwith %}
{% endif %} {% else %}

{% trans 'Nenhum amigo ainda' %}

{% trans 'Comece a adicionar amigos para expandir sua rede de conexões!' %}

{% endif %}

{% trans "Buscar Usuários" %}

{% if stats.search_query %} {% trans 'Limpar busca' %} {% endif %}
{% if stats.search_query %}
{% trans 'Resultados para' %}: {{ stats.search_query }} ({{ stats.total_available_users }} {% trans 'encontrados' %})
{% endif %}
{% for user in users %}
{% if user.avatar %} {{ user.username }} {% else %} {% trans 'default profile image' %} {% endif %}
{% empty %}

{% if stats.search_query %} {% trans 'Nenhum usuário encontrado' %} {% else %} {% trans 'Nenhum usuário disponível' %} {% endif %}

{% if stats.search_query %} {% trans 'Tente ajustar os termos de busca.' %} {% else %} {% trans 'Todos os usuários já são seus amigos ou têm solicitações pendentes.' %} {% endif %}

{% endfor %}
{% if users.has_other_pages %}
{% with page_param='page' current_page=users_current_page total_pages=users_total_pages has_previous=users_has_previous has_next=users_has_next previous_page_number=users_previous_page_number next_page_number=users_next_page_number page_range=users_page_range show_first=users_show_first show_last=users_show_last show_first_ellipsis=users_show_first_ellipsis show_last_ellipsis=users_show_last_ellipsis %} {% if stats.search_query or request.GET.friends_page %} {% with query_params=request.GET.urlencode %} {% include 'includes/pagination_custom.html' %} {% endwith %} {% else %} {% with query_params='' %} {% include 'includes/pagination_custom.html' %} {% endwith %} {% endif %} {% endwith %}
{% endif %}

{% trans "Solicitações Recebidas" %}

{{ stats.total_pending_requests }}
{% if pending_friend_requests %}
{% for request in pending_friend_requests %}
{% if request.user.avatar %} {{ request.user.username }} {% else %} {% trans 'default profile image' %} {% endif %}
{{ request.user.username }}
{% if request.user.first_name or request.user.last_name %}
{{ request.user.first_name }} {{ request.user.last_name }}
{% endif %} {% if request.user.bio %}
{{ request.user.bio|truncatechars:50 }}
{% endif %}
{% if request.user.is_email_verified %} {% trans 'Verificado' %} {% endif %} {{ request.user.fichas }}
{{ request.created_at|date:"d/m/Y H:i" }}
{% endfor %}
{% else %}

{% trans 'Nenhuma solicitação recebida' %}

{% trans 'Quando receber solicitações de amizade, elas aparecerão aqui.' %}

{% endif %}

{% trans "Solicitações Enviadas" %}

{{ stats.total_sent_requests }}
{% if sent_friend_requests %}
{% for request in sent_friend_requests %}
{% if request.friend.avatar %} {{ request.friend.username }} {% else %} {% trans 'default profile image' %} {% endif %}
{{ request.friend.username }}
{% if request.friend.first_name or request.friend.last_name %}
{{ request.friend.first_name }} {{ request.friend.last_name }}
{% endif %} {% if request.friend.bio %}
{{ request.friend.bio|truncatechars:50 }}
{% endif %}
{% if request.friend.is_email_verified %} {% trans 'Verificado' %} {% endif %} {{ request.friend.fichas }}
{{ request.created_at|date:"d/m/Y H:i" }}
{% endfor %}
{% else %}

{% trans 'Nenhuma solicitação enviada' %}

{% trans 'Quando você enviar solicitações de amizade, elas aparecerão aqui.' %}

{% endif %}
{% endblock content %} {% block extrajs %} {% endblock extrajs %}