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