Social info only for auth users

This commit is contained in:
Felipe Martín 2015-10-11 10:35:53 +02:00
parent 7ca4f983f2
commit 326e156cd8
1 changed files with 16 additions and 14 deletions

View File

@ -37,21 +37,23 @@
</h2>
</div>
<div class="ui four wide column right aligned">
{% get_social_accounts this_user as accounts %}
{% if accounts %}
<h2>{% trans "Contact me in:" %}</h2>
<div class="ui list">
{% for provider, profiles in accounts.items %}
{% for profile in profiles %}
<div class="item">
<a class="ui button tiny {{ provider }}" href="{{ profile.get_profile_url }}">
<i class="{{ provider }} icon"></i>
{{ profile }}
</a>
</div>
{% if user.is_authenticated %}
{% get_social_accounts this_user as accounts %}
{% if accounts %}
<h2>{% trans "Contact me in:" %}</h2>
<div class="ui list">
{% for provider, profiles in accounts.items %}
{% for profile in profiles %}
<div class="item">
<a class="ui button tiny {{ provider }}" href="{{ profile.get_profile_url }}">
<i class="{{ provider }} icon"></i>
{{ profile }}
</a>
</div>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
</div>
{% if user.pk == this_user.pk %}