{% extends "base.html" %} {% import "/components/header.html" as header %} {% import "/components/footer.html" as footer %} {% import "components/profile_card.html" as profile_card %} {% import "components/profile_nav.html" as profile_nav %} {% import "components/checkbox.html" as checkbox %} {% block title %}Мои соц. сети{% endblock %} {% block content %} {{ header.section(user) }}
{{ profile_card.profile_card(user) }}
{{ profile_nav.profile_nav(user, 'social') }}

ВКонтакте
Авторизоваться {% set social_vk = socials | selectattr('type', '==', 'vk') | list %} {% if social_vk|length==0 or social_vk[0].get('need_auth') %}Нужна авторизация в ВК{%else%}
Личная старница: {% for doc in social_vk %} {% if not doc.get('group',False) %}
{{doc.name}}
{% if 'admin' in user.get('roles',[]) or 'partner' in user.get('roles',[]) %} {% endif %}
{% endif %} {% endfor %}

Сообщества: {% for doc in (social_vk | selectattr('group') | list) %}
{{doc.name}}
{% if 'admin' in user.get('roles',[]) or 'partner' in user.get('roles',[]) %} {% endif %}
{% else %}

Не найдены.

{% endfor %}
{%endif%}

{{ footer.section(user) }} {% endblock %} {% block head %} {{ header.style() }} {{ profile_nav.style() }} {{ checkbox.style() }} {{ footer.style() }} {% endblock %}